PrepAI is a full-stack AI mock interview platform. It lets a user upload a resume, generate role-focused interview questions, answer by text or voice, get per-question scoring/feedback, and review a final analytics report.
- Resume upload and parsing (PDF only)
- AI-generated interview questions (configurable count: 1 to 20)
- Domain-based interview tracks:
- Frontend Developer
- Backend Developer
- Data Structures
- HR Interview
- System Design
- Employee Introduction
- Answer evaluation with score + structured feedback
- Voice answer mode with live waveform/intensity
- Confidence metrics (client-side) from transcript/audio stats
- Final report with score trends and weak-topic analysis
- Auth (register/login/me) with JWT
- Resume persistence for logged-in users
- Frontend: React 19, React Router 7, Framer Motion, Axios, Vite, Tailwind CSS v4, react-loading-skeleton
- Backend: Node.js, Express 5, Mongoose, Multer, pdf-parse, Axios
- Database: MongoDB
- AI Layer:
- Chat completion via xAI/Groq-compatible OpenAI-style endpoint
- STT via Groq-compatible transcription endpoint
- TTS endpoint currently returns
501and frontend falls back to browser speech synthesis
interview-prep-ai/
backend/
scripts/
check-routes.js
src/
config/
controllers/
middleware/
models/
routes/
services/
frontend/
public/
src/
assets/
components/
context/
pages/
services/
- User uploads resume PDF on
/resume. - Backend extracts text from PDF and calls AI parser.
- Parsed resume is saved locally in browser; if authenticated, it is also saved in MongoDB (
Resumemodel). - User starts interview on
/interview. - Backend generates questions from parsed resume + selected domain.
- User submits text or voice answers.
- Each answer is evaluated and scored (
0-10) and stored inInterview.responses. - User finishes interview and navigates to
/reportfor final analytics.
/Home page with animated landing sections/signupRegister/Login page/resumeResume upload + parsed preview/interviewInterview engine (question flow, text/voice answer, waveform, auto-read)/reportFinal report + historical progress analytics
Routes are lazy-loaded with Suspense fallback skeleton UI.
- Voice input:
- Uses
MediaRecorderin browser - Sends audio to
/api/test/stt - If route not found (404), retries
/api/interview/voice-answer
- Uses
- STT support:
- Available only when provider resolves to Groq-compatible transcription in current backend setup
- Question reading (TTS):
- Frontend first tries
/api/test/ttswith a short soft-wait - If unavailable/slow, it falls back to browser
speechSynthesis - TTS responses are cached in-memory per question text on the page
- Frontend first tries
Base backend URL (local): http://localhost:5000
Notes:
- All routes are mounted under
/api/* - Backward-compatible aliases also exist without
/api(for example/auth/login)
GET /-> returns backend running message
POST /api/auth/signup-> create accountPOST /api/auth/register-> alias for signupPOST /api/auth/login-> loginGET /api/auth/me-> current user (requires Bearer token)
POST /api/resume/upload-> upload PDF (multipart/form-data, fieldresume)- Optional auth: if token present, parsed resume is saved to DB for user
GET /api/resume/me-> fetch saved parsed resume (auth required)DELETE /api/resume/me-> delete saved parsed resume (auth required)
POST /api/interview/start-> start interview sessionPOST /api/interview/generate-> alias for startPOST /api/interview/answer-> submit answerPOST /api/interview/:interviewId/answer-> submit answer (param variant)POST /api/interview/evaluate-> alias for answerPOST /api/interview/finish-> finalize interview and get final score/reportPOST /api/interview/voice-answer-> voice transcription alias (multipart audio)
POST /api/test/stt-> speech-to-text transcription (multipart/form-data, fieldaudio)POST /api/test/tts-> currently returns501in this integration
POST /api/interview/start
{
"parsedResume": { "skills": ["..."] },
"domain": "Frontend Developer",
"questionCount": 3
}Accepted resume payload aliases: parsedResume, parsedData, resumeData, resumeText.
POST /api/interview/answer
{
"interviewId": "mongo_object_id",
"answer": "Your answer here"
}POST /api/interview/finish
{
"interviewId": "mongo_object_id"
}Username, optional uniqueusername, optional uniqueemail,password(hashed)
Resume- one-per-user (
userunique),parsedData
- one-per-user (
Interviewuser(optional),resumeData,domain,questions[],responses[],currentQuestionIndex,finalScore,finalFeedback
prepai-auth-tokenprepai-userprepai-remember-identityparsedResumefinalResultinterviewHistoryselectedInterviewDomainselectedInterviewQuestionCount
- Node.js 20+ recommended
- npm
- MongoDB instance (local or cloud)
git clone https://github.com/Ankit052003/Prep_AI.git
cd Prep_AIcd backend
npm install
npm run devBackend runs on http://localhost:5000 by default.
Open a second terminal:
cd frontend
npm install
npm run devFrontend runs on http://localhost:5173 by default.
This README intentionally omits API-key values/details.
- Backend requires database/auth/AI provider configuration in
backend/.env. - Frontend supports optional env overrides for API base/proxy target/media URLs.
- Vite proxy target defaults to
http://localhost:5000infrontend/vite.config.ts. - Frontend API client default base is
http://localhost:5000/apiif no override is provided.
npm run dev-> start with nodemonnpm start-> start with nodenpm run check:routes-> route existence/status check script
npm run dev-> start Vite dev servernpm run build-> type-check + production buildnpm run lint-> ESLintnpm run preview-> preview production build
- Backend TTS endpoint (
/api/test/tts) currently returns501; browser speech synthesis is used as fallback. - STT is wired for Groq-compatible transcription in this backend flow.
- Resume upload accepts PDF only.
- Interview question generation defaults to
1question if not specified.
- Backend fails on startup:
- Verify MongoDB is reachable and backend env config is present.
401on protected routes:- Ensure Bearer token is sent from frontend auth session.
- Voice transcription not working:
- Confirm browser microphone permission is granted.
- Check
/api/test/sttavailability and provider compatibility.
- Slow/failed question audio reading:
- App automatically falls back to browser TTS if backend TTS is unavailable.
MIT License. See LICENSE.