How azmat855/interviewproject.fyp works
AI Interview Preparation turns a signed-in candidate’s job description and optional resume/profile into a personalized interview report, then supports resume-PDF generation and text-based mock practice. The frontend handles authentication, report submission and presentation; the backend routes requests through controllers to AI services and MongoDB. Google sign-in adds Firebase verification and email OTP. The README documents the principal flows; some relationships below rely on those statements or SOURCE INDEX references, since not all implementation files were excerpted.
Main entry points: googleOtp.service.js Google OTP service · interview.routes.js Interview endpoints · useInterview.js Interview state · app.routes.jsx Page routes
Components 34
Frontend experience
- React application
Frontend/src/App.jsx - Page routes
Frontend/src/app.routes.jsx
Authentication
- Login and OTP pages
Frontend/src/features/auth/pages - Auth state
Frontend/src/features/auth/auth.context.jsx - Auth actions
Frontend/src/features/auth/hooks/useAuth.js - Auth API client
Frontend/src/features/auth/services/auth.api.js - Auth endpoints
Backend/src/routes/auth.routes.js - Auth controller
Backend/src/controllers/auth.controller.js - Session validation
Backend/src/middlewares/auth.middleware.js - Google OTP service
Backend/src/services/googleOtp.service.js - User records
Backend/src/models/user.model.js - OTP challenges
Backend/src/models/googleOtpChallenge.model.js - Token blacklist
Backend/src/models/blacklist.model.js - Firebase Admin
Backend/src/config/firebase.admin.js - OTP email delivery
Backend/src/services/email.service.js
Interview reports
- Report dashboard
Frontend/src/features/interview/pages/Home.jsx - Interview state
Frontend/src/features/interview/hooks/useInterview.js - Interview API client
Frontend/src/features/interview/services/interview.api.js - Report view
Frontend/src/features/interview/pages/Interview.jsx - Resume upload
Backend/src/middlewares/file.middleware.js - Interview endpoints
Backend/src/routes/interview.routes.js - Report controller
Backend/src/controllers/interview.controller.js - AI report and PDF
Backend/src/services/ai.service.js - Gemini client
Backend/src/services/gemini.service.js - Interview reports
Backend/src/models/interviewReport.model.js
Live mock interview
- Live session UI
Frontend/src/features/interview/components/LiveInterviewSession.jsx - Interview socket
Backend/src/sockets/interview.socket.js - Live interview logic
Backend/src/services/liveInterview.service.js
Backend runtime
- HTTP and socket server
Backend/server.js - Express application
Backend/src/app.js
Other components
- Candidate
- Firebase Auth
- SMTP provider
- Gemini API
Connections 41
- Candidate → Login and OTP pages: signs in
README.md - React application → Page routes: renders
Frontend/src/App.jsx - Page routes → Login and OTP pages: routes to
Frontend/src/app.routes.jsx - Page routes → Report dashboard: routes to
Frontend/src/app.routes.jsx - Page routes → Report view: routes to
Frontend/src/app.routes.jsx - Auth actions → Auth API client: calls
Frontend/src/features/auth/hooks/useAuth.js - Login and OTP pages → Auth actions: uses
Frontend/src/features/auth/pages/GoogleOtp.jsx - Auth API client → Auth endpoints: requests
README.md - Auth endpoints → Auth controller: dispatches
Backend/src/routes/auth.routes.js - Auth controller → Google OTP service: starts OTP
Backend/src/controllers/auth.controller.js - Auth controller → User records: reads and creates
Backend/src/controllers/auth.controller.js - Auth controller → Token blacklist: blacklists token
Backend/src/controllers/auth.controller.js - Google OTP service → Firebase Admin: verifies token
Backend/src/services/googleOtp.service.js - Google OTP service → OTP challenges: stores challenge
Backend/src/services/googleOtp.service.js - Google OTP service → User records: links account
Backend/src/services/googleOtp.service.js - Google OTP service → OTP email delivery: sends code
Backend/src/services/googleOtp.service.js - Firebase Admin → Firebase Auth: verifies with
README.md - OTP email delivery → SMTP provider: delivers through
README.md - Candidate → Report dashboard: enters details
README.md - Report dashboard → Interview state: submits inputs
Frontend/src/features/interview/pages/Home.jsx - Interview state → Interview API client: requests report
Frontend/src/features/interview/hooks/useInterview.js - Interview API client → Interview endpoints: uploads report inputs
README.md - Interview endpoints → Session validation: validates session
Backend/src/routes/interview.routes.js - Interview endpoints → Resume upload: accepts resume
Backend/src/routes/interview.routes.js - Interview endpoints → Report controller: dispatches
Backend/src/routes/interview.routes.js - Report controller → AI report and PDF: generates report
Backend/src/controllers/interview.controller.js - Report controller → Interview reports: saves and reads
Backend/src/controllers/interview.controller.js - AI report and PDF → Gemini client: requests content
Backend/src/services/ai.service.js - AI report and PDF → Gemini API: generates content
- Report view → Interview state: loads report
Frontend/src/features/interview/pages/Interview.jsx - Interview state → Interview API client: fetches and downloads
Frontend/src/features/interview/hooks/useInterview.js - Report view → Live session UI: opens session
Frontend/src/features/interview/pages/Interview.jsx - Live session UI → Interview API client: requests socket token
Frontend/src/features/interview/components/LiveInterviewSession.jsx - Live session UI → Interview socket: exchanges events
README.md - Interview socket → Interview reports: checks ownership
Backend/src/sockets/interview.socket.js - Interview socket → AI report and PDF: requests questions and feedback
Backend/src/sockets/interview.socket.js - Interview socket → Live interview logic: delegates interview logic
- Live session UI → Interview state: updates feedback
Frontend/src/features/interview/hooks/useInterview.js - HTTP and socket server → Express application: starts HTTP app
Backend/server.js - Express application → Auth endpoints: mounts endpoints
Backend/src/app.js - Express application → Interview endpoints: mounts endpoints
Backend/src/app.js