π Live Demo: https://interview-ai-zeta-beryl.vercel.app/
Interview AI analyzes job descriptions against your resume or self-description using Google Gemini 2.5 Flash to generate a personalized interview preparation strategy β complete with tailored questions, skill-gap analysis, a day-by-day study plan, and an AI-generated, ATS-friendly resume PDF.
Features Β· Quick Start Β· API Reference Β· Architecture Β· Contributing
| Feature | Description |
|---|---|
| π€ AI Interview Reports | Upload your resume (PDF) or write a quick self-description, paste a job description, and get a comprehensive interview preparation report powered by Gemini 2.5 Flash. |
| π Match Score | Get a 0β100 compatibility score showing how well your profile aligns with the target role. |
| π‘ Technical & Behavioral Q&A | Receive curated interview questions with the interviewer's intent behind each question and a detailed suggested answer strategy. |
| π Skill Gap Analysis | Identify missing skills rated by severity (low / medium / high) so you know exactly where to focus. |
| π Day-by-Day Preparation Plan | A structured, multi-day study roadmap with daily focus areas and actionable tasks. |
| π AI-Generated Resume PDF | Generate a tailored, ATS-friendly resume PDF customized for the specific job description β downloadable in one click. |
| π Secure Authentication | Full JWT-based auth flow with registration, login, logout, and token blacklisting for secure sessions. |
| π Report History | All generated reports are saved to your account β revisit any past interview plan anytime. |
| Technology | Purpose |
|---|---|
| React 19 | UI library with hooks & context for state management |
| React Router 7 | Client-side routing with protected routes |
| Vite 8 | Lightning-fast dev server and build tool |
| SCSS (Sass) | Modular, feature-scoped styling |
| Technology | Purpose |
|---|---|
| Express 5 | HTTP server and REST API framework |
| MongoDB + Mongoose 9 | NoSQL database with schema validation |
| Google GenAI SDK | Gemini 2.5 Flash for AI-powered content generation |
| Zod | Runtime schema validation with JSON schema conversion |
| JWT + bcryptjs | Authentication and password hashing |
| Multer | Multipart file upload handling (resume PDFs) |
| pdf-parse | Extract text content from uploaded PDF resumes |
| Puppeteer | Server-side HTML β PDF rendering for resume generation |
- Node.js v18 or higher
- npm v9 or higher
- MongoDB Atlas account (or a local MongoDB instance)
- Google AI API Key β Get one here
git clone https://github.com/<your-username>/interview-ai.git
cd interview-aicd Backend
npm installCreate a .env file in the Backend/ directory (use .env.example as reference):
# MongoDB connection string
MONGO_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<database>
# JWT secret key (generate a strong random string)
JWT_SECRET=your_jwt_secret_here
# Google Gemini API key
GOOGLE_GENAI_API_KEY=your_google_genai_api_key_hereStart the backend dev server:
npm run devThe API server starts on http://localhost:3000.
cd Frontend
npm install
npm run devThe frontend dev server starts on http://localhost:5173.
Navigate to http://localhost:5173 in your browser β you're all set! π
interview-ai/
βββ Backend/
β βββ server.js # Entry point β loads env, connects DB, starts Express
β βββ .env.example # Template for environment variables
β βββ package.json
β βββ src/
β βββ app.js # Express app setup (CORS, routes, middleware)
β βββ config/
β β βββ database.js # MongoDB connection via Mongoose
β βββ controllers/
β β βββ auth.controller.js # Register, login, logout, get-me handlers
β β βββ interview.controller.js # Generate report, get reports, resume PDF
β βββ middlewares/
β β βββ auth.middleware.js # JWT verification & token blacklist check
β β βββ file.middleware.js # Multer config for file uploads
β βββ models/
β β βββ user.model.js # User schema (username, email, password)
β β βββ blacklist.model.js # Blacklisted JWT tokens
β β βββ interviewReport.model.js # Full interview report schema
β βββ routes/
β β βββ auth.routes.js # /api/auth/* endpoints
β β βββ interview.routes.js # /api/interview/* endpoints
β βββ services/
β βββ ai.service.js # Gemini AI integration & PDF generation
β
βββ Frontend/
β βββ index.html # HTML entry point
β βββ vite.config.js # Vite configuration
β βββ package.json
β βββ src/
β βββ main.jsx # React DOM root
β βββ App.jsx # App shell with providers
β βββ app.routes.jsx # Route definitions (public + protected)
β βββ style.scss # Global SCSS styles
β βββ index.css # Base CSS reset / tokens
β βββ features/
β βββ auth/
β β βββ auth.context.jsx # Auth context provider
β β βββ auth.form.scss # Auth form styles
β β βββ components/
β β β βββ Protected.jsx # Route guard component
β β βββ hooks/
β β β βββ useAuth.js # Auth hook (login, register, logout)
β β βββ pages/
β β β βββ Login.jsx # Login page
β β β βββ Register.jsx # Registration page
β β βββ services/
β β βββ auth.api.js # Auth API calls
β βββ interview/
β βββ interview.context.jsx # Interview context provider
β βββ hooks/
β β βββ useInterview.js # Interview hook (CRUD + PDF download)
β βββ pages/
β β βββ Home.jsx # Dashboard β create report + history
β β βββ interview.jsx # Report detail β Q&A, roadmap, scores
β βββ services/
β β βββ interview.api.js # Interview API calls
β βββ style/
β βββ home.scss # Home page styles
β βββ interview.scss # Interview detail page styles
β
βββ .gitignore
βββ README.md
| Method | Endpoint | Access | Description |
|---|---|---|---|
POST |
/api/auth/register |
Public | Register a new user |
POST |
/api/auth/login |
Public | Login with email & password |
GET |
/api/auth/logout |
Public | Logout & blacklist token |
GET |
/api/auth/get-me |
Private | Get current user profile |
{
"username": "john_doe",
"email": "john@example.com",
"password": "securePassword123"
}{
"email": "john@example.com",
"password": "securePassword123"
}| Method | Endpoint | Access | Description |
|---|---|---|---|
POST |
/api/interview/ |
Private | Generate a new interview report |
GET |
/api/interview/ |
Private | Get all reports for current user |
GET |
/api/interview/report/:interviewId |
Private | Get a specific report by ID |
POST |
/api/interview/resume/pdf/:interviewReportId |
Private | Generate & download a tailored resume PDF |
Send as multipart/form-data:
| Field | Type | Required | Description |
|---|---|---|---|
jobDescription |
string |
β | Full job description text |
selfDescription |
string |
Optional | Brief self-description of your experience |
resume |
file |
Optional | Resume PDF file upload |
Note: Either
resumeorselfDescription(or both) must be provided.
Response:
{
"message": "Interview report generated successfully.",
"interviewReport": {
"_id": "...",
"title": "Senior Frontend Engineer",
"matchScore": 78,
"technicalQuestions": [
{
"question": "Explain React's reconciliation algorithm.",
"intention": "Assess deep understanding of React internals.",
"answer": "Discuss the virtual DOM diffing process..."
}
],
"behavioralQuestions": [...],
"skillGaps": [
{ "skill": "TypeScript", "severity": "medium" }
],
"preparationPlan": [
{
"day": 1,
"focus": "React Fundamentals",
"tasks": ["Review hooks lifecycle", "Build a custom hook"]
}
]
}
}βββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββ
β β HTTP β Backend β
β React Frontend ββββββββββΊβ Express 5 REST API β
β (Vite + React 19) β :5173 β Port :3000 β
β β β β
β β’ Auth Pages β β βββββββββββββ βββββββββββββββ β
β β’ Home Dashboard β β β Auth β β Interview β β
β β’ Interview Report β β β Routes β β Routes β β
β β’ Protected Routes β β βββββββ¬ββββββ ββββββββ¬βββββββ β
β β β β β β
βββββββββββββββββββββββ β βββββββΌβββββββββββββββΌβββββββ β
β β Controllers β β
β βββββββ¬βββββββββββββββ¬βββββββ β
β β β β
β βββββββΌββββββ βββββββΌβββββββ β
β β MongoDB β β AI Service β β
β β (Mongoose)β β (Gemini) β β
β βββββββββββββ βββββββ¬βββββββ β
β β β
β ββββββββΌβββββββ β
β β Puppeteer β β
β β (PDF Gen) β β
β βββββββββββββββ β
βββββββββββββββββββββββββββββββββββ
| Variable | Required | Description |
|---|---|---|
MONGO_URI |
β | MongoDB connection string |
JWT_SECRET |
β | Secret key for signing JWT tokens |
GOOGLE_GENAI_API_KEY |
β | Google AI / Gemini API key |
FRONTEND_URL |
Optional | Frontend origin for CORS (defaults to http://localhost:5173) |
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the ISC License.
Built with β€οΈ using Google Gemini AI
Star β this repo if you found it helpful!