How sahastrawin/ai-interview-agent works
InterviewIQ is an AI mock-interview platform. Users authenticate, configure an interview (optionally using resume analysis), answer generated questions, and receive feedback and a scored report; they can also review history and buy credits. The README documents these capabilities and API boundaries, while sampled controller code confirms AI calls, credit deductions, answer evaluation, persistence, and payment verification. Several frontend page internals and route definitions were not sampled, so those connections follow documented API responsibilities rather than inferred call details.
Main entry points: App.jsx App routing · interview.route.js Interview routes · user.model.js User records · index.js Express API
Components 29
Client experience
- App routing
client/src/App.jsx - Google sign-in
client/src/pages/Auth.jsx - Interview flow
client/src/pages/InterviewPage.jsx - Interview setup
client/src/components/Step1SetUp.jsx - Live interview
client/src/components/Step2Interview.jsx - Report view
client/src/components/Step3Report.jsx - Interview history
client/src/pages/InterviewHistory.jsx - Credit plans
client/src/pages/Pricing.jsx - User state
client/src/redux/userSlice.js
API and workflows
- Express API
server/index.js - Auth routes
server/routes/auth.route.js - User routes
server/routes/user.route.js - Interview routes
server/routes/interview.route.js - Payment routes
server/routes/payment.route.js - Auth workflow
server/controllers/auth.controller.js - Current user
server/controllers/user.controller.js - Interview workflow
server/controllers/interview.controller.js - Payment workflow
server/controllers/payment.controller.js - JWT verification
server/middlewares/isAuth.js
Persistence
- User records
server/models/user.model.js - Interview records
server/models/interview.model.js - Payment records
server/models/payment.model.js
External services
- Firebase Auth
client/src/utils/firebase.js - OpenRouter AI
server/services/openRouter.service.js - Razorpay client
server/services/razorpay.service.js
Other components
- Candidate
- OpenRouter service
- Razorpay gateway
- MongoDB
Connections 40
- Candidate → App routing: uses
- App routing → Google sign-in: routes to
- App routing → Interview flow: routes to
- App routing → Interview history: routes to
- App routing → Credit plans: routes to
- App routing → Report view: routes to
- Google sign-in → Firebase Auth: signs in with
- Google sign-in → Auth routes: posts credentials
- Google sign-in → User state: updates
- App routing → User routes: loads current user
- Interview flow → Interview setup: presents setup
- Interview flow → Live interview: runs session
- Interview flow → Interview routes: requests interview APIs
- Interview history → Interview routes: requests history
- Report view → Interview routes: requests report
- Credit plans → Payment routes: requests payment APIs
- Express API → Auth routes: mounts
- Express API → User routes: mounts
- Express API → Interview routes: mounts
- Express API → Payment routes: mounts
- Auth routes → Auth workflow: dispatches
- User routes → JWT verification: guards
- User routes → Current user: dispatches
- Interview routes → JWT verification: guards
- Interview routes → Interview workflow: dispatches
- Payment routes → JWT verification: guards
- Payment routes → Payment workflow: dispatches
- Auth workflow → User records: finds or creates
- Current user → User records: reads
- Interview workflow → User records: checks and deducts credits
- Interview workflow → Interview records: creates and updates
- Interview workflow → OpenRouter AI: requests parsing, questions, evaluation
- OpenRouter AI → OpenRouter service: calls
- Payment workflow → Razorpay client: creates orders
- Razorpay client → Razorpay gateway: calls
- Payment workflow → Payment records: creates and updates
- Payment workflow → User records: adds credits
- User records → MongoDB: persists in
- Interview records → MongoDB: persists in
- Payment records → MongoDB: persists in