An AI-powered interview preparation SaaS that simulates structured interviews, evaluates candidate responses with LLMs, and generates comprehensive diagnostic feedback reports.
- Overview & Problem Statement
- System Architecture
- Key Features
- Tech Stack
- Engineering Highlights & Design Decisions
- API Overview
- Getting Started
- Environment Variables
- Author
- The Problem: Job seekers and developers lack low-stress, interactive environments to practice technical and behavioral interviews. Traditional mock interviews are difficult to schedule, lack standardized scoring, and rarely provide immediate, actionable feedback.
- The Solution: Prepify automates interview evaluation by combining full-stack MERN architecture with large language models. Users complete guided interview sessions and receive structured reports identifying conceptual gaps, communication clarity, and targeted areas for improvement.
┌────────────────────────────────────────────────────────┐
│ React + Vite Client │
│ (Tailwind CSS, Axios Interceptors) │
└───────────────────────────┬────────────────────────────┘
│
│ HTTPS / RESTful API
▼
┌────────────────────────────────────────────────────────┐
│ Node.js / Express Server │
│ ┌───────────────────┐ ┌─────────────────────┐ │
│ │ JWT Auth & CORS │ │ Custom Rate Limiter │ │
│ └─────────┬─────────┘ └──────────┬──────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌───────────────────┐ ┌─────────────────────┐ │
│ │ Interview Engine │───────>│ LLM Report Service │ │
│ └─────────┬─────────┘ └──────────┬──────────┘ │
└────────────┼─────────────────────────────┼─────────────┘
│ │
▼ ▼
┌──────────────────┐ ┌───────────────────┐
│ MongoDB Database │ │ LLM / AI Provider │
│ (Mongoose Models)│ │ (OpenAI API) │
└──────────────────┘ └───────────────────┘
-
AI-Driven Performance Reports: Transforms raw interview transcripts and user responses into categorized feedback highlighting strengths, technical depth, and specific blind spots using structured LLM prompts.
-
Session & Interview Lifecycle Management: Create, pause, retrieve, and review historical interview sessions backed by persistent MongoDB schemas.
-
Stateless Authentication & Resource Isolation: Implements secure JWT/cookie authentication to protect user records, ensuring session reports are private and strictly bound to owner accounts.
-
Defensive Rate Limiting: Enforces strict throughput throttling around expensive AI evaluation endpoints to prevent abuse, race conditions, and uncontrolled API cost overruns.
-
Responsive, Accessible Interface: Designed with Vite, React, Tailwind CSS, and Shadcn UI components with dynamic feedback using Lucide icons and React Toastify.
| Layer | Technologies |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS, Shadcn UI, Lucide React, Axios, React Toastify |
| Backend | Node.js, Express.js, REST Architecture |
| Database | MongoDB, Mongoose ODM |
| AI Integration | Large Language Model (LLM) Inference APIs (OpenAI / External AI Gateway) |
| Security & Utilities | JSON Web Tokens (JWT), HTTP-Only Cookies, Express Rate Limit, CORS |
| Deployment | Vercel (Frontend), Render (Backend), MongoDB Atlas |
-
Cost & Abuse Protection (Rate Limiting):
- Challenge: Unrestricted access to LLM inference endpoints can lead to denial-of-wallet (DoW) attacks, API abuse, and unnecessary computation costs.
- Solution: Implemented middleware-level rate limiting on
/api/reports/generateto restrict report-generation frequency per user/IP while keeping previously generated reports accessible without triggering new LLM requests.
-
Structured LLM Output Validation:
- Challenge: Non-deterministic LLM responses can produce malformed or inconsistent JSON, potentially breaking frontend rendering and corrupting persisted data.
- Solution: Added defensive schema validation for AI-generated report payloads before persisting them to MongoDB, ensuring only structurally valid reports reach the database and client.
-
Decoupled Client–Server State Management:
- Challenge: Multi-step interview workflows require reliable handling of asynchronous API operations without blocking or disrupting the user interface.
- Solution: Separated API communication into modular Axios service layers and managed UI state locally at the component level, enabling predictable state transitions and responsive feedback during background report generation.
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/auth/register |
Register a new user | No |
POST |
/api/auth/login |
Authenticate user & issue token | No |
GET |
/api/interviews |
List all historical sessions for the active user | Yes |
POST |
/api/interviews |
Initialize a new interview session | Yes |
POST |
/api/reports/generate |
Generate AI report for a completed session (Rate Limited) | Yes |
GET |
/api/reports/:id |
Fetch detailed report by ID | Yes |
Make sure the following are installed:
- Node.js:
>= 18.x - npm:
>= 9.x - MongoDB: Local MongoDB instance or MongoDB Atlas
git clone https://github.com/abhay-0907/Prepify
cd prepify
Backend Setup:
cd backend
npm install
cp .env.example .env
# Add your environment variables in .envnpm run dev Backend runs on http://localhost:3000 by default.
cd ../frontend
npm install
cp .env.example .env
# Set VITE_API_URL in .env
npm run dev
Frontend runs on http://localhost:5173.Backend (/backend/.env)
PORT=3000
MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/prepify?retryWrites=true&w=majority
JWT_SECRET=your_jwt_secret_key
OPENAI_API_KEY=your_openai_api_key
FRONTEND_URL=http://localhost:5173
Frontend (/frontend/.env)