# sanoj-936/resumatch architecture

> Architecture diagram of the GitHub repository sanoj-936/resumatch, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sanoj-936/resumatch
- Repository: https://github.com/sanoj-936/resumatch

## Overview

ResuMatch turns a resume or self-description and a job description into a saved interview strategy, then supports report review, topic study and quizzes, progress tracking, and tailored resume PDF downloads. The principal path runs from the authenticated React dashboard through interview API routes and controllers to Gemini and report persistence; subsequent study and download actions reuse saved reports. The graph combines sampled call sites with README-documented capabilities and architecture; unsampled internals, including PDF rendering, are represented only where documented.

Main entry points: [`Backend/src/controllers/interview.controller.js`](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/controllers/interview.controller.js) (Interview controller), [`Backend/src/app.js`](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/app.js) (Express app), [`Backend/src/services/ai.service.js`](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/services/ai.service.js) (AI generation service), [`Frontend/src/features/interview/hooks/useInterview.js`](https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/hooks/useInterview.js) (Interview workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_auth_pages["Login and register<br/>[Register.jsx]"]
  node_auth_hook["Auth logic<br/>[useAuth.js]"]
  node_auth_api["Auth API client<br/>[auth.api.js]"]
  node_route_guard["Protected routes<br/>[Protected.jsx]"]
  node_dashboard["Reports dashboard<br/>[Home.jsx]"]
  node_report_view["Report viewer<br/>[Interview.jsx]"]
  node_study_room["Study room and quiz<br/>[LearningPage.jsx]"]
  node_interview_hook["Interview workflow<br/>[useInterview.js]"]
  node_interview_api["Interview API client<br/>[interview.api.js]"]
end

subgraph group_backend["Backend API"]
  node_api_app["Express app<br/>[app.js]"]
  node_auth_routes["Auth routes<br/>[auth.routes.js]"]
  node_interview_routes["Interview routes"]
  node_auth_controller["Auth controller<br/>[auth.controller.js]"]
  node_auth_middleware["JWT middleware<br/>[auth.middleware.js]"]
end

subgraph group_strategy["Strategy and learning"]
  node_interview_controller["Interview controller"]
  node_ai_service["AI generation service<br/>[ai.service.js]"]
  node_pdf_renderer["Resume PDF renderer"]
end

subgraph group_data["Persistence"]
  node_users[("Users<br/>[user.model.js]")]
  node_reports[("Interview reports")]
  node_token_blacklist[("Token blacklist<br/>[blacklist.model.js]")]
end

subgraph group_external["External services"]
  node_gemini{{"Google Gemini"}}
  node_mongodb[("MongoDB")]
end

node_user(("User"))

node_user -->|"registers or logs in"| node_auth_pages
node_user -->|"submits job inputs"| node_dashboard
node_auth_pages -->|"uses"| node_auth_hook
node_auth_hook -->|"calls"| node_auth_api
node_auth_api -.->|"sends requests"| node_api_app
node_api_app -->|"mounts"| node_auth_routes
node_api_app -->|"mounts"| node_interview_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_auth_routes -->|"protects session lookup"| node_auth_middleware
node_auth_controller -->|"reads and creates"| node_users
node_auth_controller -->|"blacklists on logout"| node_token_blacklist
node_auth_middleware -->|"checks token"| node_token_blacklist
node_auth_middleware -->|"guards requests"| node_interview_routes
node_user -->|"accesses features"| node_route_guard
node_route_guard -->|"allows authenticated"| node_dashboard
node_route_guard -->|"allows authenticated"| node_report_view
node_dashboard -->|"requests reports"| node_interview_hook
node_report_view -->|"loads strategy"| node_interview_hook
node_report_view -->|"renders"| node_study_room
node_study_room -.->|"requests study and progress"| node_interview_hook
node_interview_hook -->|"calls"| node_interview_api
node_interview_api -.->|"sends requests"| node_api_app
node_interview_routes -->|"dispatches"| node_interview_controller
node_interview_controller -->|"generates report and study material"| node_ai_service
node_interview_controller -->|"creates and queries"| node_reports
node_interview_controller -->|"requests tailored resume"| node_ai_service
node_ai_service -->|"generates structured content"| node_gemini
node_ai_service -.->|"renders resume HTML"| node_pdf_renderer
node_reports -.->|"persists reports"| node_mongodb
node_users -.->|"persists accounts"| node_mongodb
node_token_blacklist -.->|"persists revoked tokens"| node_mongodb

click node_auth_pages "https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/auth/pages/Register.jsx"
click node_auth_hook "https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/auth/hooks/useAuth.js"
click node_auth_api "https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/auth/services/auth.api.js"
click node_route_guard "https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/auth/components/Protected.jsx"
click node_dashboard "https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/pages/Home.jsx"
click node_report_view "https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/pages/Interview.jsx"
click node_study_room "https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/components/LearningPage.jsx"
click node_interview_hook "https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/hooks/useInterview.js"
click node_interview_api "https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/services/interview.api.js"
click node_api_app "https://github.com/sanoj-936/resumatch/blob/master/Backend/src/app.js"
click node_auth_routes "https://github.com/sanoj-936/resumatch/blob/master/Backend/src/routes/auth.routes.js"
click node_interview_routes "https://github.com/sanoj-936/resumatch/blob/master/Backend/src/routes/interview.routes.js"
click node_auth_controller "https://github.com/sanoj-936/resumatch/blob/master/Backend/src/controllers/auth.controller.js"
click node_auth_middleware "https://github.com/sanoj-936/resumatch/blob/master/Backend/src/middlewares/auth.middleware.js"
click node_interview_controller "https://github.com/sanoj-936/resumatch/blob/master/Backend/src/controllers/interview.controller.js"
click node_ai_service "https://github.com/sanoj-936/resumatch/blob/master/Backend/src/services/ai.service.js"
click node_users "https://github.com/sanoj-936/resumatch/blob/master/Backend/src/models/user.model.js"
click node_reports "https://github.com/sanoj-936/resumatch/blob/master/Backend/src/models/interviewReport.model.js"
click node_token_blacklist "https://github.com/sanoj-936/resumatch/blob/master/Backend/src/models/blacklist.model.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_auth_pages,node_auth_hook,node_auth_api,node_route_guard,node_dashboard,node_report_view,node_study_room,node_interview_hook,node_interview_api,node_user toneBlue
class node_api_app,node_auth_routes,node_interview_routes,node_auth_controller,node_auth_middleware toneAmber
class node_interview_controller,node_ai_service,node_pdf_renderer toneMint
class node_users,node_reports,node_token_blacklist toneRose
class node_gemini,node_mongodb toneIndigo
```

## Components

### Frontend

- [Login and register](https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/auth/pages/Register.jsx): `Frontend/src/features/auth/pages/Register.jsx`
- [Auth logic](https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/auth/hooks/useAuth.js): `Frontend/src/features/auth/hooks/useAuth.js`
- [Auth API client](https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/auth/services/auth.api.js): `Frontend/src/features/auth/services/auth.api.js`
- [Protected routes](https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/auth/components/Protected.jsx): `Frontend/src/features/auth/components/Protected.jsx`
- [Reports dashboard](https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/pages/Home.jsx): `Frontend/src/features/interview/pages/Home.jsx`
- [Report viewer](https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/pages/Interview.jsx): `Frontend/src/features/interview/pages/Interview.jsx`
- [Study room and quiz](https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/components/LearningPage.jsx): `Frontend/src/features/interview/components/LearningPage.jsx`
- [Interview workflow](https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/hooks/useInterview.js): `Frontend/src/features/interview/hooks/useInterview.js`
- [Interview API client](https://github.com/sanoj-936/resumatch/blob/master/Frontend/src/features/interview/services/interview.api.js): `Frontend/src/features/interview/services/interview.api.js`

### Backend API

- [Express app](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/app.js): `Backend/src/app.js`
- [Auth routes](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/routes/auth.routes.js): `Backend/src/routes/auth.routes.js`
- [Interview routes](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/routes/interview.routes.js): `Backend/src/routes/interview.routes.js`
- [Auth controller](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/controllers/auth.controller.js): `Backend/src/controllers/auth.controller.js`
- [JWT middleware](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/middlewares/auth.middleware.js): `Backend/src/middlewares/auth.middleware.js`

### Strategy and learning

- [Interview controller](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/controllers/interview.controller.js): `Backend/src/controllers/interview.controller.js`
- [AI generation service](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/services/ai.service.js): `Backend/src/services/ai.service.js`
- **Resume PDF renderer**

### Persistence

- [Users](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/models/user.model.js): `Backend/src/models/user.model.js`
- [Interview reports](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/models/interviewReport.model.js): `Backend/src/models/interviewReport.model.js`
- [Token blacklist](https://github.com/sanoj-936/resumatch/blob/master/Backend/src/models/blacklist.model.js): `Backend/src/models/blacklist.model.js`

### External services

- **Google Gemini**
- **MongoDB**

### Other components

- **User**

## Connections

- User → Login and register: registers or logs in (evidence: `README.md`)
- User → Reports dashboard: submits job inputs (evidence: `README.md`)
- Login and register → Auth logic: uses (evidence: `Frontend/src/features/auth/pages/Register.jsx`)
- Auth logic → Auth API client: calls (evidence: `Frontend/src/features/auth/hooks/useAuth.js`)
- Auth API client → Express app: sends requests (evidence: `README.md`)
- Express app → Auth routes: mounts (evidence: `Backend/src/app.js`)
- Express app → Interview routes: mounts (evidence: `Backend/src/app.js`)
- Auth routes → Auth controller: dispatches (evidence: `Backend/src/routes/auth.routes.js`)
- Auth routes → JWT middleware: protects session lookup (evidence: `Backend/src/routes/auth.routes.js`)
- Auth controller → Users: reads and creates (evidence: `Backend/src/controllers/auth.controller.js`)
- Auth controller → Token blacklist: blacklists on logout (evidence: `Backend/src/controllers/auth.controller.js`)
- JWT middleware → Token blacklist: checks token (evidence: `Backend/src/middlewares/auth.middleware.js`)
- JWT middleware → Interview routes: guards requests (evidence: `Backend/src/routes/interview.routes.js`)
- User → Protected routes: accesses features (evidence: `README.md`)
- Protected routes → Reports dashboard: allows authenticated (evidence: `Frontend/src/app.routes.jsx`)
- Protected routes → Report viewer: allows authenticated (evidence: `Frontend/src/app.routes.jsx`)
- Reports dashboard → Interview workflow: requests reports (evidence: `Frontend/src/features/interview/pages/Home.jsx`)
- Report viewer → Interview workflow: loads strategy (evidence: `Frontend/src/features/interview/pages/Interview.jsx`)
- Report viewer → Study room and quiz: renders (evidence: `Frontend/src/features/interview/pages/Interview.jsx`)
- Study room and quiz → Interview workflow: requests study and progress (evidence: `README.md`)
- Interview workflow → Interview API client: calls (evidence: `Frontend/src/features/interview/hooks/useInterview.js`)
- Interview API client → Express app: sends requests (evidence: `README.md`)
- Interview routes → Interview controller: dispatches (evidence: `Backend/src/routes/interview.routes.js`)
- Interview controller → AI generation service: generates report and study material (evidence: `Backend/src/controllers/interview.controller.js`)
- Interview controller → Interview reports: creates and queries (evidence: `Backend/src/controllers/interview.controller.js`)
- Interview controller → AI generation service: requests tailored resume (evidence: `Backend/src/controllers/interview.controller.js`)
- AI generation service → Google Gemini: generates structured content (evidence: `README.md`)
- AI generation service → Resume PDF renderer: renders resume HTML (evidence: `README.md`)
- Interview reports → MongoDB: persists reports (evidence: `README.md`)
- Users → MongoDB: persists accounts (evidence: `README.md`)
- Token blacklist → MongoDB: persists revoked tokens (evidence: `README.md`)
