Interview AI is a comprehensive web application designed to help job candidates prepare for interviews by analyzing target job descriptions and aligning them with the candidate's unique profile (extracted from a resume PDF/DOCX or self-description).
By leveraging the cutting-edge Google Gemini AI (via the Google GenAI SDK), the application assesses profile alignment, identifies key skill gaps, generates custom technical and behavioral questions (with model answers), outputs a personalized preparation road map, and exports an ATS-friendly, single-page resume tailored directly to the target role.
- Secure Authentication: Fully functional authentication system powered by JSON Web Tokens (JWT) with HTTP-only cookies, password hashing (bcryptjs), and token blacklisting for secure logouts.
- Custom Interview Strategy Generation:
- Match Score: Assessment of candidate fit (0-100%) against the job requirements.
- Skill Gap Analysis: Identifies missing skills categorized by severity (Low, Medium, High).
- Curated Question Bank: Personalized Technical and Behavioral questions, including interviewer intentions and professional model answers.
- Interactive Preparation Roadmap: A day-wise study schedule customized to the target position and candidate timeline.
- ATS-Optimized Resume Tailoring: Generates a single-page resume tailored for the job, downloadable as a PDF using dynamic HTML-to-PDF compilation.
- Responsive, Premium UI/UX: Crafted using modern SCSS structures with high-fidelity visual panels, interactive accordions, and glassmorphism elements.
- Core: React 19, JavaScript (ES6+)
- Build Tool: Vite (Lightning fast compilation & HMR)
- Routing: React Router 7 (Declarative route configurations)
- HTTP Client: Axios (configured with credentials and baseURL)
- Styling: Sass / SCSS (modular styles, variable design tokens)
- Runtime: Node.js
- Framework: Express
- Database: MongoDB & Mongoose (Object Data Modeling)
- Security & Auth: JWT (jsonwebtoken), Cookie Parser, Bcrypt.js
- File Uploads: Multer (In-memory storage for secure, quick file handling)
- PDF Parsing: pdf-parse v2 (Pure JS engine to extract clean text from candidate resumes)
- AI Integration: Google GenAI SDK (
@google/genai) using thegemini-3-flash-previewmodel - PDF Compilation: html-pdf (Dynamic HTML to PDF buffer conversion)
interview-ai/
βββ Backend/
β βββ src/
β β βββ config/ # DB connection configuration
β β βββ controllers/ # Express route controllers (Auth, Interview)
β β βββ middlewares/ # Authentication, File uploading middlewares
β β βββ models/ # Mongoose DB schemas (User, InterviewReport, Blacklist)
β β βββ routes/ # Router declarations
β β βββ services/ # External integration layers (Google GenAI, PDF compiling)
β β βββ app.js # Core app bootstrapping, CORS, and cookie parser
β βββ .env # Backend environment variables
β βββ server.js # Entry point of the server
β βββ package.json # Node.js dependencies and scripts
β
βββ Frontend/
β βββ src/
β β βββ features/
β β β βββ auth/ # Login/Signup forms, hooks, auth providers
β β β βββ interview/ # Dashboard, Reports, Hooks, and API integrations
β β βββ style/ # Global variables, mixins, and SCSS modules
β β βββ App.jsx # Main view component
β β βββ app.routes.jsx # Page routes configuration
β β βββ main.jsx # React root mount script
β βββ .env # Frontend environment variables
β βββ index.html # Core entry HTML
β βββ vite.config.js # Vite config specifications
β βββ package.json # React project dependencies
β
βββ README.md # This project manual
| Method | Endpoint | Access | Description | Request Body |
|---|---|---|---|---|
POST |
/register |
Public | Registers a new user account | { username, email, password } |
POST |
/login |
Public | Authenticates user, stores JWT in Cookie | { email, password } |
GET |
/logout |
Public | Clears JWT cookie, blacklists the token | None |
GET |
/get-me |
Private | Retrieves current logged-in user details | None (resolves from Cookie) |
| Method | Endpoint | Access | Description | Request Details |
|---|---|---|---|---|
POST |
/ |
Private | Generates a new interview preparation report | Form-data: jobDescription (text), selfDescription (text), resume (file) |
GET |
/ |
Private | Retrieves metadata of all generated plans | None (sorted by latest) |
GET |
/report/:interviewId |
Private | Retrieves a specific plan's details | URL Param: interviewId |
POST |
/resume/pdf/:interviewReportId |
Private | Tailors and generates a single page resume PDF | URL Param: interviewReportId |
The app integrates with Gemini through structured JSON Schema generation via zod-to-json-schema.
// Example validation schema configured in ai.service.js
const interviewReportSchema = z.object({
matchScore: z.number().describe("Score between 0 and 100 on job alignment"),
technicalQuestions: z.array(z.object({
question: z.string(),
intention: z.string(),
answer: z.string()
})),
behavioralQuestions: z.array(z.object({
question: z.string(),
intention: z.string(),
answer: z.string()
})),
skillGaps: z.array(z.object({
skill: z.string(),
severity: z.enum(["low", "medium", "high"])
})),
preparationPlan: z.array(z.object({
day: z.number(),
focus: z.string(),
tasks: z.array(z.string())
})),
title: z.string().describe("Job title for the interview report")
});The system sends context variables (Job Description, Resume content, Self-Description) to gemini-3-flash-preview, returning structured JSON matching this schema, guaranteeing reliable client-side rendering.
- Node.js (LTS version >= 20.x is recommended)
- MongoDB Instance (MongoDB Atlas or Local MongoDB Community Server)
- Google Gemini API Key (Generate one at Google AI Studio)
# Clone the repository
git clone <repository-url>
cd interview-ai
# Install Backend Dependencies
cd Backend
npm install
# Install Frontend Dependencies
cd ../Frontend
npm installCreate a .env file in the Backend folder:
PORT=3000
MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/interview-master
JWT_SECRET=your_jwt_secret_hash_key
GOOGLE_GENAI_API_KEY=your_gemini_api_keyCreate a .env file in the Frontend folder:
VITE_API_URL=http://localhost:3000Open two terminals and run:
Terminal 1 (Backend Server)
cd Backend
npm run devTerminal 2 (Frontend Application)
cd Frontend
npm run devYour browser should open http://localhost:5173/, where you can register and start building preparation roadmaps.
If you encounter a 429 Rate Limit or RESOURCE_EXHAUSTED error during generation, it means your Gemini API key has exceeded the free daily tier limit (currently 20 requests/day for gemini-3-flash-preview). Consider switching to a pay-as-you-go key or setting up retry mechanisms.
This project uses the modern TS-based pdf-parse v2 library. To instantiate and parse files cleanly without memory leaks, remember to always destroy the parser instance:
const parser = new pdfParse.PDFParse({ data: Uint8Array.from(fileBuffer) });
const resumeContent = await parser.getText();
await parser.destroy(); // Always call destroy to release PDFJS memory structures!html-pdf uses PhantomJS to compile resumes. Make sure your runtime environment (e.g., Linux on Render) has standard font configurations and library utilities installed, or configure puppeteer as an alternative PDF engine if PhantomJS faces compatibility blocks.