A Product Hunt-style platform for discovering and launching Solana dApps. Built with Next.js, Prisma, and integrated with Solana blockchain functionality.
- Project Submission & Approval - Submit dApps for community review
- Voting System - Upvote/downvote projects with real user authentication
- Google OAuth Authentication - Secure login with Google accounts
- Admin Panel - Review and approve submissions
- Leaderboards - Ranked lists by hunt score, votes, and time periods
- Forum Discussions - Community discussions around projects
- Solana Integration - Built-in wallet connection and Solana program interaction
- Mobile Responsive - Works great on all devices
- Frontend: Next.js 14, React, TypeScript, TailwindCSS
- Authentication: NextAuth.js with Google OAuth
- Database: SQLite (development) / PostgreSQL (production) with Prisma ORM
- Blockchain: Solana, Anchor Framework
- UI Components: Radix UI, Lucide React
- State Management: React Query, Jotai
Before you begin, ensure you have the following installed:
- Node.js v18.18.0 or higher
- pnpm package manager
- Rust v1.77.2 or higher (for Solana development)
- Anchor CLI 0.30.1 or higher
- Solana CLI 1.18.17 or higher
git clone <your-repo-url>
cd dapphuntpnpm installCreate a .env.local file in the root directory:
# NextAuth.js Configuration
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key-here
# Google OAuth (Required for authentication)
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
# Database
DATABASE_URL="file:./dev.db"To get Google OAuth credentials:
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add
http://localhost:3000/api/auth/callback/googleas authorized redirect URI
Generate NextAuth Secret:
openssl rand -base64 32Generate Prisma client and create the database:
# Generate Prisma client
npx prisma generate
# Create and migrate database
npx prisma db push
# Seed the database with sample data
npx prisma db seedpnpm devThe app will be available at http://localhost:3000
View Database (Optional):
npx prisma studioReset Database:
npx prisma db push --force-reset
npx prisma db seedDeploy Database Changes:
npx prisma db pushIf you want to work with the Solana program:
Sync Program ID:
pnpm anchor keys syncBuild Solana Program:
pnpm anchor-buildStart Local Validator:
pnpm anchor-localnetRun Tests:
pnpm anchor-testDeploy to Devnet:
pnpm anchor deploy --provider.cluster devnet- Start the app - Run
pnpm dev - Sign in - Click "Sign In" and authenticate with Google
- Explore - Browse existing projects on the home page
- Vote - Click upvote buttons to vote on projects
- Submit - Go to
/submitto submit your own dApp - Admin - Visit
/adminto approve submissions (when signed in)
/- Home page with top projects/products- All projects with filtering/submit- Submit new dApp/admin- Admin panel for approvals/leaderboard- Leaderboard rankings/profile- User profile and submissions/solana- Solana blockchain features
src/
βββ app/ # App Router (Next.js 13+)
β βββ api/ # API routes
β β βββ auth/ # NextAuth configuration
β β βββ projects/ # Project CRUD operations
β β βββ submissions/ # Submission management
β β βββ ...
β βββ solana/ # Solana-specific pages
β βββ layout.tsx # Root layout
βββ pages/ # Pages Router (legacy routes)
β βββ products.tsx # Products listing
β βββ profile.tsx # User profiles
β βββ _app.tsx # Pages app wrapper
βββ components/ # Reusable UI components
β βββ ui/ # Base UI components
β βββ Header.tsx # Navigation header
β βββ ProductCard.tsx # Product display card
β βββ ...
βββ hooks/ # Custom React hooks
βββ lib/ # Utility libraries
β βββ prisma.ts # Prisma client
β βββ auth.ts # Auth utilities
βββ providers/ # Context providers
βββ types/ # TypeScript definitions
prisma/
βββ schema.prisma # Database schema
βββ seed.ts # Database seeding
βββ dev.db # SQLite database (development)
anchor/ # Solana program code
βββ programs/ # Rust programs
βββ tests/ # Program tests
βββ Anchor.toml # Anchor configuration
# Development
pnpm dev # Start development server
pnpm build # Build for production
pnpm start # Start production server
# Database
pnpm db:generate # Generate Prisma client
pnpm db:push # Push schema changes
pnpm db:seed # Seed database
pnpm db:studio # Open Prisma Studio
# Solana/Anchor
pnpm anchor-build # Build Solana program
pnpm anchor-test # Run program tests
pnpm anchor-localnet # Start local validator- Click "Sign In" β Google OAuth β Automatic account creation
- Users get auto-generated usernames
- Session persists across browser restarts
/submitβ Fill out comprehensive form- Submission goes to admin review (
/admin) - Admin approves β Project appears on platform
- Real-time voting and hunt scores
- Sign in β Access
/admin - Review pending submissions
- One-click approval creates live projects
- Manage platform content
Authentication Issues:
- Verify Google OAuth credentials in
.env.local - Check redirect URIs match exactly
- Clear browser cookies and restart dev server
Database Issues:
- Run
npx prisma db pushto sync schema - Check
DATABASE_URLin environment variables - Reset with
npx prisma db push --force-reset
Build Errors:
- Delete
.nextfolder and restart - Check all environment variables are set
- Verify Node.js version compatibility
- Authentication Setup Guide - Detailed OAuth setup
- Prisma Documentation
- NextAuth.js Documentation
- Solana Documentation
- Anchor Framework
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
[Add your license here]
Built with β€οΈ for the Solana ecosystem