Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

133 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Interview Preparation Assistant

Node.js React Express MongoDB Google Gemini JWT License

An AI-powered full-stack interview preparation platform that analyzes a candidate's resume, self-description, and target job description to generate personalized interview reports, skill gap analysis, technical questions, behavioral questions, and a structured preparation roadmap.


πŸ“‘ Table of Contents


πŸ“– Project Overview

Interview Preparation Assistant is a full-stack AI application that helps software developers prepare for interviews more effectively.

Instead of simply generating random interview questions, the application analyzes the candidate's resume, self-description, and the target job description to create a personalized interview preparation report.

The generated report includes:

  • Match score
  • Resume analysis
  • Technical interview questions
  • Behavioral interview questions
  • Skill gap analysis
  • Seven-day preparation roadmap
  • AI-generated professional resume
  • Downloadable PDF resume

The project demonstrates practical implementation of modern MERN stack development while integrating Generative AI into a real-world workflow.


🌐 Live Demo

You can explore the application using the live demo below.

πŸ”— Live Demo: Wait let me compleat the documentation


πŸš€ Getting Started

New User?

If you don't have an account yet:

  1. Open the Register page.
  2. Create a new account using your username, email, and password.
  3. Log in with your newly created credentials.
  4. Start generating personalized interview reports.

Existing User?

Already have an account?

  1. Go to the Login page.
  2. Enter your registered email and password.
  3. Access your dashboard and continue your interview preparation.

Note: If the demo is hosted on a free-tier service (e.g., Render), the backend may take 30–60 seconds to wake up after a period of inactivity.


πŸ’‘ Why This Project?

Preparing for technical interviews often requires candidates to search through multiple resources, identify missing skills, and manually prepare resumes.

This project automates that process by combining:

  • Resume Parsing
  • Artificial Intelligence
  • Authentication
  • File Uploads
  • PDF Generation
  • MongoDB Data Storage
  • React Frontend
  • REST APIs

The goal is to provide an intelligent assistant that generates a complete interview preparation plan in just a few seconds.


⭐ Key Features

πŸ‘€ Authentication

  • User Registration
  • User Login
  • Secure JWT Authentication
  • Cookie-Based Authentication
  • Protected Routes
  • Logout Functionality

πŸ€– AI Features

  • Resume Analysis
  • Job Description Analysis
  • Self Description Analysis
  • Match Score Generation
  • Technical Question Generation
  • Behavioral Question Generation
  • Skill Gap Identification
  • Seven-Day Preparation Plan
  • AI Resume Generation

πŸ“„ Resume Features

  • PDF Upload
  • Resume Parsing
  • Resume Optimization
  • Resume Generation
  • Resume PDF Download

πŸ“Š Report Features

  • Personalized Interview Report
  • Recent Reports History
  • Report Storage
  • Individual Report Page
  • Resume Generation
  • Match Score Display

πŸ—οΈ System Architecture

                        +-------------------------+
                        |      React Frontend     |
                        |       (Vite + React)    |
                        +------------+------------+
                                     |
                                 Axios API
                                     |
                                     β–Ό
                        +-------------------------+
                        |     Express Backend     |
                        | Authentication & APIs   |
                        +------------+------------+
                                     |
                +--------------------+--------------------+
                |                                         |
                β–Ό                                         β–Ό
      +----------------------+               +----------------------+
      |   Google Gemini AI   |               |      MongoDB         |
      | AI Report Generator  |               | Users & Reports DB   |
      +----------------------+               +----------------------+
                |
                β–Ό
      +-----------------------------+
      | AI Interview Report         |
      | Resume Generation           |
      | PDF Generation              |
      +-----------------------------+

πŸ”„ Application Workflow

User Registration/Login
          β”‚
          β–Ό
JWT Authentication
          β”‚
          β–Ό
Upload Resume (PDF)
          β”‚
          β–Ό
Enter Self Description
          β”‚
          β–Ό
Paste Job Description
          β”‚
          β–Ό
Backend Extracts Resume Text
          β”‚
          β–Ό
Google Gemini AI Processing
          β”‚
          β–Ό
Generate Interview Report
          β”‚
          β–Ό
Validate AI Response (Zod)
          β”‚
          β–Ό
Store Report in MongoDB
          β”‚
          β–Ό
Display Report
          β”‚
          β–Ό
Generate Resume PDF

πŸ“ Project Structure

