Next.js Solana Presale Widget – Multi-Wallet, SOL/USDC, Easy Vercel Deploy
Next.js Solana Presale Widget – Multi-Wallet, SOL/USDC, Easy
Description
Solana Token Presale Platform
A modern, production-ready token presale platform built with Next.js 16, React 19, and TypeScript. Launch your Solana token presale with multi-stage support, real-time blockchain verification, and comprehensive admin dashboard.
Key Features
Presale Management
- Multi-stage presale system with unlimited stages
- Configurable pricing per stage
- Automatic bonus token calculation
- Real-time countdown timers
- Progress tracking with visual indicators
- Stage-based token allocation limits
Payment Processing
- Accept SOL and USDC payments
- Real-time cryptocurrency price conversion
- Instant blockchain transaction verification
- Automatic token amount calculation
- Transaction signature recording
- Direct wallet-to-wallet transfers (no escrow)
Wallet Integration
- Solana Wallet Adapter integration
- Support for all major Solana wallets
- Real-time balance tracking
- One-click wallet connection
- Mobile wallet support
- Automatic reconnection handling
Admin Dashboard
- Secure authentication (SHA-256 password hashing)
- Real-time sales statistics
- Complete purchase history
- CSV data export
- Transaction verification
- Unique wallet tracking
User Interface
- Modern glassmorphism design
- Dark and light theme support
- Fully responsive (mobile, tablet, desktop)
- Smooth animations with Framer Motion
- Toast notifications
- Loading states and error handling
User Features
- Purchase history per wallet
- Real-time token balance display
- Interactive price calculator
- Stage information display
- Transaction signature links
- Bonus token visualization
Technical Stack
Frontend
- Next.js 16.0.1 (App Router)
- React 19.2.0
- TypeScript 5
- Redux Toolkit (State Management)
- Tailwind CSS 4
- Framer Motion 12
Blockchain
- Solana Web3.js 1.98.4
- Solana Wallet Adapter 0.15.39
- SPL Token 0.4.14
Backend & Database
- Next.js API Routes
- Prisma ORM 6.18.0
- SQLite (development)
- PostgreSQL (production)
Additional Libraries
- React Toastify (Notifications)
- Day.js (Date handling)
- BS58 (Encoding)
Supported Wallets
- Phantom
- Solflare
- Backpack
- Coinbase Wallet
- Trust Wallet
- Ledger
- Trezor
- All Solana Wallet Adapter compatible wallets
What's Included
Application Files
- Complete Next.js source code
- All components and pages
- API routes
- Database schema (Prisma)
- Redux store configuration
- Custom hooks
- Utility functions
- TypeScript type definitions
Configuration Files
- Environment configuration examples
- Presale configuration template
- Database seeding scripts
- Deployment configuration
Documentation
- Installation guide
- Configuration guide
- Deployment instructions
- API documentation
- Troubleshooting guide
Requirements
Server
- Node.js 18.x or higher
- npm or yarn
- SQLite (local) or PostgreSQL (production)
Deployment
- Vercel (recommended)
- Netlify
- Any Node.js hosting
Browser Support
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
Quick Setup
- Extract files and run
npm install - Initialize database with
npx prisma db push - Configure presale settings in
lib/presaleConfig.ts - Add your wallet address in
lib/walletAddress.ts - Run
npm run devfor local testing - Deploy to Vercel or your preferred hosting
Configuration
All presale settings are configured through a single TypeScript file:
- Token information (name, symbol, decimals)
- Presale stages (pricing, dates, allocations)
- Bonus percentages
- Min/max purchase limits
- Accepted payment tokens
- Brand colors and theme
Database Schema
Purchase Table
- Wallet address
- Payment amount
- Token type (SOL/USDC)
- Tokens received
- Transaction signature
- Timestamp
- Verification status
Admin Table
- Username
- Password (SHA-256 hashed)
- Created/updated timestamps
TokenConfig Table
- Token metadata
- Contract address
- Logo URL
- Social links
Security Features
- SHA-256 password hashing
- Protected admin routes
- Input validation
- XSS protection
- CSRF protection
- SQL injection prevention (Prisma ORM)
- Environment variable security
- Blockchain signature verification
Performance
- Lighthouse Score: 95+
- First Contentful Paint: < 1.5s
- Bundle Size: ~350KB gzipped
- Optimized database queries
- Code splitting
- Image optimization
Deployment Options
Vercel (Recommended)
- One-click deployment
- Free tier available
- Automatic HTTPS
- Global CDN
Database Hosting
- Neon (PostgreSQL - free tier)
- Vercel Postgres
- Supabase
- Railway
Alternative Platforms
- Netlify
- DigitalOcean
- AWS
- Traditional VPS
Code Quality
- 100% TypeScript
- Zero build errors
- ESLint compliant
- Type-safe with strict mode
- Clean, modular architecture
- Comprehensive code comments
API Endpoints
Public
GET /api/purchases/[wallet]- Get wallet purchase historyPOST /api/purchases- Record new purchaseGET /api/stats- Get presale statisticsPOST /api/verify- Verify transaction signatureGET /api/sol-price- Get current SOL price
Admin
POST /api/auth/login- Admin loginGET /api/admin/purchases- Get all purchasesPOST /api/admin/change-password- Change admin password
Browser Compatibility
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Opera 76+
- Mobile browsers (iOS Safari, Chrome Mobile)
Support
Support is provided through Web3.Market. Documentation covers installation, configuration, deployment, and common issues.
License
- Regular License: Use in a single end product.
- Extended License: Use in products for sale.
Version: 1.0.0
Compatibility: Next.js 16, React 19, Node.js 18+
Disclaimer: Web3.Market is a marketplace platform that facilitates the sale of digital products between independent sellers and buyers. We do not develop, endorse, or guarantee any product listed on this platform. All products are provided by third-party sellers and are sold "as is." Web3.Market assumes no responsibility or liability for the functionality, security, legality, or any use or misuse of products purchased through this platform. Buyers are solely responsible for evaluating the suitability of any product for their intended purpose and for ensuring compliance with all applicable laws and regulations. By purchasing, you acknowledge that Web3.Market shall not be held liable for any direct, indirect, incidental, or consequential damages arising from the use of any product.
One-time payment • Lifetime access
Product Info
RPC Providers
Need a reliable RPC endpoint for your dApp? Get started with these trusted providers: