AI Mock Platform is a full-stack mock interview application built with a React/Vite frontend and an Express/MongoDB backend. It supports user authentication, resume upload, AI-powered interview sessions, voice transcription, and interview history.
- User registration and authentication with JWT
- Resume upload and parsing
- Live interview session support
- Text answers
- Voice answer transcription
- Code submission
- AI text-to-speech responses
- Interview history tracking
- React frontend with protected routes and auth state
- Backend APIs in Express with MongoDB persistence
- Frontend: React 19, Vite, Axios, React Router Dom
- Backend: Node.js, Express 5, MongoDB, Mongoose
- Auth: JSON Web Tokens
- AI/voice services: AssemblyAI, Murf, Google Gemini (via
@google/genai) - File uploads: Multer
client/- React applicationserver/- Express API serverserver/src/- backend source code and routesserver/.env- environment variable configuration (local only)
git clone <repository-url>
cd "AI Mock Platform"cd server
npm install
cd ../client
npm installCreate a .env file inside server/ with the following values:
PORT=5000
MONGODB_URI=<your-mongodb-connection-string>
JWT_SECRET=<your-jwt-secret>
JWT_EXPIRES_IN=7d
CLIENT_URL=http://localhost:5173
ASSEMBLYAI_API_KEY=<your-assemblyai-api-key>
MURF_API_KEY=<your-murf-api-key>
GEMINI_API_KEY=<your-google-gemini-api-key>Do not commit
.envto Git. Keep secret keys private.
cd server
npm run devcd client
npm run devVisit http://localhost:5173 in your browser.
The backend exposes these main routes under /api:
/api/authPOST /register— create a new userPOST /login— sign in with email/passwordGET /me— get current authenticated userPOST /logout— log out
/api/resumePOST /upload— upload a resume fileGET /— fetch the uploaded resume
/api/interviewPOST /start— start a new interview sessionPOST /:id/answer— submit a text answerPOST /:id/answer-audio— submit a voice answerPOST /:id/code— submit code for the interviewPOST /:id/end— end the interviewGET /:id— fetch interview detailsPOST /:id/speak— generate spoken textPOST /transcribe— transcribe uploaded audio
/api/history- interview history endpoints for authenticated users
- The client uses
VITE_API_URLif provided; otherwise it defaults tohttp://localhost:5000/api. node_modules/directories should be ignored in Git and should not be committed.- Make sure your MongoDB connection string is valid and the database is reachable.
Add the following to .gitignore at the repository root if not already present:
/client/node_modules
/server/node_modules
/server/.env
/client/dist- If the frontend cannot reach the backend, confirm
serveris running andCLIENT_URLmatches the frontend origin. - If auth fails, verify
JWT_SECRETis set and matches the secret used by the server. - If audio transcription or AI calls fail, check your API keys and make sure the services are enabled.