Interview Preparation Assistant

β”œβ”€β”€ Backend
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ config
β”‚   β”‚   β”œβ”€β”€ controllers
β”‚   β”‚   β”œβ”€β”€ middlewares
β”‚   β”‚   β”œβ”€β”€ routes
β”‚   β”‚   β”œβ”€β”€ services
β”‚   β”‚   └── models
β”‚   β”‚
β”‚   β”œβ”€β”€ server.js
β”‚   β”œβ”€β”€ package.json
β”‚   └── .env
β”‚
β”œβ”€β”€ Frontend
β”‚   β”œβ”€β”€ public
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ features
β”‚   β”‚   β”œβ”€β”€ style
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ main.jsx
β”‚   β”‚   └── app.routes.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.js
β”‚
└── README.md

πŸ›  Technologies Used

Backend

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • JWT
  • bcryptjs
  • multer
  • cors
  • dotenv
  • pdf-parse
  • Puppeteer
  • Google Gemini AI
  • Zod
  • zod-to-json-schema

Frontend

  • React
  • Vite
  • React Router DOM
  • Axios
  • Sass
  • Lucide React
  • Context API

Development Tools

  • VS Code
  • Postman
  • MongoDB Compass
  • Git
  • GitHub
  • npm

Architecture Pattern

The application follows a layered backend architecture to improve maintainability and scalability.

Routes
   β”‚
Controllers
   β”‚
Services
   β”‚
Database / AI

This separation of concerns makes the project easier to test, extend, and maintain as new features are added.


πŸ“‘ API Documentation

The backend exposes RESTful APIs for authentication, interview report generation, and resume generation.


πŸ” Authentication APIs

Method Endpoint Description Authentication
POST /api/auth/register Register a new user ❌
POST /api/auth/login Login an existing user ❌
GET /api/auth/logout Logout current user βœ…
GET /api/auth/get-me Get logged-in user profile βœ…

Register User

Endpoint

POST /api/auth/register

Request Body

{
    "username":"John Doe",
    "email":"john@example.com",
    "password":"12345678"
}

Response

{
    "success": true,
    "message": "User registered successfully."
}

Login User

Endpoint

POST /api/auth/login

Request Body

{
    "email":"john@example.com",
    "password":"12345678"
}

Response

{
    "success": true,
    "token":"JWT_TOKEN"
}

πŸ€– Interview APIs

Method Endpoint Description Authentication
POST /api/interview Generate Interview Report βœ…
GET /api/interview/report/:interviewId Get Single Interview Report βœ…
GET /api/interview/reports Get All Reports βœ…
POST /api/interview/resume/pdf/:interviewReportId Generate Resume PDF βœ…

Generate Interview Report

Endpoint

POST /api/interview

Form Data

Key Type
resume PDF File
selfDescription Text
jobDescription Text

Example Request

resume: resume.pdf

selfDescription:
"I am a MERN Stack developer passionate about building scalable web applications."

jobDescription:
"Looking for a React developer with Node.js experience."

Example Response

{
    "matchScore": 86,
    "technicalQuestions": [
        {
            "question":"Explain React Virtual DOM.",
            "answer":"..."
        }
    ],
    "behaviorQuestions":[
        {
            "question":"Tell me about yourself."
        }
    ],
    "skillGaps":[
        "TypeScript",
        "Testing"
    ],
    "preparationPlan":[
        "...7 Day Roadmap..."
    ]
}

Generate Resume PDF

Endpoint

POST /api/interview/resume/pdf/:interviewReportId

This endpoint generates a professionally formatted PDF resume based on the AI-generated resume content.


πŸš€ Getting Started

Prerequisites

Before running the project, ensure the following software is installed.

  • Node.js (v22 or later)
  • npm
  • MongoDB Atlas or Local MongoDB
  • Git
  • Google Gemini API Key

Clone Repository

git clone https://github.com/yourusername/interview-preparation-assistant.git

Navigate to Project

cd interview-preparation-assistant

βš™ Backend Setup

Move into the backend directory.

cd Backend

Install dependencies.

npm install

Start development server.

npm run dev

Backend runs on

http://localhost:3000

πŸ’» Frontend Setup

Move into frontend folder.

cd Frontend

Install dependencies.

npm install

Run development server.

npm run dev

Frontend runs on

http://localhost:5173

πŸ”‘ Environment Variables

