Skip to content

Latest commit

Β 

History

33 Commits

Folders and files

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

Repository files navigation

PrepForge AI β€” Full-Stack AI-Powered Interview Preparation & Voice Mock Platform

Project Status: Active Stack: MERN + Groq AI License: ISC

PrepForge AI is a full-stack, end-to-end interview preparation platform that transforms resume parsing and job description analysis into an interactive, voice-driven mock interview experience.

By combining natural language processing, real-time Speech-to-Text (STT), Text-to-Speech (TTS) audio playback, adaptive AI question generation, and empirical performance analytics, PrepForge AI bridges the gap between static studying and real-world interview execution.


πŸ“‹ Table of Contents


🌐 Overview & Architecture

PrepForge AI operates on a modern 4-tier layer architecture:

                          +-----------------------------------+
                          |     Public Landing Page & UI      |
                          |  (React 19, Vite, SCSS, Router 7) |
                          +-----------------------------------+
                                            |
                                            v
                          +-----------------------------------+
                          |  Hooks, Context & Web Speech API  |
                          |  (STT SpeechRec / TTS Synthesis)  |
                          +-----------------------------------+
                                            |
                                            v
                          +-----------------------------------+
                          |  REST API & Middleware Security   |
                          | (Node.js, Express, JWT Cookies)   |
                          +-----------------------------------+
                                            |
                                            v
                          +-----------------------------------+
                          |    AI Engine & Database Layer     |
                          | (Groq GPT-OSS-120B, MongoDB, PDF) |
                          +-----------------------------------+

✨ Key Features

🏠 1. Public Landing Page & Product Showcase

  • Unauthenticated Entry Point: Introduces visitors to the product workflow, feature capabilities, interactive voice showcase, and progress metrics before requiring authentication.
  • Dynamic Header Navigation: Sticky navigation bar offering context-aware actions (Login, Get Started for visitors; Dashboard, Voice Mock, History, Progress, Logout for authenticated users).

πŸ” 2. Authentication & User Security

  • JWT HTTP-Only Cookies: Secure session persistence with strict sameSite: "lax" cookie flags preventing client-side script tampering.
  • Token Blacklisting: Server-side token invalidation model upon logout preventing replay attacks.
  • User Ownership Isolation: All stored interview plans, voice sessions, and progress analytics are strictly isolated and authorized by user ID.

πŸ“„ 3. Resume Parsing & Profile Alignment

  • PDF Resume Upload: Memory-buffer binary parsing extracting raw resume text using pdf-parse.
  • Match Score Engine: Evaluates alignment (0–100%) between the candidate's resume, self-description, and target job description.

🎯 4. Skill Gap Detection & Dynamic Roadmap

  • Categorized Skill Gaps: Identifies high, medium, and low severity deficiencies required by the target job role.
  • Personalized Preparation Plan: Generates dynamic day-by-day learning roadmaps customized specifically to missing competencies.

πŸ’» 5. Technical & Behavioral Q&A Generation

  • Role-Specific Q&A: Generates technical and STAR-method behavioral interview questions.
  • Interviewer Intention & Answer Guides: Breaks down what the interviewer assesses alongside model answer guidelines.

πŸŽ™οΈ 6. Interactive Voice Mock Interview Engine

  • Text-to-Speech (TTS): AI interviewer reads questions aloud using Web Speech Synthesis.
  • Real-Time Speech-to-Text (STT): Transcribes candidate spoken answers in real-time using SpeechRecognition / webkitSpeechRecognition.
  • Manual Text Fallback: Seamless fallback input for browsers without speech recognition support.
  • Adaptive Questioning: AI adjusts question difficulty dynamically:
    • Low Score (<6/10) β†’ Asks simpler/foundational follow-up questions to assess basic knowledge.
    • High Score (>=8/10) β†’ Increases difficulty with complex scenario-based and architectural questions.

