Table of Contents
PrepBot is an advanced AI-driven mock interview platform designed to help candidates prepare for real-world job interviews. Leveraging the power of Google's Gemini API, PrepBot generates dynamic, role-specific questions and provides detailed, AI-powered feedback on performance.
The platform supports 100+ unique role-based sessions, featuring real-time video, text-to-speech capabilities, and adaptive difficulty scaling to create a personalized and rigorous interview environment.
-
🧠 AI-Powered Intelligence Integrated Google Gemini API to dynamically generate context-aware interview questions and deliver detailed performance analysis with improvement recommendations.
-
🎯 Role-Based Sessions Supports over 100 unique roles, tailoring the interview context and technical depth to the specific job description selected by the user.
-
📹 Real-Time Interaction Features real-time video processing and text-to-speech functionality to simulate a realistic face-to-face interview experience.
-
⚖️ Adaptive Difficulty The system automatically scales the difficulty of questions based on the candidate's responses, ensuring a personalized learning curve.
-
🔐 Secure Authentication Implemented Clerk for robust and secure user authentication and session management.
-
💾 Scalable Data Architecture Designed with Drizzle ORM and PostgreSQL, capable of managing interview data and history for 200+ users efficiently.
graph TD
subgraph Client
User[User / Candidate]
Browser[Next.js Frontend]
end
subgraph AI Services
Gemini[Google Gemini API]
end
subgraph Backend Services
Clerk[Clerk Auth]
DB[PostgreSQL Database]
end
User -->|Start Session| Browser
Browser -->|Auth Request| Clerk
Browser -->|Fetch Questions| Gemini
Gemini -->|Generated Content| Browser
Browser -->|Save Progress| DB
Browser -->|Submit Answer| Gemini
Gemini -->|Feedback & Rating| Browser
PrepBot utilizes Next.js Server Actions and API routes. Key endpoints include:
| Endpoint | Method | Description |
|---|---|---|
/api/generate-questions |
POST |
Generates interview questions based on role & difficulty using Gemini. |
/api/submit-answer |
POST |
Analyzes user answer (audio/text) and returns feedback. |
/api/save-result |
POST |
Saves the interview session data to PostgreSQL via Drizzle. |
/api/user/history |
GET |
Retrieves past interview performance for the logged-in user. |
Follow these steps to set up the project locally.
- Node.js (v18+)
- PostgreSQL Database (e.g., NeonDB, Supabase, or Local)
- Clerk Account (for Auth keys)
- Google Cloud Console (for Gemini API Key)
- Clone the repository
git clone [https://github.com/priyanshubh/PrepBot.git](https://github.com/priyanshubh/PrepBot.git)
cd PrepBot
- Install dependencies
npm install
# or
yarn install
- Environment Variables
Create a
.env.localfile and add the following:
# Database
DATABASE_URL=postgresql://user:password@host:port/db
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
# Google Gemini AI
NEXT_PUBLIC_GEMINI_API_KEY=your_gemini_api_key
- Database Migration (Drizzle)
npm run db:push
# or
npx drizzle-kit push:pg
- Run the application
npm run dev
Contributions are welcome!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/NewFeature) - Commit your Changes (
git commit -m 'Add NewFeature') - Push to the Branch (
git push origin feature/NewFeature) - Open a Pull Request
Built with ❤️ by Priyanshu Bharti