Create a .env file inside the Backend directory.

PORT=3000

MONGO_URI=your_mongodb_connection_string

JWT_SECRET=your_secret_key

GOOGLE_GEN_API_KEY=your_google_api_key

πŸ“¦ Backend Dependencies

npm install express mongoose cors dotenv bcryptjs jsonwebtoken cookie-parser multer pdf-parse puppeteer @google/genai zod zod-to-json-schema

πŸ“¦ Frontend Dependencies

npm install react react-router-dom axios sass lucide-react

β–Ά Running the Project

Open two terminals.

Terminal 1

cd Backend
npm run dev

Terminal 2

cd Frontend
npm run dev

Open your browser.

http://localhost:5173

πŸ“· Application Screenshots

Replace the following images with actual screenshots after deployment.

Login Page

Login page


Register Page

Register page


Home Dashboard

Home page


Create Interview Report

creatInterview

Interview Report

Create Interview Report


Resume PDF

Resume PDF


πŸ“‚ Project Documentation

The following section provides a detailed explanation of every important file and directory used throughout the project.

Each file has been documented to make it easier for developers to understand the overall architecture, responsibilities, and implementation details.

This documentation is intended for:

  • Developers exploring the project.
  • Recruiters reviewing project quality.
  • Interviewers evaluating architecture decisions.
  • Contributors interested in extending the application.

πŸ“‚ Project Documentation

This section provides an overview of the major files and folders in the project. Understanding the responsibility of each file makes it easier to navigate, maintain, and extend the application.


πŸ“ Backend Documentation

.env

Stores environment variables used by the backend.

Variables include:

  • MongoDB Connection URI
  • JWT Secret Key
  • Google Gemini API Key
  • Server Port

This file should never be committed to source control.


package.json

Contains backend project information including:

  • Project metadata
  • Installed dependencies
  • Development dependencies
  • npm scripts

Main scripts:

npm run dev
npm start

server.js

The entry point of the backend application.

Responsibilities:

  • Loads environment variables
  • Connects MongoDB
  • Starts Express Server
  • Handles server initialization

src/app.js

Configures the Express application.

Includes:

  • Middleware Registration
  • Cookie Parser
  • CORS Configuration
  • Route Registration
  • JSON Parsing

πŸ“‚ Config Folder

database.js

Responsible for establishing a connection with MongoDB using Mongoose.

Features:

  • Database Connection
  • Error Handling
  • Connection Status Logging

πŸ“‚ Models

user.model.js

Defines the User schema.

Stores:

  • Username
  • Email
  • Password
  • Created Date

interviewReport.model.js

Stores every generated interview report.

Contains:

  • Job Description
  • Resume Content
  • Self Description
  • Match Score
  • Technical Questions
  • Behavioral Questions
  • Skill Gap Analysis
  • Preparation Plan
  • Resume HTML
  • User Reference

blacklist.model.js

Stores invalid JWT tokens after logout.

Used for:

  • Secure Logout
  • Token Invalidation
  • Session Management

πŸ“‚ Controllers

auth.controller.js

Handles user authentication.

Responsibilities:

  • Register User
  • Login User
  • Logout User
  • Get Current User

interview.controller.js

Handles all interview-related operations.

Responsibilities:

  • Generate Interview Report
  • Upload Resume
  • Parse PDF
  • Save Report
  • Fetch Reports
  • Generate Resume PDF

πŸ“‚ Middleware

auth.middleware.js

Protects private routes.

Functions:

  • Verify JWT
  • Authenticate User
  • Reject Invalid Tokens

file.middleware.js

Handles file uploads.

Uses:

  • Multer
  • Memory Storage
  • File Size Validation

πŸ“‚ Routes

auth.routes.js

Defines authentication endpoints.

Routes include:

  • Register
  • Login
  • Logout
  • Get Current User

interview.routes.js

Defines interview APIs.

Routes include:

  • Generate Report
  • Fetch Reports
  • Fetch Single Report
  • Generate Resume PDF

πŸ“‚ Services

ai.service.js

The core AI engine of the application.

Responsibilities:

  • Prompt Engineering
  • Google Gemini Integration
  • AI Report Generation
  • Resume Generation
  • Response Validation
  • HTML Resume Creation
  • PDF Generation

temp.js

Contains sample data used during development for testing prompts and AI responses.


🎨 Frontend Documentation

package.json