πŸ“Š 7. Instant Evaluation & Feedback

  • 0–10 Question Scoring: Scores each answer objectively.
  • Strengths & Weaknesses: Extracts key candidate strengths and observed weaknesses.
  • Model Answer Generation: Provides ideal responses for comparison.

πŸ“œ 8. Interview History & Question Transcripts

  • Complete Session Storage: Persists all voice interviews in MongoDB.
  • Question-Level Breakdown: Detailed review of spoken answer transcripts, scores, AI feedback, and TTS audio replay.

πŸ“ˆ 9. Empirical Progress Analytics

  • Overall Score Progression: Visual bar chart tracking overall interview performance over time (e.g. Session 1: 58 β†’ Session 2: 67 β†’ Session 3: 74).
  • Topic Performance Curves: Tracks improvement across specific domains (SQL, Python, React, System Design, Communication).
  • Gap vs. Weakness Comparison: Compares initial initial skill gaps (from resume) against observed interview weaknesses (from spoken performance).

πŸ“„ 10. ATS-Friendly Resume Generator

  • HTML/CSS Resume Compilation: AI tailors resume content specifically to target job keywords without fabrication.
  • Puppeteer PDF Export: Renders single-column, standard-compliant ATS PDFs ready for job applications.

πŸ› οΈ Tech Stack

Frontend

  • Framework: React 19, Vite 8
  • Routing: React Router 7 (createBrowserRouter)
  • Styling: SCSS (Sass 1.102), LightningCSS
  • HTTP Client: Axios (with credentials)
  • Speech Integration: Web Speech API (SpeechRecognition, SpeechSynthesis)

Backend

  • Runtime: Node.js
  • Framework: Express 5
  • Database: MongoDB & Mongoose 9
  • AI SDK: Groq SDK (openai/gpt-oss-120b)
  • PDF Processing: pdf-parse & puppeteer
  • Security: jsonwebtoken, bcryptjs, cookie-parser, cors

πŸ“ Project Directory Structure

PrepForge_AI/
β”œβ”€β”€ Backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”‚   └── database.js             # MongoDB connection setup
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.controller.js      # User registration, login, logout, getMe
β”‚   β”‚   β”‚   └── interview.controller.js # Report generation, voice sessions, analytics
β”‚   β”‚   β”œβ”€β”€ middlewares/
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.middleware.js      # JWT cookie verification middleware
β”‚   β”‚   β”‚   └── file.middleware.js      # Multer memory storage file upload
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”‚   β”œβ”€β”€ user.model.js           # User schema
β”‚   β”‚   β”‚   β”œβ”€β”€ blacklist.model.js      # Revoked token schema
β”‚   β”‚   β”‚   β”œβ”€β”€ interviewReport.model.js# Analysis report schema
β”‚   β”‚   β”‚   └── interviewSession.model.js# Voice mock session schema
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.routes.js          # Authentication routes
β”‚   β”‚   β”‚   └── interview.route.js      # Interview & Voice API routes
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── ai.service.js           # Groq AI prompts, structured JSON & Puppeteer PDF
β”‚   β”‚   └── app.js                      # Express application initialization
β”‚   β”œβ”€β”€ .env                            # Backend environment secrets
β”‚   β”œβ”€β”€ server.js                       # Server entry point (Port 3000)
β”‚   └── package.json
β”‚
β”œβ”€β”€ Frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/                     # SVG icons & logo graphics
β”‚   β”‚   β”œβ”€β”€ features/
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ components/Protected.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ hooks/useAuth.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ pages/Login.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ pages/Register.jsx
β”‚   β”‚   β”‚   β”‚   └── auth.context.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ interview/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ components/Navbar.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ hooks/useInterview.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ pages/Home.jsx           # Authenticated Plan Generator & Recent Plans
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ pages/Interview.jsx      # Interview Plan Detail View
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ pages/InterviewVoice.jsx # Interactive Voice Mock Session
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ pages/History.jsx        # Session History & Transcripts
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ pages/Progress.jsx       # Progress Analytics Dashboard
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ pages/LandingPage.jsx    # Public Product Landing Page
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ services/interview.api.js
β”‚   β”‚   β”‚   β”‚   └── interview.context.jsx
β”‚   β”‚   β”‚   └── services/
β”‚   β”‚   β”‚       └── auth.api.js
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ app.routes.jsx              # React Router configuration
β”‚   β”‚   └── main.jsx
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ vite.config.js
β”‚   └── package.json
β”‚
β”œβ”€β”€ .gitignore                          # Git ignore rules
└── README.md                           # Documentation

