# vaibhvee012/interviewly-ai architecture

> Architecture diagram of the GitHub repository vaibhvee012/interviewly-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vaibhvee012/interviewly-ai
- Repository: https://github.com/vaibhvee012/interviewly-ai

## Overview

Interviewly AI guides candidates from account access and role/profile inputs to AI-generated interview reports and preparation materials. The frontend calls REST endpoints; backend controllers own authentication, report generation, retrieval, and resume-PDF actions. Report content is generated through the AI service and persisted as interview-report records. README capabilities include technical and behavioral questions, skill-gap analysis, match scoring, and a preparation roadmap. Edges reflect sampled routes/controllers and documented behavior; unsampled frontend screens and backend internals are represented only at supported paths.

Main entry points: [`Backend/src/app.js`](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/app.js) (Express application), [`Backend/src/routes/interview.routes.js`](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/routes/interview.routes.js) (Interview endpoints), [`Backend/src/controllers/interview.controller.js`](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/controllers/interview.controller.js) (Report handlers), [`Frontend/src/app.routes.jsx`](https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/app.routes.jsx) (Page routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Candidate interface"]
  node_web["Web application<br/>[main.jsx]"]
  node_routes["Page routing<br/>[app.routes.jsx]"]
  node_authui["Sign in/up"]
  node_authhook["Auth actions<br/>[useAuth.js]"]
  node_interviewui["Plan and report UI"]
  node_interviewhook["Interview actions<br/>[useInterview.js]"]
  node_authapi["Auth API client<br/>[auth.api.js]"]
  node_interviewapi["Interview API client<br/>[interview.api.js]"]
end

subgraph group_auth["Identity and access"]
  node_authroutes["Auth endpoints<br/>[auth.routes.js]"]
  node_authcontroller["Auth handlers<br/>[auth.controller.js]"]
  node_authmiddleware["JWT middleware<br/>[auth.middleware.js]"]
  node_users[("User records<br/>[user.model.js]")]
  node_blacklist[("Token blacklist<br/>[blacklist.model.js]")]
end

subgraph group_planning["Interview planning"]
  node_interviewroutes["Interview endpoints"]
  node_interviewcontroller["Report handlers"]
  node_fileupload["Resume upload<br/>[file.middleware.js]"]
  node_ai["AI generation<br/>[ai.service.js]"]
  node_reports[("Interview reports")]
end

subgraph group_platform["API and persistence"]
  node_server["Express application<br/>[app.js]"]
  node_database["MongoDB connection<br/>[database.js]"]
end

node_candidate(("Candidate"))
node_gemini{{"Google Gemini"}}
node_browserpdf{{"PDF renderer"}}

node_candidate -->|"uses"| node_web
node_web -->|"renders"| node_routes
node_routes -->|"routes to"| node_authui
node_routes -->|"routes to"| node_interviewui
node_authui -->|"invokes"| node_authhook
node_authhook -->|"calls"| node_authapi
node_interviewui -->|"invokes"| node_interviewhook
node_interviewhook -->|"calls"| node_interviewapi
node_authapi -->|"REST requests"| node_server
node_interviewapi -->|"REST requests"| node_server
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_interviewroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_authroutes -->|"protects"| node_authmiddleware
node_authcontroller -->|"reads/writes"| node_users
node_authcontroller -->|"blacklists token"| node_blacklist
node_interviewroutes -->|"protects"| node_authmiddleware
node_interviewroutes -->|"accepts resume"| node_fileupload
node_interviewroutes -->|"dispatches"| node_interviewcontroller
node_interviewcontroller -->|"generates report"| node_ai
node_interviewcontroller -->|"reads/writes"| node_reports
node_ai -->|"generates content"| node_gemini
node_ai -->|"renders PDF"| node_browserpdf
node_interviewcontroller -->|"returns report/PDF"| node_candidate
node_server -->|"connects"| node_database

click node_web "https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/main.jsx"
click node_routes "https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/app.routes.jsx"
click node_authui "https://github.com/vaibhvee012/interviewly-ai/tree/main/Frontend/src/features/auth/pages"
click node_authhook "https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/features/auth/hooks/useAuth.js"
click node_interviewui "https://github.com/vaibhvee012/interviewly-ai/tree/main/Frontend/src/features/interview/pages"
click node_interviewhook "https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/features/interview/hooks/useInterview.js"
click node_authapi "https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/features/auth/services/auth.api.js"
click node_interviewapi "https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/features/interview/services/interview.api.js"
click node_authroutes "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/routes/auth.routes.js"
click node_authcontroller "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/controllers/auth.controller.js"
click node_authmiddleware "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/middlewares/auth.middleware.js"
click node_users "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/models/user.model.js"
click node_blacklist "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/models/blacklist.model.js"
click node_interviewroutes "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/routes/interview.routes.js"
click node_interviewcontroller "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/controllers/interview.controller.js"
click node_fileupload "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/middlewares/file.middleware.js"
click node_ai "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/services/ai.service.js"
click node_reports "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/models/interviewReport.model.js"
click node_server "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/app.js"
click node_database "https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/config/database.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_routes,node_authui,node_authhook,node_interviewui,node_interviewhook,node_authapi,node_interviewapi toneBlue
class node_authroutes,node_authcontroller,node_authmiddleware,node_users,node_blacklist toneAmber
class node_interviewroutes,node_interviewcontroller,node_fileupload,node_ai,node_reports toneMint
class node_server,node_database toneRose
class node_candidate,node_gemini,node_browserpdf toneIndigo
```

## Components

### Candidate interface

- [Web application](https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/main.jsx): `Frontend/src/main.jsx`
- [Page routing](https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/app.routes.jsx): `Frontend/src/app.routes.jsx`
- [Sign in/up](https://github.com/vaibhvee012/interviewly-ai/tree/main/Frontend/src/features/auth/pages): `Frontend/src/features/auth/pages`
- [Auth actions](https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/features/auth/hooks/useAuth.js): `Frontend/src/features/auth/hooks/useAuth.js`
- [Plan and report UI](https://github.com/vaibhvee012/interviewly-ai/tree/main/Frontend/src/features/interview/pages): `Frontend/src/features/interview/pages`
- [Interview actions](https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/features/interview/hooks/useInterview.js): `Frontend/src/features/interview/hooks/useInterview.js`
- [Auth API client](https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/features/auth/services/auth.api.js): `Frontend/src/features/auth/services/auth.api.js`
- [Interview API client](https://github.com/vaibhvee012/interviewly-ai/blob/main/Frontend/src/features/interview/services/interview.api.js): `Frontend/src/features/interview/services/interview.api.js`

### Identity and access

- [Auth endpoints](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/routes/auth.routes.js): `Backend/src/routes/auth.routes.js`
- [Auth handlers](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/controllers/auth.controller.js): `Backend/src/controllers/auth.controller.js`
- [JWT middleware](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/middlewares/auth.middleware.js): `Backend/src/middlewares/auth.middleware.js`
- [User records](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/models/user.model.js): `Backend/src/models/user.model.js`
- [Token blacklist](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/models/blacklist.model.js): `Backend/src/models/blacklist.model.js`

### Interview planning

- [Interview endpoints](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/routes/interview.routes.js): `Backend/src/routes/interview.routes.js`
- [Report handlers](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/controllers/interview.controller.js): `Backend/src/controllers/interview.controller.js`
- [Resume upload](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/middlewares/file.middleware.js): `Backend/src/middlewares/file.middleware.js`
- [AI generation](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/services/ai.service.js): `Backend/src/services/ai.service.js`
- [Interview reports](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/models/interviewReport.model.js): `Backend/src/models/interviewReport.model.js`

### API and persistence

- [Express application](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/app.js): `Backend/src/app.js`
- [MongoDB connection](https://github.com/vaibhvee012/interviewly-ai/blob/main/Backend/src/config/database.js): `Backend/src/config/database.js`

### Other components

- **Candidate**
- **Google Gemini**
- **PDF renderer**

## Connections

- Candidate → Web application: uses
- Web application → Page routing: renders
- Page routing → Sign in/up: routes to
- Page routing → Plan and report UI: routes to
- Sign in/up → Auth actions: invokes
- Auth actions → Auth API client: calls
- Plan and report UI → Interview actions: invokes
- Interview actions → Interview API client: calls
- Auth API client → Express application: REST requests
- Interview API client → Express application: REST requests
- Express application → Auth endpoints: mounts
- Express application → Interview endpoints: mounts
- Auth endpoints → Auth handlers: dispatches
- Auth endpoints → JWT middleware: protects
- Auth handlers → User records: reads/writes
- Auth handlers → Token blacklist: blacklists token
- Interview endpoints → JWT middleware: protects
- Interview endpoints → Resume upload: accepts resume
- Interview endpoints → Report handlers: dispatches
- Report handlers → AI generation: generates report
- Report handlers → Interview reports: reads/writes
- AI generation → Google Gemini: generates content
- AI generation → PDF renderer: renders PDF
- Report handlers → Candidate: returns report/PDF
- Express application → MongoDB connection: connects
