Welcome to the Solana Starter Kit! This guide is designed to help you quickly start building blockchain applications on Solana by providing a comprehensive template and clear, step-by-step instructions.
- 🔐 Web3 Authentication with Privy (embedded wallets + external wallet support)
- 🔄 Token Swapping with Jupiter integration and referral fee system
- 👥 Social Features with Tapestry social graph API
- 🖼️ NFT Portfolio Viewer with Helius DAS API
- 📱 Responsive Design with modern UI components
- ⚡ Real-time Updates with optimized data fetching
Clone the repository in your preferred code editor to start working with the code locally. Use the following commands:
git https://github.com/Primitives-xyz/solana-starter-kit
cd solana-starter-kitAt this stage, you need to sign up for API keys from each infrastructure partner required for your project. Use the links below to sign up:
- Privy: Web3 authentication and embedded wallet infrastructure – Sign up for Privy
- Tapestry: Social graph and onchain identity API – Get Early Access at Tapestry
- Jupiter: Open source liquidity and trading API – Get your Jupiter API key
- Helius: Real-time Solana RPC platform - Sign up at Helius
Rename the .env.example file to .env.local and update it with your API credentials:
cp .env.example .env.localThen open the .env.local file and replace the placeholder values with your actual API keys. For Next.js applications, any environment variables used in the browser must be prefixed with NEXT_PUBLIC_.
Navigate to Cursor > Cursor Settings > Features > Docs
Add the following docs URLs so Cursor can access them at any time:
-
Privy: https://docs.privy.io/
-
Tapestry: https://docs.usetapestry.dev/api
-
Zerion: https://developers.zerion.io/reference/intro/getting-started
-
Helius: https://docs.helius.dev/
Install dependencies and run the development server to begin coding:
pnpm install
pnpm run devNow you're all set to start coding! Begin by exploring the codebase, and use our documentation to guide your development.
This starter kit includes an integrated Jupiter referral system that allows you to earn fees from swaps executed through your application.
- Sign up for Jupiter Referral Program: Visit https://referral.jup.ag/ and create an account
- Get your Referral Account ID: Copy your referral account from the Jupiter Dashboard
- Add to Environment: Add your referral account to
.env.local:
NEXT_PUBLIC_JUP_REFERRAL_ACCOUNT=your_referral_account_public_key_here- Automatic Fee Collection: 2.51% referral fee automatically collected from all swaps
- Multi-Wallet Support: Works with both external wallets (Phantom, Solflare) and Privy embedded wallets
- Reliable Implementation: Uses Jupiter's recommended
platformFeeBpsapproach to avoid API conflicts - Real-time Tracking: Monitor earnings via the Jupiter Referral Dashboard
For detailed setup instructions and troubleshooting, see JUPITER_REFERRAL_SETUP.md.
For the NFT portfolio viewer to work correctly, you need to obtain a Helius API key:
- Visit Helius Developer Portal and create an account
- Create a new API key
- Add the key to your
.env.localfile:
NEXT_PUBLIC_HELIUS_API_KEY=your_api_key_here
This allows the application to fetch NFT data from the Solana blockchain using Helius's DAS API.
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions to the Solana Starter Kit! By contributing, you agree that your contributions will be licensed under the MIT License. Please feel free to submit issues, fork the repository, and create pull requests.