# vinay024815-star/advanced-ats architecture

> Architecture diagram of the GitHub repository vinay024815-star/advanced-ats, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vinay024815-star/advanced-ats
- Repository: https://github.com/vinay024815-star/advanced-ats

## Overview

#### Purpose and Entry Points
This repository implements a resume-to-job-description matching system with a React frontend and Node.js backend. The client starts at `frontend/src/main.jsx` and routes through `frontend/src/App.jsx`. The API server starts from `backend/index.js`.

#### Frontend Application Shell
The Vite-based React client provides authentication, landing, dashboard, PDF editing, and home views. Authentication state is centralized in `frontend/src/context/authContext.jsx`; primary user-facing flows live in `frontend/src/pages/SignIn.jsx`, `frontend/src/pages/Dashboard.jsx`, and `frontend/src/pages/EditPdf.jsx`.

#### API Routing and Request Boundary
The backend exposes separate route groups for users, resume upload, job descriptions, and matching:
- `backend/src/routes/user.route.js`
- `backend/src/routes/upload.route.js`
- `backend/src/routes/jd.route.js`
- `backend/src/routes/match.route.js`

Controllers own HTTP-level orchestration and translate route requests into persistence and parsing/matching operations, including `backend/src/controllers/resume.controller.js`, `backend/src/controllers/jd.controller.js`, and `backend/src/controllers/match.controller.js`.

#### Identity, Validation, and Upload Security
Authentication is enforced at the middleware boundary by `backend/src/middlewares/auth.middleware.js`. Credential input validation is defined in `backend/src/validators/auth.validator.js`, while file intake is handled by `backend/src/middlewares/upload.middleware.js`. These boundaries should protect downstream parsing and user-owned resume/JD records.

#### Resume and Job Description Processing
Uploaded resume content is parsed and normalized before matching. The processing pipeline is represented by:
- `backend/src/services/resumeParser.js`
- `backend/src/services/sectionSplitter.js`
- `backend/src/services/resumeStructure.js`

Job descriptions receive comparable structural processing through `backend/src/services/jdStructure.js`. This establishes a shared structured-text boundary between raw document input and scoring.

#### Matching Pipeline and Results
Matching derives keywords and scores from structured resume and JD data via `backend/src/services/keywordMatcher.js` and `backend/src/services/matchScore.js`. Result persistence is modeled by `backend/src/models/matchResult.model.js`, enabling matching requests to produce durable, retrievable assessments rather than only transient responses.

#### Persistence and Runtime Dependencies
The backend uses a database connection layer at `backend/src/config/db.js` and domain models for users, resumes, and job descriptions:
- `backend/src/models/user.model.js`
- `backend/src/models/resume.model.js`
- `backend/src/models/jd.model.js`

Node.js runs both the API and PDF-processing dependencies; `backend/pdf-parse.js` and `backend/operating-systems.pdf` indicate local PDF parsing capability. The frontend is a separate Vite runtime defined by `frontend/package.json` and `frontend/vite.config.js`.