Contains frontend dependencies and npm scripts.

Main scripts:

npm run dev
npm run build

main.jsx

Frontend entry point.

Responsibilities:

  • Render React Application
  • Import Global Styles
  • Initialize Root Component

App.jsx

Main application component.

Responsibilities:

  • Load Context Providers
  • Render Application Routes
  • Manage Global Layout

app.routes.jsx

Defines client-side routing using React Router.

Routes include:

  • Login
  • Register
  • Home
  • Interview Report

πŸ“‚ Authentication Module

auth.context.jsx

Manages global authentication state.

Responsibilities:

  • Store User
  • Login
  • Register
  • Logout
  • Authentication Status

useAuth.js

Custom React Hook for authentication.

Provides:

  • Login Function
  • Register Function
  • Logout Function
  • Current User

auth.api.js

Communicates with backend authentication APIs using Axios.


Protected.jsx

Protects authenticated pages.

Features:

  • Route Protection
  • Redirect Unauthenticated Users
  • Loading State

πŸ“‚ Interview Module

interview.context.jsx

Stores interview-related state.

Responsibilities:

  • Current Report
  • Reports List
  • Loading State
  • API Calls

useInterview.js

Custom hook for interview operations.

Provides:

  • Create Report
  • Get Reports
  • Get Single Report
  • Download Resume

interview.api.js

Handles interview API communication with Axios.


Home.jsx

Main dashboard page.

Features:

  • Upload Resume
  • Enter Job Description
  • Enter Self Description
  • Generate Interview Report
  • View Recent Reports

Interview.jsx

Displays the generated interview report.

Sections include:

  • Match Score
  • Technical Questions
  • Behavioral Questions
  • Skill Gaps
  • Preparation Plan
  • Resume Generator

🎨 Styling

The project uses SCSS for styling.

Styles are organized into:

  • Global Styles
  • Authentication Styles
  • Home Page Styles
  • Interview Page Styles
  • Skeleton Loading UI
  • Button Components

πŸ“‚ Public Folder

Stores static assets such as:

  • Application Icon
  • Images
  • Future Static Files

πŸ“Œ Design Principles

This project follows several software engineering principles:

  • Separation of Concerns
  • Component-Based Architecture
  • Reusable React Components
  • RESTful API Design
  • Layered Backend Architecture
  • Context-Based State Management
    • Skeleton Loading UI
  • Scalable Folder Structure
  • Clean Code Practices

πŸ“ˆ Overall Project Flow

Frontend
   β”‚
Axios Requests
   β”‚
Express Routes
   β”‚
Controllers
   β”‚
Services
   β”‚
Google Gemini AI
   β”‚
MongoDB Database
   β”‚
Response
   β”‚
React UI

⚠ Challenges Faced

Developing this project involved solving several real-world engineering challenges across both the frontend and backend.

Authentication

  • Implemented secure JWT authentication using HTTP-only cookies.
  • Protected private routes on both the client and server.
  • Managed user sessions and logout functionality.

Resume Parsing

  • Accepted PDF resume uploads using Multer.
  • Extracted readable text from uploaded resumes using pdf-parse.
  • Validated uploaded files and handled parsing errors gracefully.

AI Integration

  • Integrated Google Gemini AI for intelligent interview report generation.
  • Designed structured prompts for consistent AI responses.
  • Handled AI response validation using Zod schemas.
  • Managed API failures, malformed responses, and retry logic.

Resume Generation

  • Generated professional HTML resumes.
  • Converted generated HTML into downloadable PDF documents using Puppeteer.

Frontend Challenges

  • Managing authentication state with React Context.
  • Handling protected routes.
  • Managing asynchronous API requests.
  • Building reusable components.
  • Organizing a scalable folder structure.

Backend Challenges

  • Designing RESTful APIs.
  • Database schema design.
  • Error handling.
  • Middleware organization.
  • Cookie authentication.
  • AI service abstraction.

πŸ§ͺ Testing

The application has been manually tested across multiple workflows.

Authentication

  • User Registration
  • User Login
  • Logout
  • Protected Routes
  • Invalid Credentials
  • Authentication Persistence

About

InterviewCopilot is an AI-powered interview preparation platform built with the MERN stack. It helps users prepare for interviews by analyzing their resume, job description, and self-introduction to generate personalized interview questions, identify skill gaps, create a preparation plan, and generate a job-specific resume.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages