A full-stack web application that provides AI-powered interview practice with real-time feedback, score tracking, and resume analysis.
- AI-Powered Interviews: Generate domain-specific interview questions using Google Gemini
- Voice Recording: Record your answers using speech-to-text (AssemblyAI)
- Detailed Feedback: Get comprehensive analysis with scores across multiple criteria
- Progress Tracking: Monitor your improvement over time with visual charts
- Resume Analysis: AI-powered resume review with actionable suggestions
- Secure Authentication: JWT-based user authentication
ai-interviewer/
├── backend/ # Express.js API server
│ ├── config/ # Database configuration
│ ├── controllers/ # Request handlers
│ ├── models/ # Mongoose schemas
│ ├── routes/ # API routes
│ ├── middlewares/ # Auth & error handling
│ └── utils/ # Helper functions (Gemini, AssemblyAI)
│
└── frontend/ # React application
├── src/
│ ├── components/ # React components
│ ├── pages/ # Page components
│ ├── services/ # API services (Axios)
│ └── styles/ # CSS files
└── public/ # Static assets
- Node.js >= 18.x
- MongoDB (local or Atlas)
- Google Gemini API Key
- AssemblyAI API Key (for voice transcription)
- Navigate to the backend directory:
cd backend- Install dependencies:
npm install- Create a
.envfile (use.env.exampleas template):
cp .env.example .env- Update
.envwith your credentials:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
GEMINI_API_KEY=your_gemini_api_key
ASSEMBLYAI_API_KEY=your_assemblyai_api_key
PORT=3000- Start the development server:
npm run devThe backend will run on http://localhost:3000
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Create a
.envfile:
cp .env.example .env- Update
.env:
VITE_API_URL=http://localhost:3000/api- Start the development server:
npm run devThe frontend will run on http://localhost:5173
- Sign Up: Create a new account
- Sign In: Login with your credentials
- Start Interview:
- Enter the number of questions
- Specify the domain (e.g., Software Engineering)
- Answer questions via text or voice
- View Feedback: Get detailed scores and suggestions
- Track Progress: View your improvement over time
- Check Resume: Upload and analyze your resume
- Runtime: Node.js 18+
- Framework: Express.js
- Database: MongoDB with Mongoose
- Authentication: JWT
- AI Integration:
- Google Gemini (interview questions & feedback)
- AssemblyAI (voice transcription)
- Framework: React 19
- Routing: React Router DOM
- HTTP Client: Axios
- Charts: Chart.js
- Styling: CSS3 (preserving original styles)
- Build Tool: Vite
backend/
├── config/
│ └── db.js # MongoDB connection
├── controllers/
│ ├── authController.js # Signup/signin logic
│ ├── interviewController.js # Interview Q&A handling
│ ├── scoreController.js # Score calculation & history
│ ├── resumeController.js # Resume analysis
│ └── profileController.js # Profile image & transcription
├── models/
│ ├── User.js # User schema
│ ├── Session.js # Interview session schemas
│ └── Interview.js # Image storage schema
├── routes/
│ ├── authRoutes.js
│ ├── interviewRoutes.js
│ ├── scoreRoutes.js
│ ├── resumeRoutes.js
│ └── profileRoutes.js
├── middlewares/
│ └── authMiddleware.js # JWT verification
├── utils/
│ ├── geminiClient.js # Gemini AI integration
│ ├── assemblyClient.js # AssemblyAI integration
│ └── errorHandler.js # Error handling utilities
└── server.refactored.js # Main server file
frontend/
├── src/
│ ├── components/
│ │ ├── Auth/
│ │ │ ├── SignIn.jsx
│ │ │ ├── SignUp.jsx
│ │ │ └── Auth.css
│ │ ├── Dashboard/
│ │ │ ├── Home.jsx
│ │ │ ├── Sidebar.jsx
│ │ │ └── Dashboard.css
│ │ ├── Interview/
│ │ │ ├── InterviewStart.jsx
│ │ │ ├── InterviewProgress.jsx
│ │ │ ├── InterviewResult.jsx
│ │ │ └── Interview.css
│ │ ├── Resume/
│ │ │ ├── ResumeCheck.jsx
│ │ │ └── Resume.css
│ │ └── Shared/
│ │ ├── Loader.jsx
│ │ └── Shared.css
│ ├── pages/
│ │ ├── Landing.jsx
│ │ ├── Login.jsx
│ │ ├── Register.jsx
│ │ ├── Dashboard.jsx
│ │ ├── Interview.jsx
│ │ ├── Progress.jsx
│ │ ├── Resume.jsx
│ │ └── Feedback.jsx
│ ├── services/
│ │ ├── api.js # Axios instance
│ │ └── auth.js # API service functions
│ ├── App.jsx # Main app component
│ └── index.css # Global styles
└── public/ # Static assets
POST /api/auth/signup- Register new userPOST /api/auth/signin- User login
POST /api/interview- Generate interview questionPOST /api/addanswer- Submit answerPOST /api/home- Reset interview session
POST /api/score- Calculate score and feedbackPOST /api/checkscore- Get score history
POST /api/checkresume- Analyze resume
POST /api/getimage- Get profile imagePOST /api/addimage- Upload profile imagePOST /api/transcribe- Transcribe audio to text
- Password hashing (ready to implement bcrypt)
- JWT token authentication
- Protected routes
- CORS configuration
- Input validation
Recommended setup for this repo:
- Frontend: Vercel (static site from
frontend/built by Vite) - Backend: Render (Node web service from
backend/)
- In the Vercel dashboard, create a new project and point it to this repository.
- In "Project Settings → Environment Variables", add
VITE_API_URLset to your Render backend URL (e.g.https://ai-interviewer-backend.onrender.com/api). - Vercel will detect the frontend directory; set the Root Directory to
frontendif asked. - Build & Output Settings (Vercel usually autodetects):
- Build Command:
npm run build - Output Directory:
dist
- Deploy. The
frontend/vercel.jsonfile is included to ensure the SPA rewrites toindex.html.
- Create a new Web Service on Render and connect your repository.
- Set the Root Directory to
backend(so Render runs commands insidebackend/). - Build Command:
npm install - Start Command:
npm start(thestartscript runsnode server.js) - Add environment variables in Render's dashboard (Secrets):
MONGO_URI(ormongourlif you prefer)JWT_SECRET(orjsonpassword)GEMINI_API_KEY(orgemini_key)ASSEMBLYAI_API_KEY(orapiKey)FRONTEND_URL— set to your Vercel app URL (e.g.https://your-frontend.vercel.app) so the backend can restrict CORS
- Deploy. Render will provide a stable URL for your backend (e.g.
https://ai-interviewer-backend.onrender.com).
The backend reads FRONTEND_URL (see backend/.env.example) and uses it as the allowed origin for CORS. Set that to your Vercel frontend URL in production to restrict cross-origin access.
- Do not commit secrets to the repository. Use the hosting provider's environment/secret management.
- After backend is deployed, update
VITE_API_URLin Vercel to point tohttps://<your-render-backend>/apiand redeploy the frontend. - The
frontend/vercel.jsonfile enforces an SPA rewrite toindex.htmlso client-side routing works on Vercel.
This project was refactored from static HTML/CSS/JS to a modern full-stack architecture:
- Backend: Monolithic
server.js→ MVC pattern with routes, controllers, models - Frontend: Static HTML files → React components with routing
- Styling: All original CSS files preserved in component folders
- API Layer: Direct fetch calls → Axios service layer with interceptors
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the ISC License.
- Google Gemini for AI-powered content generation
- AssemblyAI for speech-to-text functionality
- React and Express.js communities
Note: Remember to never commit your .env files to version control!