Main entry points: [`backend/index.js`](https://github.com/vinay024815-star/advanced-ats/blob/main/backend/index.js) (API server), [`frontend/src/App.jsx`](https://github.com/vinay024815-star/advanced-ats/blob/main/frontend/src/App.jsx) (App routing), [`backend/src/config/db.js`](https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/config/db.js) (Database connection), [`frontend/src/pages/EditPdf.jsx`](https://github.com/vinay024815-star/advanced-ats/blob/main/frontend/src/pages/EditPdf.jsx) (PDF editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React Client"]
  node_client_entry["Client entry<br/>React entry<br/>[main.jsx]"]
  node_app_shell["App routing<br/>React shell<br/>[App.jsx]"]
  node_auth_state["Auth state<br/>React context<br/>[authContext.jsx]"]
  node_user_views["Sign-in and dashboard<br/>React pages"]
  node_pdf_editor["PDF editor<br/>React page<br/>[EditPdf.jsx]"]
end

subgraph group_api["Node API"]
  node_api_entry["API server<br/>Node entry<br/>[index.js]"]
  node_user_routes["User routes<br/>HTTP routes<br/>[user.route.js]"]
  node_document_routes["Resume and JD routes<br/>HTTP routes"]
  node_match_routes["Match routes<br/>HTTP routes<br/>[match.route.js]"]
  node_security_boundary["Auth, validation, upload<br/>middleware"]
  node_document_controllers["Resume and JD controllers<br/>HTTP controllers"]
  node_match_controller["Match controller<br/>HTTP controller"]
end

subgraph group_processing["Document Processing"]
  node_resume_pipeline["Resume structuring<br/>parsing pipeline"]
  node_jd_structure["JD structuring<br/>text processor<br/>[jdStructure.js]"]
  node_matching_engine["Keyword scoring<br/>matching pipeline"]
end

subgraph group_data["Persistence"]
  node_db_connection[("Database connection<br/>database adapter<br/>[db.js]")]
  node_domain_models[("Users, resumes, JDs<br/>domain models")]
  node_match_results[("Match results<br/>result model")]
end

node_client_entry -->|"mounts"| node_app_shell
node_app_shell -->|"uses"| node_auth_state
node_app_shell -->|"routes to"| node_user_views
node_app_shell -->|"routes to"| node_pdf_editor
node_user_views -->|"API requests"| node_api_entry
node_pdf_editor -->|"upload/edit requests"| node_api_entry
node_api_entry -->|"mounts"| node_user_routes
node_api_entry -->|"mounts"| node_document_routes
node_api_entry -->|"mounts"| node_match_routes
node_user_routes -->|"guards"| node_security_boundary
node_document_routes -->|"validates intake"| node_security_boundary
node_security_boundary -->|"passes requests"| node_document_controllers
node_document_routes -->|"dispatches"| node_document_controllers
node_match_routes -->|"dispatches"| node_match_controller
node_document_controllers -->|"processes resumes"| node_resume_pipeline
node_document_controllers -->|"structures JDs"| node_jd_structure
node_resume_pipeline -->|"stores structured resumes"| node_domain_models
node_jd_structure -->|"stores structured JDs"| node_domain_models
node_match_controller -->|"runs"| node_matching_engine
node_domain_models -->|"supplies structured data"| node_matching_engine
node_matching_engine -->|"persists assessment"| node_match_results
node_db_connection -->|"backs"| node_domain_models
node_db_connection -->|"backs"| node_match_results

click node_client_entry "https://github.com/vinay024815-star/advanced-ats/blob/main/frontend/src/main.jsx"
click node_app_shell "https://github.com/vinay024815-star/advanced-ats/blob/main/frontend/src/App.jsx"
click node_auth_state "https://github.com/vinay024815-star/advanced-ats/blob/main/frontend/src/context/authContext.jsx"
click node_pdf_editor "https://github.com/vinay024815-star/advanced-ats/blob/main/frontend/src/pages/EditPdf.jsx"
click node_api_entry "https://github.com/vinay024815-star/advanced-ats/blob/main/backend/index.js"
click node_user_routes "https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/routes/user.route.js"
click node_match_routes "https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/routes/match.route.js"
click node_match_controller "https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/controllers/match.controller.js"
click node_jd_structure "https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/services/jdStructure.js"
click node_db_connection "https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/config/db.js"
click node_match_results "https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/models/matchResult.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_client_entry,node_app_shell,node_auth_state,node_user_views,node_pdf_editor toneBlue
class node_api_entry,node_user_routes,node_document_routes,node_match_routes,node_security_boundary,node_document_controllers,node_match_controller toneAmber
class node_resume_pipeline,node_jd_structure,node_matching_engine toneMint
class node_db_connection,node_domain_models,node_match_results toneRose
```

## Components

### React Client

Vite React application.

- [Client entry](https://github.com/vinay024815-star/advanced-ats/blob/main/frontend/src/main.jsx): React entry · `frontend/src/main.jsx`
- [App routing](https://github.com/vinay024815-star/advanced-ats/blob/main/frontend/src/App.jsx): React shell · `frontend/src/App.jsx`
- [Auth state](https://github.com/vinay024815-star/advanced-ats/blob/main/frontend/src/context/authContext.jsx): React context · `frontend/src/context/authContext.jsx`
- **Sign-in and dashboard**: React pages
- [PDF editor](https://github.com/vinay024815-star/advanced-ats/blob/main/frontend/src/pages/EditPdf.jsx): React page · `frontend/src/pages/EditPdf.jsx`

### Node API

HTTP boundary and request orchestration.

- [API server](https://github.com/vinay024815-star/advanced-ats/blob/main/backend/index.js): Node entry · `backend/index.js`
- [User routes](https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/routes/user.route.js): HTTP routes · `backend/src/routes/user.route.js`
- **Resume and JD routes**: HTTP routes
- [Match routes](https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/routes/match.route.js): HTTP routes · `backend/src/routes/match.route.js`
- **Auth, validation, upload**: middleware · Protects credentials and file intake before controllers.
- **Resume and JD controllers**: HTTP controllers
- [Match controller](https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/controllers/match.controller.js): HTTP controller · `backend/src/controllers/match.controller.js`

### Document Processing

Structured-text and scoring pipeline.

- **Resume structuring**: parsing pipeline · Parses, splits, and normalizes uploaded resumes.
- [JD structuring](https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/services/jdStructure.js): text processor · `backend/src/services/jdStructure.js`
- **Keyword scoring**: matching pipeline · Derives keywords and match scores from structured documents.

### Persistence

Database-backed domain records.

- [Database connection](https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/config/db.js): database adapter · `backend/src/config/db.js`
- **Users, resumes, JDs**: domain models
- [Match results](https://github.com/vinay024815-star/advanced-ats/blob/main/backend/src/models/matchResult.model.js): result model · Durable matching assessments. · `backend/src/models/matchResult.model.js`

## Connections

- Client entry → App routing: mounts
- App routing → Auth state: uses
- App routing → Sign-in and dashboard: routes to
- App routing → PDF editor: routes to
- Sign-in and dashboard → API server: API requests
- PDF editor → API server: upload/edit requests
- API server → User routes: mounts
- API server → Resume and JD routes: mounts
- API server → Match routes: mounts
- User routes → Auth, validation, upload: guards
- Resume and JD routes → Auth, validation, upload: validates intake
- Auth, validation, upload → Resume and JD controllers: passes requests
- Resume and JD routes → Resume and JD controllers: dispatches
- Match routes → Match controller: dispatches
- Resume and JD controllers → Resume structuring: processes resumes
- Resume and JD controllers → JD structuring: structures JDs
- Resume structuring → Users, resumes, JDs: stores structured resumes
- JD structuring → Users, resumes, JDs: stores structured JDs
- Match controller → Keyword scoring: runs
- Users, resumes, JDs → Keyword scoring: supplies structured data
- Keyword scoring → Match results: persists assessment
- Database connection → Users, resumes, JDs: backs
- Database connection → Match results: backs
