Skip to content

Latest commit

Β 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Interview-AI: Intelligent Strategy & Mock Interview Platform

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
React TypeScript Vite

Backend & API
Node.js TypeScript Express

Database & Caching
MongoDB Redis

AI & Security
Gemini Zod Helmet JWT


🌐 Live Demo

πŸ”— Experience the Live Application Here


πŸ“Έ Application Preview

πŸ–₯ The Command Center (Dashboard)

Upload your resume (PDF) and target job description. The AI parses the data to calculate match scores and skill gaps.

Main Dashboard

πŸ—ΊοΈ AI Strategy, Roadmap & Preparation Questions

Generates a highly tailored, interactive preparation roadmap based on your exact skill gaps. Includes customized technical and behavioural questions to guide your preparation.

Interactive Roadmap

Technical Questions Behavioural Questions

πŸŽ™οΈ Live AI Mock Interview Arena (Voice-Enabled)

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.

Mock Arena

πŸ“Š Instant AI Grading & Detailed Reports

Once the interview concludes, receive an instant grade (out of 10) on your verbal answers, complete with actionable feedback and a comprehensive scorecard.

Strategy Report

Mock Feedback

πŸ“œ Persistent History & SVG Analytics

Track your progress over time. View all past mock interviews and generated strategies, alongside custom performance metrics charted dynamically using SVGs.

Interview History


πŸ” Secure Authentication Architecture

Features a robust, cookie-based JWT authentication flow with an enterprise-grade password recovery system.

Login Register OTP Verification Reset Password

πŸ”„ Advanced Password Reset Flow (Redis + Resend API)

  1. User requests a password reset.
  2. A cryptographic 6-digit OTP is generated and sent via Resend HTTP API (bypassing strict cloud SMTP firewalls).
  3. The OTP is cached in Redis with a strict 5-minute Time-To-Live (TTL).
  4. Backend verifies the user's input against the Redis cache in milliseconds.

✨ Standout Elite Features

  • πŸ›‘οΈ 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 puppeteer to dynamically render AI-generated strategies into downloadable PDFs.

πŸ— System Architecture

[ 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)

πŸ“‚ Project Structure

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/

βš™οΈ Local Installation & Setup

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.git

2. Backend Setup

cd backend
npm install

Create 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:5173

Start the backend server:

npm run dev

3. Frontend Setup Open a new terminal window:

cd frontend
npm install
npm run dev

Navigate to http://localhost:5173 in your browser.


πŸš€ Step-by-Step Production Deployment Guide

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:

1. Database Provisioning

  • 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://...).

2. Backend API Deployment on Railway

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 select Interview-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

3. Frontend Deployment on Vercel

  • Log in to Vercel.
  • Click Add New $\rightarrow$ Project, link your GitHub account, and select the Interview-AI repository.
  • 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.

πŸ‘¨β€πŸ’» Author

Aakarsh Saxena
Aspiring AI Engineer & Full Stack Developer
B.Tech in Information Technology | IIIT Lucknow


⭐ Support

If you found this project helpful or inspiring, please consider leaving a ⭐ on the repository!

Releases

Packages

Contributors

Languages