AI Interview Trainer is a full-stack web application designed to simulate real-time mock interviews using advanced AI models. It evaluates your answers, scores your performance, and even lets you download interview summaries as PDFs β making it an ideal tool for job preparation.
- π€ Mock Interviews Powered by AI β Real-time Q&A using OpenRouterβs AI models.
- π§ Answer Scoring & Feedback β Evaluates answers for clarity, relevance, and completeness.
- π PDF Summary Export β Download detailed summaries of your interview sessions.
- π Interview History β View all your past interviews and feedback.
- π Authentication β Secure login using JWT tokens.
- π Modern UI β Built with React, Tailwind CSS, and Vite for a fast and responsive experience.
ai-interview-trainer/ βββ frontend/ # React + Vite + Tailwind CSS βββ backend/ # Node.js + Express + MongoDB + PDFKit
- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
3.Create a .env file in the backend folder and add the following:
PORT=5000
MONGODB_URI=your_mongodb_connection_string
OPENROUTER_API_KEY=your_openrouter_api_key
JWT_SECRET=your_jwt_secret4.Start the backend server:
npm startcd ../frontend
npm installUpdate the backend URL inside all API requests (you can use a constant file for this if needed).
Start frontend:
npm run dev
π Project Structure
oxeir-ai-interview-trainer/
β
βββ backend/
β βββ routes/
β βββ controllers/
β βββ models/
β βββ utils/
β βββ index.js
β βββ .env
β
βββ frontend/
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ services/
β β βββ App.jsx
β βββ vite.config.js
β
βββ README.md
##π§ AI Logic
- The backend uses OpenRouter's deepseek-chat-v3-0324 model.
- On starting an interview, domain-specific questions are generated.
- User answers are stored, and follow-up questions + feedback are generated.
- A summary is auto-generated and stored.
- A PDF version can be exported using pdfkit.
##π§Ύ API Endpoints
- Auth POST /api/login Request:
{
"userId": "1234",
"name": "Aman"
}Response:
{
"token": "<JWT_TOKEN>"
}- POST /api/interview/start β Start a new interview session
- POST /api/interview/answer β Submit answer and get follow-up
- POST /api/interview/summary β Generate summary of the session
- POST /api/interview/download-pdf β Export summary as PDF
- Frontend: Vercel
- Backend: Render
- Database: MongoDB Atlas
Make sure to set environment variables correctly on both platforms.
- OpenRouter for model access
- DeepSeek for AI model
- Vercel & Render for deployment