An enterprise-grade, production-ready AI application designed to analyze resumes, generate tailored preparation roadmaps, and conduct live, voice-enabled technical mock interviews with adaptive difficulty and real-time delivery analytics.
Frontend Architecture
Backend & API
Database & Caching
AI & Security
π Experience the Live Application Here
Upload your resume (PDF) and target job description. The AI parses the data to calculate match scores and skill gaps.
Generates a highly tailored, interactive preparation roadmap based on your exact skill gaps. Includes customized technical and behavioural questions to guide your preparation.
Practice under pressure. The AI generates a custom mix of questions, reads them aloud using native Web Speech Synthesis, and allows you to dictate your answers seamlessly without touching your keyboard.
Once the interview concludes, receive an instant grade (out of 10) on your verbal answers, complete with actionable feedback and a comprehensive scorecard.
Track your progress over time. View all past mock interviews and generated strategies, alongside custom performance metrics charted dynamically using SVGs.
Features a robust, cookie-based JWT authentication flow with an enterprise-grade password recovery system.
- User requests a password reset.
- A cryptographic 6-digit OTP is generated and sent via Resend HTTP API (bypassing strict cloud SMTP firewalls).
- The OTP is cached in Redis with a strict 5-minute Time-To-Live (TTL).
- Backend verifies the user's input against the Redis cache in milliseconds.
- π‘οΈ End-to-End TypeScript Migration: The entire codebase has been converted to TypeScript, providing compile-time type-safety across all components, API schemas, Express requests, and database models.
- π― Zod Schema Validation & Helmet: Strict HTTP request body schema checks using Zod and secure response header configuration with Helmet to defend against XSS and clickjacking.
- β‘ Redis AI Caching: Integrates Upstash Redis caching for expensive AI generation calls, drastically reducing mock session latency and cost.
-
π§ Adaptive AI Questioning: Rather than reading a static list of questions, the mock arena fetches questions dynamically from
/api/interview/mock/next-question. The AI automatically selects a harder question if the candidate scores$\ge 7$ , or a foundational/easier question if they score$< 5$ . - ποΈ Live Audio Pacing & Delivery Analytics: Features real-time Web Audio API voice visualizers, WPM pace tracking, filler word detection, hesitation calculations, and candidate confidence metrics.
- π£οΈ Voice-Enabled Arena & Interruption Handler: Uses native Speech Recognition and Speech Synthesis. Utterances are automatically canceled immediately if the user starts speaking over the AI voice.
-
π Automated PDF Generation: Uses
puppeteerto dynamically render AI-generated strategies into downloadable PDFs.
[ Frontend (React 19 + TypeScript + Vite) ]
β (Axios + Credentials)
βΌ
[ Backend (Express + TypeScript) ] βββΆ [ Redis Cache ] (Upstash Session Cache)
β
βββΆ [ MongoDB Atlas ] (Persistent Profiles & Interview History)
β
βββΆ [ Resend API ] (Secure SMTP Email Delivery)
β
βββΆ [ Puppeteer ] (Headless PDF Rendering)
β
βΌ
[ Google Gemini 2.5 Flash SDK ] (Adaptive Questioning & Response Grading)
Interview-AI/
βββ frontend/
β βββ public/
β βββ src/
β β βββ App.tsx
β β βββ app.routes.tsx
β β βββ features/
β β β βββ auth/
β β β β βββ auth.context.tsx
β β β β βββ services/auth.api.ts
β β β β βββ pages/
β β β βββ interview/
β β β βββ components/MockAnalytics.tsx
β β β βββ hooks/useInterview.ts
β β β βββ pages/Home.tsx
β β β βββ pages/Interview.tsx
β β β βββ pages/MockInterviewArena.tsx
β β β βββ pages/MockInterviewResult.tsx
β β β βββ services/interview.api.ts
β β βββ main.tsx
β β βββ style/
β βββ index.html
β βββ tsconfig.json
β βββ vite.config.js
βββ backend/
β βββ src/
β β βββ config/
β β β βββ database.ts
β β β βββ redis.ts
β β βββ controllers/
β β β βββ auth.controller.ts
β β β βββ interview.controller.ts
β β βββ middlewares/
β β β βββ auth.middleware.ts
β β β βββ file.middleware.ts
β β β βββ rateLimit.middleware.ts
β β βββ models/
β β β βββ interviewReport.model.ts
β β β βββ mockInterview.model.ts
β β β βββ user.model.ts
β β βββ routes/
β β β βββ auth.routes.ts
β β β βββ interview.routes.ts
β β βββ services/
β β β βββ ai.service.ts
β β βββ utils/
β β β βββ sendEmail.ts
β β βββ app.ts
β β βββ server.ts
β βββ tsconfig.json
β βββ package.json
βββ screenshots/
Prerequisites: Node.js (v18+), MongoDB (Local or Atlas), and Redis (running on port 6379).
1. Clone the repository
git clone https://github.com/Aakarsh2007/Interview-AI.git2. Backend Setup
cd backend
npm installCreate a .env file in the backend directory:
PORT=3000
MONGODB_URI=mongodb://127.0.0.1:27017/interview_ai
REDIS_URL=redis://127.0.0.1:6379
JWT_SECRET=your_super_secret_jwt_string
ACCESS_TOKEN_SECRET=your_access_secret
REFRESH_TOKEN_SECRET=your_refresh_secret
GOOGLE_GENAI_API_KEY=your_google_gemini_api_key
RESEND_API_KEY=your_resend_api_key
FRONTEND_URL=http://localhost:5173Start the backend server:
npm run dev3. Frontend Setup Open a new terminal window:
cd frontend
npm install
npm run devNavigate to http://localhost:5173 in your browser.
Deploying a multi-service setup requiring Redis caching and Puppeteer PDF generation needs careful environment and database setup. Here is how to configure it in production:
- MongoDB: Create a free cluster on MongoDB Atlas. Whitelist all connection IPs (
0.0.0.0/0) and copy your connection string. - Redis: Provision a secure serverless database on Upstash Redis. Copy the TLS-enabled connection string (
rediss://...).
Since the backend uses Puppeteer for PDF generation, Railway is highly recommended as it handles headless Chrome dependencies automatically via Nixpacks.
- Log in to Railway.
- Click New Project
$\rightarrow$ Deploy from GitHub repo and selectInterview-AI. - In settings, configure the Root Directory as
backend. - Under the Variables tab, add the following production variables:
PORT=3000 MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.mongodb.net/prod REDIS_URL=rediss://default:<password>@<upstash-endpoint>.upstash.io:6379 JWT_SECRET=production_random_jwt_hash_string ACCESS_TOKEN_SECRET=production_access_token_secret REFRESH_TOKEN_SECRET=production_refresh_token_secret GOOGLE_GENAI_API_KEY=your_production_gemini_api_key RESEND_API_KEY=your_production_resend_api_key FRONTEND_URL=https://your-frontend-domain.vercel.app
- Log in to Vercel.
- Click Add New
$\rightarrow$ Project, link your GitHub account, and select theInterview-AIrepository. - Configure the Root Directory to
frontend. - Keep the Framework Preset as Vite.
- Add the following Environment Variable:
-
VITE_API_BASE_URL=https://your-backend-api.up.railway.app(Your live backend endpoint).
-
- Click Deploy. Vercel automatically compiles your TypeScript application and hosts the static bundle on their global Edge CDN.
Aakarsh Saxena
Aspiring AI Engineer & Full Stack Developer
B.Tech in Information Technology | IIIT Lucknow
If you found this project helpful or inspiring, please consider leaving a β on the repository!











