Mockli is an AI-powered mock interview platform that helps you ace your next technical interview. Practice with realistic interview questions for top companies like Google, Microsoft, Amazon, and more. Get instant AI-generated feedback, track your progress, and earn certificates.
- AI-Generated Questions - 30 unique MCQ questions tailored to your target company and role
- Multiple Difficulty Levels - From Novice to Expert, choose your challenge
- Real-Time Scoring - Instant feedback with detailed performance analytics
- Certificates - Downloadable certificates for completed tests
- Progress Tracking - Dashboard to monitor your interview preparation journey
- Credit System - Free tier with weekly credits, premium plans for unlimited practice
- Admin Panel - Comprehensive management for companies, roles, and analytics
- Framework: Next.js 16 (App Router)
- Language: TypeScript 5
- Styling: Tailwind CSS + shadcn/ui
- UI Components: Radix UI
- State Management: React 19
- Authentication: Clerk
- Runtime: Node.js
- API Routes: Next.js API Routes
- Database: PostgreSQL (Neon)
- ORM: Drizzle ORM
- File Storage: Vercel Blob
- Email: Resend
- LLM Providers: Groq (gpt-oss, llama-3.1) + OpenAI (gpt-4o-mini fallback)
- Background Jobs: Inngest
- Payments: Dodo Payments
- Hosting: Vercel
- Database: Neon (Serverless Postgres)
- Storage: Vercel Blob
- CDN: Vercel Edge Network
- Node.js 18+ and npm
- PostgreSQL database (or Neon account)
- Clerk account for authentication
- API keys for AI providers
git clone https://github.com/Amit00008/mockli.git
cd mocklinpm installCreate a .env file in the root directory:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
# Database (Neon)
DATABASE_URL=postgresql://user:password@host/database?sslmode=require
# AI Providers
GROQ_API_KEY=your_groq_api_key
OPENAI_API_KEY=your_openai_api_key
# Inngest (Background Jobs)
INNGEST_EVENT_KEY=your_inngest_event_key
INNGEST_SIGNING_KEY=your_inngest_signing_key
# Vercel Blob Storage
BLOB_READ_WRITE_TOKEN=your_blob_token
# Payments (Dodo Payments)
NEXT_PUBLIC_DODO_CLIENT_ID=your_dodo_client_id
DODO_PAYMENTS_SECRET=your_dodo_secret
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Email (Resend)
RESEND_API_KEY=your_resend_api_key# Generate migrations
npm run db:gen
# Push schema to database
npm run db:push
# (Optional) Open Drizzle Studio to view/edit data
npm run db:studio
# (Optional) Seed database with sample data
npm run db:seednpm run devOpen http://localhost:3000 to see your app.
npm run inngest# Development
npm run dev # Start dev server
npm run build # Build for production
npm run start # Start production server
# Background Jobs
npm run inngest # Start Inngest dev server
# Database
npm run db:gen # Generate migrations
npm run db:push # Push schema changes to DB
npm run db:studio # Open Drizzle Studio
npm run db:seed # Seed database with sample data- Select company and role
- Choose difficulty level
- AI generates 30 unique questions
- 15-minute timed test
- Instant scoring and feedback
- View test history
- Track performance over time
- See credits and subscription status
- Quick access to new tests
- Detailed score breakdown
- AI-generated performance summary
- Downloadable certificate
- Share on social media
- Analytics dashboard
- Company management with logo uploads
- Role management
- User statistics
The app uses Drizzle ORM with PostgreSQL. Main tables:
Core Tables:
users- User accounts with credits and subscription statustests- Test records with questions, answers, and scorescompanies- Companies with logos (stored in Vercel Blob)roles- Job roles associated with companiessubscriptions- User subscription plans and expirationadmins- Admin user IDs for platform management
View full schema: lib/schema.ts
Mockli uses a multi-model fallback system:
- Groq gpt-oss-120b (Primary)
- Groq llama-3.1-8b (Fallback 1)
- Groq gpt-oss-20b (Fallback 2)
- OpenAI gpt-4o-mini (Final Fallback)
Questions are validated to ensure:
- Exactly 4 options per question
- Valid correctAnswer (0-3)
- Automatic conversion of letter answers (A-D) to numbers
- Fallback to safe defaults if validation fails
- Clerk - clerk.com - Authentication
- Groq - console.groq.com - AI Models
- OpenAI - platform.openai.com - Fallback AI
- Neon - neon.tech - Database
- Inngest - inngest.com - Background Jobs
- Vercel - vercel.com - Hosting & Blob Storage
- Dodo Payments - dodopayments.com - Payments
- Resend - resend.com - Email
- ✅ Free tier with 5 credits per week
- ✅ Premium plans (Standard: 50 credits, Premium: 200 credits)
- ✅ Practice for 50+ companies
- ✅ Multiple difficulty levels
- ✅ Instant AI feedback
- ✅ Performance tracking
- ✅ Downloadable certificates
- ✅ Report issues via email
- ✅ Analytics dashboard
- ✅ User statistics
- ✅ Company management with logo uploads
- ✅ Role management
- ✅ Test completion metrics
- Push your code to GitHub
- Import project in Vercel
- Add environment variables in Vercel dashboard
- Deploy
# Or use Vercel CLI
vercel --prodMake sure to add all variables from .env to your Vercel project settings.
-
Add Admin Users:
INSERT INTO admins (user_id) SELECT id FROM users WHERE email = 'your-email@example.com';
-
Configure Inngest:
- Set up webhook endpoint:
https://your-domain.com/api/inngest - Configure weekly credit refresh cron job
- Set up webhook endpoint:
-
Configure Dodo Payments:
- Add webhook URL:
https://your-domain.com/api/webhooks/dodo - Set return URL to your domain
- Add webhook URL:
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
- Built with Next.js
- UI components from shadcn/ui
- Authentication by Clerk
- AI models from Groq and OpenAI
- Background jobs by Inngest
- Payments by Dodo Payments
Try Mockli • Report Bug • Request Feature
Made with ❤️ by Amit
