# arpan-jain-2006/talentpath-ai architecture

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

- Interactive diagram: https://gitdiagram.com/arpan-jain-2006/talentpath-ai
- Repository: https://github.com/arpan-jain-2006/talentpath-ai

## Overview

TalentPath AI supports account-based interview preparation: users sign in, create and revisit AI-generated interview reports from resume/profile and job-description inputs, preview or download tailored resumes, and practice coding in a browser arena. The frontend routes pages through shared auth/interview state and API clients; Express routes authenticate requests before controllers coordinate AI, code execution, and report persistence. Auth also manages session tokens and user records. Evidence is strongest for the sampled routes, controller calls, and frontend imports; unsampled API and AI internals are represented only where the tree or index supports them.

Main entry points: [`frontend/fullfront/src/app.routes.jsx`](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/app.routes.jsx) (Page router), [`backend/src/routes/interview.routes.js`](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/routes/interview.routes.js) (Interview routes), [`frontend/fullfront/src/features/interview/hooks/useInterview.js`](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/hooks/useInterview.js) (Interview actions), [`backend/src/controllers/interview.controller.js`](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/controllers/interview.controller.js) (Interview handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["React app<br/>[App.jsx]"]
  node_router["Page router<br/>[app.routes.jsx]"]
end

subgraph group_auth["Identity"]
  node_auth_pages["Login and register"]
  node_auth_state["Auth state<br/>[auth.context.jsx]"]
  node_auth_hook["Auth actions<br/>[useAuth.js]"]
  node_auth_api["Auth API<br/>[auth.api.js]"]
  node_auth_routes["Auth routes<br/>[auth.routes.js]"]
  node_auth_controller["Auth handlers<br/>[auth.controller.js]"]
  node_auth_middleware["Token guard<br/>[auth.middleware.js]"]
  node_user_store[("User records<br/>[user.model.js]")]
  node_token_store[("Token blacklist<br/>[blacklist.model.js]")]
end

subgraph group_interview["Interview workflow"]
  node_home["Preparation home<br/>[Home.jsx]"]
  node_interview_page["Interview report<br/>[Interview.jsx]"]
  node_assessment["Assessment round"]
  node_coding_page["Coding arena"]
  node_interview_state["Interview state"]
  node_interview_hook["Interview actions<br/>[useInterview.js]"]
  node_interview_api["Interview API<br/>[interview.api.js]"]
end

subgraph group_platform["Backend platform"]
  node_interview_routes["Interview routes"]
  node_upload["File upload<br/>[file.middleware.js]"]
  node_interview_controller["Interview handlers"]
  node_ai_service["AI generation<br/>[ai.service.js]"]
  node_resume_template["Resume template<br/>[resumeTemplate.js]"]
  node_code_service["Code execution"]
  node_report_store[("Interview reports")]
  node_server_app["HTTP application<br/>[app.js]"]
  node_database_config[("Database setup<br/>[database.js]")]
  node_server["Server entry<br/>[server.js]"]
end

node_candidate(("Candidate"))

node_candidate -->|"uses"| node_router
node_app -->|"mounts"| node_router
node_app -->|"provides"| node_auth_state
node_app -->|"provides"| node_interview_state
node_router -->|"routes"| node_auth_pages
node_router -->|"routes"| node_home
node_router -->|"routes"| node_interview_page
node_router -->|"routes"| node_coding_page
node_auth_pages -->|"uses"| node_auth_hook
node_auth_hook -->|"reads"| node_auth_state
node_auth_hook -->|"calls"| node_auth_api
node_auth_state -->|"checks session"| node_auth_api
node_auth_api -.->|"HTTP requests"| node_auth_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_auth_routes -->|"guards"| node_auth_middleware
node_auth_controller -->|"reads/writes"| node_user_store
node_auth_controller -->|"blacklists"| node_token_store
node_auth_middleware -->|"checks"| node_token_store
node_home -->|"uses"| node_interview_hook
node_interview_page -->|"uses"| node_interview_hook
node_interview_page -->|"renders"| node_assessment
node_coding_page -->|"uses"| node_interview_hook
node_interview_hook -->|"reads/writes"| node_interview_state
node_interview_hook -->|"calls"| node_interview_api
node_interview_api -.->|"HTTP requests"| node_interview_routes
node_interview_routes -->|"guards"| node_auth_middleware
node_interview_routes -->|"accepts files"| node_upload
node_interview_routes -->|"dispatches"| node_interview_controller
node_interview_controller -->|"generates report/resume"| node_ai_service
node_interview_controller -->|"runs code"| node_code_service
node_interview_controller -->|"reads/writes"| node_report_store
node_ai_service -->|"uses"| node_resume_template
node_server -->|"starts"| node_server_app
node_server -->|"connects"| node_database_config
node_server_app -->|"mounts"| node_auth_routes
node_server_app -->|"mounts"| node_interview_routes

click node_app "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/App.jsx"
click node_router "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/app.routes.jsx"
click node_auth_pages "https://github.com/arpan-jain-2006/talentpath-ai/tree/main/frontend/fullfront/src/features/auth/pages"
click node_auth_state "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/auth/auth.context.jsx"
click node_auth_hook "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/auth/hooks/useAuth.js"
click node_auth_api "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/auth/services/auth.api.js"
click node_auth_routes "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/routes/auth.routes.js"
click node_auth_controller "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/controllers/auth.controller.js"
click node_auth_middleware "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/middlewares/auth.middleware.js"
click node_user_store "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/models/user.model.js"
click node_token_store "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/models/blacklist.model.js"
click node_home "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/pages/Home.jsx"
click node_interview_page "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/pages/Interview.jsx"
click node_assessment "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/components/AssessmentRound.jsx"
click node_coding_page "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/pages/CodingArenaPage.jsx"
click node_interview_state "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/interview.context.jsx"
click node_interview_hook "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/hooks/useInterview.js"
click node_interview_api "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/services/interview.api.js"
click node_interview_routes "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/routes/interview.routes.js"
click node_upload "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/middlewares/file.middleware.js"
click node_interview_controller "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/controllers/interview.controller.js"
click node_ai_service "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/services/ai.service.js"
click node_resume_template "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/services/resumeTemplate.js"
click node_code_service "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/services/codeExecution.service.js"
click node_report_store "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/models/interviewReport.model.js"
click node_server_app "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/app.js"
click node_database_config "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/config/database.js"
click node_server "https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/server.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_app,node_router toneBlue
class node_auth_pages,node_auth_state,node_auth_hook,node_auth_api,node_auth_routes,node_auth_controller,node_auth_middleware,node_user_store,node_token_store toneAmber
class node_home,node_interview_page,node_assessment,node_coding_page,node_interview_state,node_interview_hook,node_interview_api toneMint
class node_interview_routes,node_upload,node_interview_controller,node_ai_service,node_resume_template,node_code_service,node_report_store,node_server_app,node_database_config,node_server toneRose
class node_candidate toneIndigo
```

## Components

### Web client

- [React app](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/App.jsx): `frontend/fullfront/src/App.jsx`
- [Page router](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/app.routes.jsx): `frontend/fullfront/src/app.routes.jsx`

### Identity

- [Login and register](https://github.com/arpan-jain-2006/talentpath-ai/tree/main/frontend/fullfront/src/features/auth/pages): `frontend/fullfront/src/features/auth/pages`
- [Auth state](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/auth/auth.context.jsx): `frontend/fullfront/src/features/auth/auth.context.jsx`
- [Auth actions](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/auth/hooks/useAuth.js): `frontend/fullfront/src/features/auth/hooks/useAuth.js`
- [Auth API](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/auth/services/auth.api.js): `frontend/fullfront/src/features/auth/services/auth.api.js`
- [Auth routes](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/routes/auth.routes.js): `backend/src/routes/auth.routes.js`
- [Auth handlers](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/controllers/auth.controller.js): `backend/src/controllers/auth.controller.js`
- [Token guard](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/middlewares/auth.middleware.js): `backend/src/middlewares/auth.middleware.js`
- [User records](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/models/user.model.js): `backend/src/models/user.model.js`
- [Token blacklist](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/models/blacklist.model.js): `backend/src/models/blacklist.model.js`

### Interview workflow

- [Preparation home](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/pages/Home.jsx): `frontend/fullfront/src/features/interview/pages/Home.jsx`
- [Interview report](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/pages/Interview.jsx): `frontend/fullfront/src/features/interview/pages/Interview.jsx`
- [Assessment round](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/components/AssessmentRound.jsx): `frontend/fullfront/src/features/interview/components/AssessmentRound.jsx`
- [Coding arena](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/pages/CodingArenaPage.jsx): `frontend/fullfront/src/features/interview/pages/CodingArenaPage.jsx`
- [Interview state](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/interview.context.jsx): `frontend/fullfront/src/features/interview/interview.context.jsx`
- [Interview actions](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/hooks/useInterview.js): `frontend/fullfront/src/features/interview/hooks/useInterview.js`
- [Interview API](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/frontend/fullfront/src/features/interview/services/interview.api.js): `frontend/fullfront/src/features/interview/services/interview.api.js`

### Backend platform

- [Interview routes](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/routes/interview.routes.js): `backend/src/routes/interview.routes.js`
- [File upload](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/middlewares/file.middleware.js): `backend/src/middlewares/file.middleware.js`
- [Interview handlers](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/controllers/interview.controller.js): `backend/src/controllers/interview.controller.js`
- [AI generation](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/services/ai.service.js): `backend/src/services/ai.service.js`
- [Resume template](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/services/resumeTemplate.js): `backend/src/services/resumeTemplate.js`
- [Code execution](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/services/codeExecution.service.js): `backend/src/services/codeExecution.service.js`
- [Interview reports](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/models/interviewReport.model.js): `backend/src/models/interviewReport.model.js`
- [HTTP application](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/app.js): `backend/src/app.js`
- [Database setup](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/src/config/database.js): `backend/src/config/database.js`
- [Server entry](https://github.com/arpan-jain-2006/talentpath-ai/blob/main/backend/server.js): `backend/server.js`

### Other components

- **Candidate**

## Connections

- Candidate → Page router: uses (evidence: `frontend/fullfront/src/app.routes.jsx`)
- React app → Page router: mounts (evidence: `frontend/fullfront/src/App.jsx`)
- React app → Auth state: provides (evidence: `frontend/fullfront/src/App.jsx`)
- React app → Interview state: provides (evidence: `frontend/fullfront/src/App.jsx`)
- Page router → Login and register: routes (evidence: `frontend/fullfront/src/app.routes.jsx`)
- Page router → Preparation home: routes (evidence: `frontend/fullfront/src/app.routes.jsx`)
- Page router → Interview report: routes (evidence: `frontend/fullfront/src/app.routes.jsx`)
- Page router → Coding arena: routes (evidence: `frontend/fullfront/src/app.routes.jsx`)
- Login and register → Auth actions: uses (evidence: `frontend/fullfront/src/features/auth/pages/Login.jsx`)
- Auth actions → Auth state: reads (evidence: `frontend/fullfront/src/features/auth/hooks/useAuth.js`)
- Auth actions → Auth API: calls (evidence: `frontend/fullfront/src/features/auth/hooks/useAuth.js`)
- Auth state → Auth API: checks session (evidence: `frontend/fullfront/src/features/auth/auth.context.jsx`)
- Auth API → Auth routes: HTTP requests
- Auth routes → Auth handlers: dispatches (evidence: `backend/src/routes/auth.routes.js`)
- Auth routes → Token guard: guards (evidence: `backend/src/routes/auth.routes.js`)
- Auth handlers → User records: reads/writes (evidence: `backend/src/controllers/auth.controller.js`)
- Auth handlers → Token blacklist: blacklists (evidence: `backend/src/controllers/auth.controller.js`)
- Token guard → Token blacklist: checks (evidence: `backend/src/middlewares/auth.middleware.js`)
- Preparation home → Interview actions: uses (evidence: `frontend/fullfront/src/features/interview/pages/Home.jsx`)
- Interview report → Interview actions: uses (evidence: `frontend/fullfront/src/features/interview/pages/Interview.jsx`)
- Interview report → Assessment round: renders (evidence: `frontend/fullfront/src/features/interview/pages/Interview.jsx`)
- Coding arena → Interview actions: uses (evidence: `frontend/fullfront/src/features/interview/pages/CodingArenaPage.jsx`)
- Interview actions → Interview state: reads/writes (evidence: `frontend/fullfront/src/features/interview/hooks/useInterview.js`)
- Interview actions → Interview API: calls (evidence: `frontend/fullfront/src/features/interview/hooks/useInterview.js`)
- Interview API → Interview routes: HTTP requests
- Interview routes → Token guard: guards (evidence: `backend/src/routes/interview.routes.js`)
- Interview routes → File upload: accepts files (evidence: `backend/src/routes/interview.routes.js`)
- Interview routes → Interview handlers: dispatches (evidence: `backend/src/routes/interview.routes.js`)
- Interview handlers → AI generation: generates report/resume (evidence: `backend/src/controllers/interview.controller.js`)
- Interview handlers → Code execution: runs code (evidence: `backend/src/controllers/interview.controller.js`)
- Interview handlers → Interview reports: reads/writes (evidence: `backend/src/controllers/interview.controller.js`)
- AI generation → Resume template: uses (evidence: `backend/src/services/ai.service.js`)
- Server entry → HTTP application: starts (evidence: `backend/server.js`)
- Server entry → Database setup: connects (evidence: `backend/server.js`)
- HTTP application → Auth routes: mounts (evidence: `backend/src/app.js`)
- HTTP application → Interview routes: mounts (evidence: `backend/src/app.js`)
