This is a Next.js project bootstrapped with create-next-app.
- Copy the example env file:
cp .env.example .env- Fill in the required values in
.env.local:HELIUS_API_KEY(for server-side usage)NEXT_PUBLIC_HELIUS_API_KEY(for client-side usage)OKX_API_KEYOKX_SECRET_KEYOKX_API_PASSPHRASEOKX_PROJECT_ID
- Use
.env.localfor actual API keys (automatically ignored by git) - Never commit real API keys to git repositories
- If a real key was accidentally committed, immediately:
- Rotate/regenerate the API key
- Purge it from git history
- Review commit logs for exposure
This project supports both Solana Devnet and Solana Mainnet environments:
# Development with Solana Devnet (for testing)
yarn dev
# Production with Solana Mainnet (for real transactions)
yarn prod| Command | Network | Use Case | SOL Cost |
|---|---|---|---|
yarn dev |
Solana Devnet | Testing, Development | Free |
yarn prod |
Solana Mainnet | Production, Real Trading | Real SOL |
-
yarn dev→ Solana Devnet- RPC:
https://api.devnet.solana.comorhttps://devnet.helius-rpc.com - Genesis Hash:
EtWTRABZaYq6iMfeYKouRu166VU2xqa1 - Free SOL available from faucets
- Safe for testing all features
- RPC:
-
yarn prod→ Solana Mainnet- RPC:
https://solana-mainnet.g.alchemy.comorhttps://mainnet.helius-rpc.com - Genesis Hash:
5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d - Requires real SOL for transactions
- Live trading environment
- RPC:
First, run the development server:
# For testing (recommended)
yarn dev
# For production
yarn prodOpen http://localhost:3000 with your browser to see the result.
When using yarn dev:
- ✅ Free SOL: Get free SOL from Devnet faucets
- ✅ Test Tokens: Create and trade tokens without cost
- ✅ Safe Testing: No real money involved
- ✅ Full Features: All DEX functionality available
When using yarn prod:
⚠️ Real SOL: Requires actual SOL for transactions⚠️ Real Tokens: Creates actual tradeable tokens⚠️ Real Money: All transactions cost real SOL
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.