πŸ“‘ API Endpoints Reference

Authentication Routes (/api/auth)

Method Endpoint Access Description
POST /api/auth/register Public Registers a new user account & sets HTTP-only JWT cookie
POST /api/auth/login Public Authenticates user & sets HTTP-only JWT cookie
POST / GET /api/auth/logout Public Clears cookie & adds token to server blacklist
GET /api/auth/get-me Private Fetches current logged-in user profile

Interview & Voice Routes (/api/interview)

Method Endpoint Access Description
POST /api/interview Private Analyzes resume PDF, self description & JD to create report
GET /api/interview Private Fetches all recent interview plans of logged-in user
GET /api/interview/report/:interviewId Private Fetches detailed interview analysis report by ID
POST /api/interview/resume/pdf/:interviewReportId Private Generates tailored ATS resume PDF via Puppeteer
POST /api/interview/session/start Private Starts a new voice mock interview session
POST /api/interview/session/:sessionId/answer Private Submits spoken transcript, evaluates answer & gets next adaptive Q
POST /api/interview/session/:sessionId/complete Private Finalizes voice mock interview session
GET /api/interview/sessions Private Fetches all past completed voice interview sessions
GET /api/interview/session/:sessionId Private Fetches single voice session details & transcript
GET /api/interview/progress Private Computes overall score progression & topic analytics

βš™οΈ Environment Variables

Create a .env file inside the Backend/ directory:

PORT=3000
MONGO_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<dbname>
JWT_SECRET=your_jwt_secret_key_here
GROQ_API_KEY=gsk_your_groq_api_key_here

πŸš€ Installation & Setup Guide

Prerequisites

  • Node.js (v18+ recommended)
  • npm or yarn
  • MongoDB Database (Local or MongoDB Atlas)
  • Groq API Key

1. Clone Repository

git clone https://github.com/Rohan-shiva/prepforge-ai.git
cd prepforge-ai

2. Backend Setup

cd Backend
npm install

Start the backend server:

npm run dev
# Server running at http://localhost:3000

3. Frontend Setup

Open a new terminal tab:

cd Frontend
npm install

Start the Vite development server:

npm run dev
# Application running at http://localhost:5173

πŸŽ™οΈ Voice Mock Interview Flow

       Candidate Clicks "Start Voice Session"
                         β”‚
                         β–Ό
        AI Interviewer Speaks Question (TTS)
                         β”‚
                         β–Ό
       Candidate Listens & Speaks Answer (STT)
                         β”‚
                         β–Ό
       Transcript Displayed & Answer Submitted
                         β”‚
                         β–Ό
          AI Evaluates Response (0-10)
  (Feedback, Strengths, Weaknesses, Model Answer)
                         β”‚
                         β–Ό
        Score Check & Dynamic Question Adaptation
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β–Ό                                   β–Ό
Score < 6/10                         Score >= 8/10
(Simpler / Follow-up Q)              (In-depth / Advanced Q)
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β–Ό
            Complete 4-Question Session
                         β”‚
                         β–Ό
       Overall Session Score & Weaknesses Saved

πŸ“„ License

Distributed under the ISC License. See LICENSE for more information.


PrepForge AI β€” Prepare Smarter. Interview Better. Production Deployment: Active & Verified (Vercel & Render)

About

AI-powered interview preparation platform that analyzes resumes and job descriptions, identifies skill gaps, generates personalized preparation roadmaps, creates technical and behavioral questions, conducts voice-based mock interviews, evaluates performance, and tracks interview progress over time.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages