> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Starter Apps

> Scaffold a sample app to get started with AI-assisted crypto development on Coinbase Developer Platform (CDP).

This guide walks you through setting up a sample app with source code to help you get started with AI-assisted crypto development on Coinbase Developer Platform (CDP).

## Prerequisites

* [Coinbase Developer Platform account](https://portal.cdp.coinbase.com/) for access to our APIs
* An AI-capable development environment of your choice
* `npm` for setting up starter apps

## 1. Choose a starter app

Start with the right starter app depending on your needs.

Use this quick mapping:

* If you want seamless onboarding with embedded wallets for consumers → choose **Consumer-based apps**.
* If you need external wallet connections and DeFi protocol integrations → choose **Trading apps (DeFi)**.
* If your core is automation, bots, or 24/7 server-side operations → choose **Automation and AI Agents**.

### Comparison

| App type                 | Best for                                                                                                                   | Why it works with AI                                                                                                                          | Starter prompt                                                                                                            |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Consumer-based apps      | <ul><li>Payment apps</li><li>Social crypto features</li><li>Consumer wallets</li><li>Tipping systems</li></ul>             | <ul><li>Embedded-wallet patterns</li><li>Common flows</li><li>Simpler security</li><li>Rapid UI iteration</li></ul>                           | I'm building a consumer app with embedded wallets. Help me add \[feature] that works with email auth and no seed phrases. |
| Trading apps (DeFi)      | <ul><li>DEX interfaces</li><li>Portfolio trackers</li><li>Yield farming apps</li><li>Advanced trading tools</li></ul>      | <ul><li>OnchainKit patterns</li><li>External wallet integration</li><li>Rich DeFi ecosystem</li><li>AI helps with complex state</li></ul>     | I'm building a DeFi app with OnchainKit and wagmi. Help me create \[feature] integrating with \[protocol].                |
| Automation and AI Agents | <ul><li>Trading bots</li><li>Automated portfolio management</li><li>Cross-chain operations</li><li>Data analysis</li></ul> | <ul><li>AgentKit AI-native patterns</li><li>Built-in CDP SDK</li><li>AI-assisted automation design</li><li>Server-side for 24/7 ops</li></ul> | I'm building an AI agent with AgentKit and CDP SDK. Help me automate \[goal] with robust error handling and monitoring.   |

## 2. Scaffold your project

<Tabs>
  <Tab title="Consumer App">
    ```bash theme={null}
    npm create @coinbase/cdp-app@latest my-consumer-app
    ```

    You will be prompted to choose a template type and configure your project. This starter app works with the CDP Web SDK for embedded wallets, email authentication, and no seed phrases required.

    Find more detailed instructions on its setup in the [Embedded Wallet Guide](/embedded-wallets/quickstart).
  </Tab>

  <Tab title="DeFi App">
    ```bash theme={null}
    npm create onchain@latest my-defi-app
    ```

    You will be prompted to choose a template type and configure your project. This starter app works with OnchainKit for external wallet connections, DeFi protocol integrations, and advanced trading features.

    Find more detailed instructions on its setup in the [OnchainKit Getting Started Guide](https://onchainkit.xyz/getting-started).
  </Tab>

  <Tab title="AI Agent">
    ```bash theme={null}
    npm create onchain-agent@latest my-agent
    ```

    You will be prompted to choose a template type and configure your project. This starter app works with AgentKit for building AI agents that can interact with blockchain networks, including trading, automated portfolio management, and 24/7 server-side operations.

    Find more detailed instructions on its setup in the [AgentKit Quickstart Guide](/agent-kit/getting-started/quickstart).
  </Tab>
</Tabs>

### Integrating starter apps

For complex projects that need features from multiple templates, you can start with one and use AI to integrate patterns from others:

**Consumer + DeFi Integration:**

```bash theme={null}
# Start with embedded wallet consumer app
npm create @coinbase/cdp-app@latest my-hybrid-app
cd my-hybrid-app

# Then ask AI to add DeFi features
# "Add OnchainKit's Swap and Transaction components to enable DeFi trading while keeping embedded wallet authentication"
```

**DeFi + AI Agent Integration:**

```bash theme={null}
# Start with DeFi app
npm create onchain@latest my-trading-app
cd my-trading-app

# Then ask AI to add automation
# "Add AgentKit patterns to automate trading strategies and portfolio rebalancing"
```

**Consumer + AI Agent Integration:**

```bash theme={null}
# Start with consumer app
npm create @coinbase/cdp-app@latest my-smart-wallet
cd my-smart-wallet

# Then ask AI to add intelligent features
# "Add AgentKit to create AI-powered spending insights and automated savings features"
```

**Custom Modifications:**
If no template fits perfectly, start with the closest match and modify:

```bash theme={null}
# Example: DeFi app with embedded wallets instead of external wallet connections
npm create onchain@latest my-custom-app

# Then ask AI to restructure
# "Convert this OnchainKit app to use embedded wallets instead of external wallet connections, keeping all DeFi components but changing the authentication layer"
```

## Re-configuring your app

Once you have scaffolded your project, it should have come equipped with a hidden `.env` file.

This file is used to store environment-specific variables for your development setup. It allows you to configure settings like API keys, project IDs, and network configurations without hardcoding them into your application code. This file is crucial for maintaining security and flexibility, as it keeps sensitive information out of your codebase and allows for easy changes to configuration settings.

<Warning>
  **Never commit your `.env` file to version control.** It contains sensitive API keys that could compromise your CDP account if exposed publicly.
</Warning>
