How darshan-sakdecha/interview-preparation-ai works
This is an AI interview-preparation application: users register or log in, submit a resume and job description, receive a generated interview report, browse saved reports, and can request a tailored resume PDF. The graph separates the browser experience, backend request handling, interview generation, and persistence. The sampled sources show backend routing and controller calls; the frontend-to-backend API links are dashed because the excerpts do not show their HTTP wiring.
Main entry points: interview.routes.js Interview routes · app.routes.jsx Page routes · useAuth.js Auth actions · auth.routes.js Auth routes
Components 25
Web application
- App providers
Frontend/src/App.jsx - Page routes
Frontend/src/app.routes.jsx - Interview pages
Frontend/src/features/interview/pages
Authentication
- Login and register
Frontend/src/features/auth/pages - Protected routes
Frontend/src/features/auth/components/Protected.jsx - Auth actions
Frontend/src/features/auth/hooks/useAuth.js - Auth state
Frontend/src/features/auth/auth.context.jsx - Auth API client
Frontend/src/features/auth/services/auth.api.js
Backend API
- Server startup
Backend/server.js - HTTP application
Backend/src/app.js - Auth routes
Backend/src/routes/auth.routes.js - Interview routes
Backend/src/routes/interview.routes.js - Auth operations
Backend/src/controllers/auth.controller.js - Token validation
Backend/src/middlewares/auth.middleware.js - Resume upload
Backend/src/middlewares/file.middleware.js
Interview workflow
- Interview actions
Frontend/src/features/interview/hooks/useInterview.js - Interview state
Frontend/src/features/interview/interview.context.jsx - Interview API client
Frontend/src/features/interview/services/interview.api.js - Report operations
Backend/src/controllers/interview.controller.js - AI generation
Backend/src/services/ai.service.js
Persistence
- User records
Backend/src/models/user.model.js - Token blacklist
Backend/src/models/blacklist.model.js - Interview reports
Backend/src/models/interviewReport.model.js - Database config
Backend/src/config/db.js
Other components
- Candidate
Connections 29
- Candidate → Login and register: signs in
- Candidate → Interview pages: uses
- App providers → Page routes: provides router
Frontend/src/App.jsx - Page routes → Login and register: routes to
Frontend/src/app.routes.jsx - Page routes → Protected routes: protects
Frontend/src/app.routes.jsx - Page routes → Interview pages: routes to
Frontend/src/app.routes.jsx - Login and register → Auth actions: uses
Frontend/src/features/auth/pages/Login.jsx - Protected routes → Auth actions: checks access
Frontend/src/features/auth/components/Protected.jsx - Auth actions → Auth API client: calls
Frontend/src/features/auth/hooks/useAuth.js - Auth actions → Auth state: updates state
Frontend/src/features/auth/hooks/useAuth.js - Auth state → Auth API client: loads identity
Frontend/src/features/auth/auth.context.jsx - Interview pages → Interview actions: uses
Frontend/src/features/interview/pages/Home.jsx - Interview actions → Interview API client: calls
Frontend/src/features/interview/hooks/useInterview.js - Interview actions → Interview state: updates state
Frontend/src/features/interview/hooks/useInterview.js - Server startup → HTTP application: starts
Backend/server.js - HTTP application → Auth routes: mounts
Backend/src/app.js - HTTP application → Interview routes: mounts
Backend/src/app.js - Auth routes → Auth operations: dispatches
Backend/src/routes/auth.routes.js - Auth routes → Token validation: guards requests
Backend/src/routes/auth.routes.js - Interview routes → Token validation: guards requests
Backend/src/routes/interview.routes.js - Interview routes → Resume upload: parses uploads
Backend/src/routes/interview.routes.js - Interview routes → Report operations: dispatches
Backend/src/routes/interview.routes.js - Auth operations → User records: reads and writes
Backend/src/controllers/auth.controller.js - Auth operations → Token blacklist: blacklists token
Backend/src/controllers/auth.controller.js - Token validation → Token blacklist: checks token
Backend/src/middlewares/auth.middleware.js - Report operations → AI generation: generates content
Backend/src/controllers/interview.controller.js - Report operations → Interview reports: reads and writes
Backend/src/controllers/interview.controller.js - Auth API client → Auth routes: sends HTTP requests
- Interview API client → Interview routes: sends HTTP requests