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

# Setup

> Install and configure the Next.js template

# Setup

This guide walks you through setting up the Next.js template for building confidential Solana dApps.

## Clone the Template

```bash theme={null}
git clone https://github.com/Inco-fhevm/nextjs-template-svm.git
cd nextjs-template-svm
```

## Install Dependencies

<CodeGroup>
  ```bash npm theme={null}
  npm install
  ```

  ```bash yarn theme={null}
  yarn install
  ```

  ```bash bun theme={null}
  bun install
  ```
</CodeGroup>

## Dependencies Overview

The template uses these key packages:

```json theme={null}
{
  "dependencies": {
    "@coral-xyz/anchor": "^0.32.1",
    "@inco/solana-sdk": "^0.0.2",
    "@solana/wallet-adapter-react": "^0.15.35",
    "@solana/wallet-adapter-react-ui": "^0.9.35",
    "@solana/wallet-adapter-wallets": "^0.19.32",
    "@solana/web3.js": "^1.95.3",
    "next": "16.1.1",
    "react": "19.2.3"
  }
}
```

| Package                    | Purpose                            |
| -------------------------- | ---------------------------------- |
| `@inco/solana-sdk`         | Encrypt values and decrypt handles |
| `@coral-xyz/anchor`        | Interact with Solana programs      |
| `@solana/wallet-adapter-*` | Wallet connection UI and hooks     |
| `@solana/web3.js`          | Solana blockchain interactions     |

## Environment Variables

Create a `.env.local` file in your project root:

```bash theme={null}
# Solana RPC endpoint (optional - defaults to devnet)
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
```

## Run the Development Server

<CodeGroup>
  ```bash npm theme={null}
  npm run dev
  ```

  ```bash yarn theme={null}
  yarn run dev
  ```

  ```bash bun theme={null}
  bun run dev
  ```
</CodeGroup>

Open [http://localhost:3000](http://localhost:3000) in your browser.

## What You Should See

1. **Header** with Inco logo and "Connect Wallet" button
2. **Amount Input** field (disabled until wallet connected)
3. **Balance Display** showing "\*\*\*\*" (hidden until revealed)

## Connect Your Wallet

1. Click "Connect Wallet"
2. Select your wallet (Phantom, Solflare, etc.)
3. Approve the connection

Once connected, you can:

* Enter an amount and encrypt it
* Mint confidential tokens
* Reveal your encrypted balance

## Next Steps

Now that your project is running, learn about the [Project Structure](/svm/tutorials/nextjs-template/project-structure) to understand how everything fits together.
