InterviewAI is a modern, end-to-end mock interview platform that simulates realistic technical and HR interviews with interactive video avatars, speech synthesis, live speech-to-text recognition, and instant multi-metric AI evaluations.
- Upload your resume in PDF format.
- Uses
pdfjs-distand AI extraction to identify your target role, years of experience, key projects, and skills. - Tailors interview questions strictly around your actual background and chosen mode (Technical or HR).
- Animated Interviewer Avatars: Switch seamlessly between female and male interviewer video personas.
- Speech Synthesis (TTS): Realistic audio playback of questions synchronized with interviewer video states.
- Voice Recognition (STT): Speak naturally into your microphone using the Web Speech API with real-time speech-to-text transcription.
- Manual Microphone Controls: Toggle mic recording anytime or review and edit transcribed responses before submitting.
- Progressive difficulty curve designed to test depth of knowledge:
- Q1 β Q2: Easy (60 seconds)
- Q3 β Q4: Medium (90 seconds)
- Q5: Hard (120 seconds)
- Real-time countdown timer with automatic answer submission when time expires.
- Every answer is evaluated on a 0 to 10 scale across three core competencies:
- π― Correctness: Accuracy, depth, and relevance to the question.
- π£οΈ Communication: Clarity, phrasing, and articulation.
- β‘ Confidence: Delivery, poise, and structured thought.
- Concise, actionable feedback (10β15 words) just like a human interviewer.
- Dynamic performance breakdown with interactive Recharts area charts and circular score rings.
- Download an official, formatted PDF Performance Report generated on-the-fly using
jspdfandjspdf-autotable.
- New users receive 100 Free Credits on signup (each 5-question interview consumes 50 credits).
- Integrated Razorpay payment gateway with secure server-side HMAC-SHA256 signature verification.
- Free Tier: 100 Credits (2 Full Interviews)
- Starter Pack: βΉ100 for 150 Credits
- Pro Pack: βΉ500 for 650 Credits (Best Value)
- Instant one-click Google OAuth powered by Firebase.
- HTTP-only JWT session cookies with secure same-site policies.
flowchart TD
User([Candidate]) -->|Google Sign-In| Auth[Firebase Auth & JWT Session]
User -->|Upload PDF Resume| Upload[Multer & pdfjs-dist Text Extraction]
Upload -->|Extracted Profile + Role + Mode| AI_Gen[Groq LLM: openai/gpt-oss-120b]
AI_Gen -->|Generates 5 Tailored Questions| Session[Interactive Interview Stage]
subgraph Interview Stage
Session -->|SpeechSynthesis| AudioOut[Interviewer Avatar Video & Voice]
User -->|Microphone Voice Input| STT[Web Speech API Recognition]
STT -->|Transcribed Answer + Timer Check| SubmitAnswer[Submit Answer]
end
SubmitAnswer -->|Evaluate Answer| AI_Eval[AI Metric Evaluation: Confidence, Communication, Correctness]
AI_Eval -->|Save Feedback & Scores| DB[(MongoDB)]
DB -->|All 5 Answered| Report[Performance Scorecard & Recharts Analytics]
Report -->|Export Report| PDF[Downloadable PDF jsPDF]
User -->|Recharge Credits| Razorpay[Razorpay Payment Gateway]
Razorpay -->|HMAC Verification| Credits[Add User Credits]
- Framework: React 19 + Vite 7
- Styling: Tailwind CSS v4
- Animations: Motion (Framer Motion)
- State Management: Redux Toolkit (
@reduxjs/toolkit,react-redux) - Routing: React Router v7
- Data Visualization: Recharts & react-circular-progressbar
- PDF Generation: jsPDF & jspdf-autotable
- Auth & Icons: Firebase Auth,
react-icons
- Runtime & Framework: Node.js (ES Modules) + Express 5
- Database: MongoDB via Mongoose 9
- AI Engine: Groq Cloud (
openai/gpt-oss-120b) - PDF Parsing:
pdfjs-dist - File Handling:
multer - Payments:
razorpayNode SDK + Node.jscrypto - Security & Sessions:
jsonwebtoken(JWT),cookie-parser,cors,dotenv
InterviewAI/
βββ client/ # Frontend Vite + React application
β βββ public/ # Static assets
β βββ src/
β β βββ assets/ # Images, icons, and interviewer avatar videos
β β β βββ videos/ # male-ai.mp4, female-ai.mp4
β β β βββ ...
β β βββ components/ # Reusable React components
β β β βββ AuthModel.jsx # Google login dialog modal
β β β βββ Footer.jsx # Application footer
β β β βββ Navbar.jsx # Navigation bar with credits display
β β β βββ Step1SetUp.jsx # Resume upload & interview configuration
β β β βββ Step2Interview.jsx # Active video/voice interview room
β β β βββ Step3Report.jsx # Scorecard & PDF download view
β β β βββ Timer.jsx # Per-question countdown timer
β β βββ pages/ # Primary route views
β β β βββ Auth.jsx # Authentication page
β β β βββ Home.jsx # Landing page with feature showcases
β β β βββ InterviewHistory.jsx # Past interviews listing
β β β βββ InterviewPage.jsx # Orchestrator for Steps 1, 2, and 3
β β β βββ InterviewReport.jsx # Dedicated report permalink
β β β βββ Pricing.jsx # Credit packages & Razorpay checkout
β β βββ redux/ # Redux slices and store configuration
β β βββ utils/ # Firebase initialization
β β βββ App.jsx # Route definitions & user session bootstrapper
β β βββ main.jsx # React root mount
β β βββ index.css # Global Tailwind imports
β βββ .env.example # Sample client environment variables
β βββ package.json
β βββ vite.config.js
β
βββ server/ # Backend Express REST API
β βββ config/
β β βββ connectDb.js # MongoDB connection handler
β β βββ token.js # JWT signing helper
β βββ controllers/
β β βββ auth.controller.js # Google login & logout
β β βββ interview.controller.js # Resume parsing, Q-gen, scoring, reports
β β βββ payment.controller.js # Razorpay order create & verify
β β βββ user.controller.js # Current user profile endpoint
β βββ middlewares/
β β βββ isAuth.js # JWT authentication guard
β β βββ multer.js # Disk storage for PDF resumes
β βββ models/
β β βββ interview.model.js # Interview schema with embedded questions
β β βββ payment.model.js # Order & transaction records
β β βββ user.model.js # User account & credit balance
β βββ routes/
β β βββ auth.route.js # /api/auth
β β βββ interview.route.js # /api/interview
β β βββ payment.route.js # /api/payment
β β βββ user.route.js # /api/user
β βββ services/
β β βββ openRouter.service.js # Groq AI chat completion client
β β βββ razorpay.service.js # Razorpay client instance
β βββ index.js # Express server entry point
β βββ .env.example # Sample server environment variables
β βββ package.json
β
βββ .gitignore
βββ README.md
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/auth/google |
Sign in or register via Google credential, returns user and sets cookie | No |
GET |
/api/auth/logout |
Clear session authentication cookie | No |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/user/current-user |
Fetch currently logged-in user profile & credits | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/interview/resume |
Upload PDF resume (multipart/form-data) and extract skills/projects |
Yes |
POST |
/api/interview/generate-questions |
Generate 5 role-tailored questions (Costs 50 credits) | Yes |
POST |
/api/interview/submit-answer |
Submit answer for evaluation (Scores correctness, confidence, communication) | Yes |
POST |
/api/interview/finish |
Finalize interview and calculate weighted aggregate scores | Yes |
GET |
/api/interview/get-interview |
List all historical interviews for current user | Yes |
GET |
/api/interview/report/:id |
Fetch detailed report breakdown for a specific interview ID | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/payment/create-order |
Create a Razorpay payment order for selected credit pack | Yes |
POST |
/api/payment/verify-payment |
Verify HMAC-SHA256 signature and credit the user account | Yes |
Make sure you have installed:
- Node.js (v18.x or higher)
- npm or
pnpm/yarn - MongoDB (local or MongoDB Atlas connection string)
- Accounts/Keys for:
- Groq Console (API Key)
- Razorpay Dashboard (Test Key & Secret)
- Firebase Console (Google Authentication setup)
git clone https://github.com/your-username/InterviewAI.git
cd InterviewAINavigate to the server directory:
cd server
npm installCreate a .env file based on .env.example:
cp .env.example .envFill in your server credentials:
PORT=6000
MONGODB_URL=mongodb+srv://<username>:<password>@cluster0.mongodb.net/interviewai
JWT_SECRET=your_super_secret_jwt_key
GROQ_API_KEY=gsk_your_groq_api_key_here
RAZORPAY_KEY_ID=rzp_test_your_key_id
RAZORPAY_KEY_SECRET=your_razorpay_secretStart the backend server:
npm run dev
# Server will listen on http://localhost:6000Open a new terminal and navigate to the client directory:
cd client
npm installCreate a .env file based on .env.example:
cp .env.example .envFill in your frontend credentials:
VITE_FIREBASE_APIKEY=your_firebase_web_api_key
VITE_RAZORPAY_KEY_ID=rzp_test_your_key_idNote on Backend URL: If running locally, check
client/src/App.jsxand ensureServerUrlpoints tohttp://localhost:6000(or your active deployed backend URL).
Start the Vite development server:
npm run dev
# Application will run on http://localhost:5173| Variable | Description |
|---|---|
PORT |
Port number the backend server runs on (Default: 6000) |
MONGODB_URL |
MongoDB connection URI string |
JWT_SECRET |
Secret key used to sign and verify JWT authentication tokens |
GROQ_API_KEY |
Groq API key for LLM question generation & answer grading |
RAZORPAY_KEY_ID |
Razorpay Key ID for processing payments |
RAZORPAY_KEY_SECRET |
Razorpay Key Secret for cryptographic payment verification |
| Variable | Description |
|---|---|
VITE_FIREBASE_APIKEY |
Firebase API Key for Google OAuth authentication |
VITE_RAZORPAY_KEY_ID |
Razorpay Public Key ID passed to the checkout modal |
This project is licensed under the ISC License. Feel free to fork, adapt, and build upon it!