A production-ready, full-stack crypto token launchpad platform where blockchain projects can launch token sales and users can participate in investments. Built with modern technologies and best practices.
New to the project? We have comprehensive, beginner-friendly documentation covering everything from setup to deployment!
| Document | Description | For |
|---|---|---|
| π Documentation Index | Start here! Overview of all docs | Everyone |
| π Setup Guide | Zero to running in 30 minutes | Beginners |
| ποΈ Architecture | System design explained | Developers |
| π Folder Structure | Every file explained | New developers |
| π Environment Variables | All .env variables |
Everyone |
| π Smart Contracts | Contract integration | Blockchain devs |
| π Deployment | Production deployment | DevOps |
| π Best Practices | Coding standards | Developers |
| π Troubleshooting | Common issues | Everyone |
Complete Beginner?
- Documentation Index β Understand what CryptoLaunch is
- Setup Guide β Get it running locally
- Folder Structure β Learn the codebase
Developer Joining the Project?
- Setup Guide β Install and configure
- Architecture β Understand system design
- Best Practices β Follow standards
Deploying to Production?
- PRODUCTION_AUDIT_REPORT.md β Review security audit
- CRITICAL_FIXES.md β Fix vulnerabilities
- Deployment Guide β Deploy safely
- π Web3 Wallet Integration: MetaMask and WalletConnect support
- π Project Discovery: Browse and filter token launches by status, raised amount, and more
- π Real-Time Data: Live project statistics and countdown timers
- π° Investment Management: Track your portfolio, investments, and claimable tokens
- π¨ Beautiful UI: Glassmorphism design with smooth animations
- π± Fully Responsive: Optimized for mobile, tablet, and desktop
- π Project Management: Create, edit, and delete projects
- π Analytics Dashboard: Monitor platform performance
- π₯ User Management: View and manage platform users
- π Role-Based Access: Secure admin panel with authentication
- β‘ Lightning Fast: Optimized bundle size with code splitting
- π Secure: Row Level Security (RLS) policies, input sanitization, XSS protection
- π― Type-Safe: Full TypeScript coverage with strict mode
- π§ͺ Production-Ready: Error boundaries, loading states, and comprehensive error handling
- βΏ Accessible: WCAG 2.1 AA compliant
- π Real-Time: Supabase real-time subscriptions for live updates
- React 18 - UI library with latest features
- TypeScript - Type safety and better DX
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library
- Recharts - Chart library for data visualization
- Zustand - Lightweight state management
- React Router - Client-side routing
- Ethers.js - Ethereum library for Web3 interactions
- Supabase - Backend-as-a-Service
- PostgreSQL database
- Real-time subscriptions
- Row Level Security
- Edge Functions (serverless)
- Authentication
- Multi-Chain Support - Arbitrum, Base, Polygon, Optimism, Ethereum, Sepolia
- MetaMask & WalletConnect - Browser wallet integration
- Ethers.js v6 - Modern Ethereum library
- Smart Contract Integration - IDO pools, token vesting, whitelists
- Node.js 18+ and npm/yarn/pnpm
- MetaMask or compatible Web3 wallet
- Supabase account (free tier works)
- RPC provider account (Alchemy, Infura, or QuickNode)
| Network | Chain ID | Type | Explorer |
|---|---|---|---|
| Arbitrum One | 42161 | Mainnet | arbiscan.io |
| Base | 8453 | Mainnet | basescan.org |
| Optimism | 10 | Mainnet | optimistic.etherscan.io |
| Polygon | 137 | Mainnet | polygonscan.com |
| Ethereum | 1 | Mainnet | etherscan.io |
| Sepolia | 11155111 | Testnet | sepolia.etherscan.io |
Recommended for production: Arbitrum One or Base (lowest gas fees)
git clone <repository-url>
cd crypto-launchpadnpm installCopy .env.example to .env and configure:
cp .env.example .envRequired variables:
# Supabase
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_SUPABASE_ANON_KEY=your_anon_key
# Network (default: Arbitrum One)
VITE_CHAIN_ID=42161
VITE_RPC_URL=https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY
VITE_EXPLORER_BASE_URL=https://arbiscan.io
# WalletConnect
VITE_WALLETCONNECT_PROJECT_ID=your_project_idSee .env.example for all options and DEPLOYMENT.md for detailed setup.
The database tables are already created with proper RLS policies. To seed with mock data:
npm run seednpm run devVisit http://localhost:3000 to see the app.
npm run buildcrypto-launchpad/
βββ src/
β βββ components/ # Reusable UI components
β β βββ ui/ # Base UI components (Button, Card, Modal, etc.)
β β βββ layout/ # Layout components (Navbar, Footer)
β β βββ home/ # Homepage components
β β βββ projects/ # Project-related components
β βββ pages/ # Page components
β β βββ Home.tsx
β β βββ Projects.tsx
β β βββ ProjectDetail.tsx
β β βββ Dashboard.tsx
β β βββ Admin.tsx
β βββ hooks/ # Custom React hooks
β βββ services/ # API services
β βββ store/ # Zustand stores
β βββ lib/ # Library configurations
β βββ config/ # App configuration
β βββ types/ # TypeScript types
β βββ utils/ # Utility functions
β βββ App.tsx # Main app component
β βββ main.tsx # Entry point
β βββ index.css # Global styles
βββ scripts/ # Utility scripts
β βββ seed-database.ts # Database seeding script
βββ public/ # Static assets
βββ supabase/ # Supabase migrations and functions
- Stores token launch projects with details like token info, sale dates, and funding goals
- Includes vesting schedule configuration
- Records user investments in projects
- Tracks tokens purchased and claimed amounts
- User profiles linked to wallet addresses
- Admin role management
- Row Level Security (RLS): Database-level security policies
- Input Sanitization: All user inputs are sanitized
- XSS Protection: Content rendering is escaped
- Secure Wallet Connection: Safe Web3 provider interactions
- Rate Limiting: API call protection (ready for implementation)
- Environment Variables: Sensitive data stored securely
- Primary: Purple (#8B5CF6)
- Cyan: #06B6D4
- Accent Blue: #3B82F6
- Accent Pink: #EC4899
- Background: Dark navy (#0F172A)
- Card: Glassmorphism effect (rgba(255,255,255,0.05))
- Glassmorphism cards with backdrop blur
- Gradient buttons and text
- Smooth animations and transitions
- Loading skeletons for better UX
- Toast notifications for user feedback
- Mobile First: Optimized for small screens
- Breakpoints:
- Mobile: < 768px
- Tablet: 768px - 1024px
- Desktop: > 1024px
- Touch Friendly: Large tap targets and mobile navigation
- Hero Section: Eye-catching introduction with CTA buttons
- Stats Cards: Real-time platform statistics
- Featured Projects: Showcase of top projects
- Newsletter: Email signup (UI ready)
- Advanced Filters: Filter by status, search, and sort options
- Grid/List Views: Different viewing modes
- Real-Time Updates: Live project data
- Pagination: Efficient data loading
- Comprehensive Info: All project details and tokenomics
- Interactive Charts: Pie charts for token distribution
- Investment Interface: Simple investment flow
- Countdown Timers: Real-time sale countdowns
- Social Links: Connect with project teams
- Portfolio Overview: Total invested, tokens, and claimables
- Investment History: Detailed transaction history
- Claim Interface: Easy token claiming
- Performance Tracking: Investment analytics
- Project Management: Full CRUD operations
- Create Projects: Multi-step project creation form
- Analytics: Platform performance metrics
- User Management: View and manage users
The platform includes production-ready smart contracts in contracts/:
- IDOPool.sol: Main investment pool contract
- TokenVesting.sol: Token vesting with cliff and linear release
- Whitelist.sol: Merkle proof whitelist verification
- LaunchpadFactory.sol: Factory for deploying new IDO pools
- MockERC20.sol: Test token for development
Custom React hooks for contract interactions (src/contracts/hooks/):
// Investment hook
const { poolInfo, invest, claim, refund } = useIDOPool(poolAddress);
// Vesting hook
const { vestingSchedule, release, releasableAmount } = useTokenVesting(vestingAddress);
// Token balance hook
const { balance, allowance, approve } = useTokenBalance(tokenAddress, userAddress);- MetaMask support out of the box
- WalletConnect integration
- Network switching to Sepolia testnet
- Balance display and transaction handling
- User connects wallet
- Selects investment amount
- Gas estimation is displayed
- User reviews and confirms transaction
- Transaction modal shows pending state
- On-chain transaction is verified by Supabase Edge Function
- Investment recorded in database with verified on-chain data
- Ethereum Mainnet (Chain ID: 1)
- Sepolia Testnet (Chain ID: 11155111)
- Arbitrum One (Chain ID: 42161)
- Base (Chain ID: 8453)
- Polygon (Chain ID: 137)
# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run tests with UI
npm run test:ui
# Generate coverage report
npm run test:coverageTests are located in src/contracts/hooks/__tests__/:
useIDOPool.test.ts- IDO Pool hook testsuseTokenVesting.test.ts- Vesting hook testsuseTokenBalance.test.ts- Token balance hook tests
Test the investment flow on Sepolia:
# Set environment variables
export PRIVATE_KEY=your_private_key
export IDO_POOL_ADDRESS=deployed_pool_address
export SEPOLIA_RPC_URL=https://rpc.sepolia.org
# Run demo
node scripts/demo-invest.jsRun Hardhat tests for smart contracts:
cd contracts
npm test
# Run specific test
npx hardhat test test/IDOPool.test.ts
# Run with coverage
npx hardhat coverageRun fuzz tests:
cd contracts
forge test -vvv
# Run specific fuzz test
forge test --match-contract IDOPoolFuzzTest -vvv# Install Vercel CLI
npm i -g vercel
# Deploy
vercel# Install Netlify CLI
npm i -g netlify-cli
# Deploy
netlify deploy --prodMake sure to set these in your deployment platform:
VITE_SUPABASE_URLVITE_SUPABASE_SUPABASE_ANON_KEY
- Ensure MetaMask is installed
- Check you're on Sepolia testnet
- Clear browser cache and reload
- Verify Supabase credentials in
.env - Check RLS policies are enabled
- Ensure tables are created
- Delete
node_modulesand reinstall - Clear Vite cache:
rm -rf .vite - Check TypeScript errors:
npm run build
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- Design inspired by DAO Maker and Polkastarter
- Icons from Heroicons
- Images from Unsplash
Built with β€οΈ using React, TypeScript, and Supabase