An interactive AI-powered mock interview platform built with Next.js, Clerk authentication, and Neon PostgreSQL. Practice your interview skills with AI-generated questions tailored to your job position, experience level, and tech stack.
- π Secure Authentication - Clerk-powered sign-in/sign-up
- π€ AI Interview Generation - Dynamic interview questions generated based on job details
- πΎ Interview History - Save and review your mock interviews
- π Performance Tracking - Track your progress across multiple interview sessions
- π― Personalized Questions - Customized questions based on job role, tech stack, and experience
- β‘ Real-time Feedback - Instant feedback on your interview responses
- π¨ Modern UI - Responsive design with Tailwind CSS and Radix UI components
- Next.js 14 - React framework with App Router
- React 18 - UI library
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Unstyled, accessible component library
- Lucide React - Icon library
- Node.js - Runtime environment
- Clerk - Authentication & user management
- Neon - Serverless PostgreSQL database
- Drizzle ORM - Type-safe database ORM
- Hugging Face Inference API - AI model integration
- Google Gemini AI (optional) - Advanced interview generation
- Hugging Face Models - Alternative AI provider for question generation
- Node.js 18+ and npm
- Git
- Clerk account (free at https://clerk.com)
- Neon database account (free at https://neon.tech)
- Hugging Face account (free at https://huggingface.co) or Google AI Studio account
-
Clone the repository
git clone https://github.com/omdesale777/Ai-interview-mock.git cd Ai-interview-mock -
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile in the project root:# Clerk Authentication NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_YOUR_KEY CLERK_SECRET_KEY=sk_test_YOUR_KEY # Database NEXT_PUBLIC_DRIZZLE_DB_URL=postgresql://user:password@host/database # AI Model (choose one) NEXT_PUBLIC_GEMINI_API_KEY=AIzaSy_YOUR_KEY # For Google Gemini HUGGING_FACE_API_KEY=hf_YOUR_TOKEN # For Hugging Face # Interview Configuration NEXT_PUBLIC_INTERVIEW_QUESTION_COUNT=5
-
Set up database
npm run db:push
This creates the necessary tables in your Neon database.
-
Run the development server
npm run dev
-
Open your browser Visit http://localhost:3000
| Variable | Description | Get From |
|---|---|---|
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Clerk publishable key | Clerk Dashboard |
CLERK_SECRET_KEY |
Clerk secret key | Clerk Dashboard |
NEXT_PUBLIC_DRIZZLE_DB_URL |
PostgreSQL connection string | Neon Console |
HUGGING_FACE_API_KEY |
Hugging Face API token | HF Settings |
| Variable | Description | Default |
|---|---|---|
NEXT_PUBLIC_GEMINI_API_KEY |
Google Gemini API key | - |
NEXT_PUBLIC_INTERVIEW_QUESTION_COUNT |
Number of interview questions | 5 |
Ai-interview-mock/
βββ app/
β βββ (auth)/ # Authentication pages
β βββ dashboard/ # Dashboard & interview pages
β βββ layout.js # Root layout with Clerk provider
β βββ page.js # Home page
β βββ globals.css # Global styles
βββ components/
β βββ ui/ # Radix UI components
β βββ Header.jsx # Header component
βββ utils/
β βββ db.js # Database connection
β βββ schema.js # Database schema
β βββ MistralAIModal.js # Hugging Face AI integration
β βββ GeminiAIModal.js # Google Gemini integration (optional)
β βββ GeminiAIModal.js # AI utility functions
βββ middleware.js # Clerk middleware
βββ drizzle.config.js # Drizzle ORM configuration
βββ next.config.mjs # Next.js configuration
βββ package.json # Dependencies
βββ .env.local # Environment variables (not in repo)
# Development
npm run dev # Start dev server on localhost:3000
# Production
npm run build # Build for production
npm start # Start production server
# Database
npm run db:push # Push schema changes to database
npm run db:studio # Open Drizzle Studio UI
# Linting
npm run lint # Run ESLintStores mock interview sessions created by users.
{
id: number (PK)
mockId: string (unique)
jsonMockResp: string (JSON questions & answers)
jobPosition: string
jobDesc: string
jobExperience: string
createdBy: string (user email)
createdAt: string (date)
}Stores user responses and feedback for interview questions.
{
id: number (PK)
mockIdRef: string (FK to MockInterview)
question: string
correctAns: string
userAns: string
feedback: string
rating: string
userEmail: string
createdAt: string (date)
}- Go to Clerk Dashboard
- Create a new application
- Copy
Publishable KeyandSecret Key - Add to
.env.local - Go to Configure β Domains
- Add:
http://localhost:3000(development)- Your Vercel URL (production)
- Go to Neon Console
- Create a new project
- Copy the connection string (PostgreSQL)
- Add to
.env.localasNEXT_PUBLIC_DRIZZLE_DB_URL - Run
npm run db:pushto create tables
- Go to HF Settings
- Create a new token with "Read" access
- Copy the token
- Add to
.env.localasHUGGING_FACE_API_KEY
- Go to Google AI Studio
- Create API Key
- Copy the key
- Add to
.env.localasNEXT_PUBLIC_GEMINI_API_KEY
-
Push to GitHub (if not already done)
git add . git commit -m "Ready for deployment" git push origin main
-
Connect to Vercel
- Go to Vercel
- Click "New Project"
- Import your GitHub repository
- Click "Import"
-
Add Environment Variables
- In Vercel project settings β "Environment Variables"
- Add all variables from
.env.local:NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYNEXT_PUBLIC_DRIZZLE_DB_URLHUGGING_FACE_API_KEYNEXT_PUBLIC_INTERVIEW_QUESTION_COUNT
-
Update Clerk Domains
- Go to Clerk Dashboard
- Add your Vercel URL to Configure β Domains
- Format:
https://your-project.vercel.app
-
Deploy
- Click "Deploy"
- Wait for build to complete
- Visit your live URL! π
- Verify
NEXT_PUBLIC_DRIZZLE_DB_URLis correct - Check Neon database is active
- Run
npm run db:pushagain
- Verify keys in
.env.local - Check authorized domains in Clerk dashboard
- Hard refresh browser (Ctrl+Shift+R)
- Check API key is correct
- Verify API is enabled in respective service
- Check rate limits (especially for free tiers)
- Try alternative AI provider (Mistral or Gemini)
- Restart dev server:
Ctrl+Cthennpm run dev - Ensure
.env.localis in project root - Check for typos in variable names
- Fork the repository
- Create a feature branch:
git checkout -b feature/YourFeature - Commit changes:
git commit -m 'Add YourFeature' - Push to branch:
git push origin feature/YourFeature - Open a Pull Request
- Speech-to-text for spoken answers
- Video recording of interviews
- Advanced performance analytics
- Interview difficulty levels
- Resume integration
- Mobile app
- Interview sharing & collaboration
- Custom interview templates
- Interview scheduling reminders
This project is open source and available under the MIT License.
For issues, questions, or feature requests:
- Open an issue on GitHub
- Check existing documentation
- Review troubleshooting section
- Initial release
- Clerk authentication
- Neon database integration
- Drizzle ORM setup
- AI interview generation (Gemini & Hugging Face)
- User interview history
- Dashboard functionality
- Danny (Om Desale) - Initial development
- Contributors welcome!
Built with β€οΈ for interview preparation
Visit the live app: AI Interview Mock