Back to templates

Template details

Nextjs Solana Starter Kit

Build your own Solana dApp with NextJS and TypeScript

About this template

The Nextjs Solana Starter Kit is a boilerplate for building Solana dApps with Next.js and TypeScript, providing wallet connection, on-chain transactions, and data fetching via Helius API out of the box.

What is the Nextjs Solana Starter Kit?

The Nextjs Solana Starter Kit is an open-source boilerplate by aeminium-labs that gives developers a foundation for building Solana dApps. It runs on Next.js with TypeScript and includes examples for wallet authentication, SOL and SPL token transfers, transaction confirmation, and name-service lookups. The template is distributed as a GitHub repository that can be bootstrapped with npx create-next-app -e https://github.com/aeminium-labs/nextjs-solana-starter-kit.

Key Features

  • Wallet connection — Integrates @solana/wallet-adapter with Phantom and Backpack pre-configured, and auto-connect enabled for returning users.
  • Wallet ownership validation — A client-side signing mechanism requests a signature on connect to prove the user owns the wallet, without any on-chain interaction.
  • SOL and SPL token transactions — Example code creates, submits, and confirms transactions for SOL and SPL tokens (e.g., $BONK) using @solana/web3.js and @solana/spl-token.
  • Twitter handle lookup — Uses @solana/name-service to find the Twitter handle associated with a wallet address.
  • Helius API integration — Fetches on-chain data such as the list of NFTs held by the connected wallet, with a clear example to extend for other Helius endpoints.
  • Next.js architecture — Complex operations run in backend API routes; only transaction signing happens on the client.
  • Tailwind CSS and daisyUI — Pre-configured styling with a dark/light theme switcher, plus react-hot-toast for transaction feedback.

Who should use the Nextjs Solana Starter Kit?

  • Solana dApp developers — Save time setting up wallet connection and transaction plumbing when building NFT marketplaces, DeFi dashboards, or wallet tools.
  • Web3 hackers — Use the template as a learning resource to see how to wire @solana/web3.js into Next.js API routes.
  • Startups prototyping on Solana — Quickly spin up a proof-of-concept with a working wallet connection and on-chain interactions, then customize the theme and add their own features.

How does the Nextjs Solana Starter Kit work?

  1. Create a new Next.js app with the template using npx create-next-app -e https://github.com/aeminium-labs/nextjs-solana-starter-kit.
  2. Copy the repository and add your Helius API key to a .env.local file.
  3. Run npm run dev to start the development server and interact with the wallet connection and examples.

Use cases

  • NFT projects: Fetch a wallet's NFT list from Helius and display it in a dashboard.
  • Token transfer tools: Let users move SOL and SPL tokens through a simple interface while the backend builds and submits the transaction.
  • Social verification: Check the Twitter handle associated with a wallet address using the name-service integration.

FAQ

Does the Nextjs Solana Starter Kit support Phantom and Backpack?

Yes, both Phantom and Backpack are pre-configured in the wallet-adapter setup, and you can easily add other wallets by changing the configuration.

Do I need a Helius API key?

Yes, the template uses Helius API to fetch on-chain data, such as the NFT list. You can get an API key from helius.xyz and add it to your .env.local file.

Can I deploy the starter kit to Vercel?

Yes, the template is designed for deployment on Vercel. Run npm run build locally to check for errors, link your repository, and push to the main branch to trigger automatic deployments.