# riyaz510/jd-match-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/riyaz510/jd-match-analyzer
- Repository: https://github.com/riyaz510/jd-match-analyzer

## Overview

JD Match Analyzer accepts job-description and resume text or PDFs, sends the inputs for an LLM comparison, and displays the structured result. The README also advertises MongoDB persistence, but the sampled request handler does not show a write; the schema and connection are shown without an inferred save relationship. The frontend’s request path and response handling are visible in sampled source.

Main entry points: [`Controllers/Requests.js`](https://github.com/riyaz510/jd-match-analyzer/blob/main/Controllers/Requests.js) (Request handler), [`Views/src/components/Main.jsx`](https://github.com/riyaz510/jd-match-analyzer/blob/main/Views/src/components/Main.jsx) (Input form), [`Routes/routes.js`](https://github.com/riyaz510/jd-match-analyzer/blob/main/Routes/routes.js) (Analyze route), [`app.js`](https://github.com/riyaz510/jd-match-analyzer/blob/main/app.js) (Express app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_main["Input form<br/>[Main.jsx]"]
  node_ui["App state<br/>[App.jsx]"]
  node_result["Result display<br/>[Result.jsx]"]
end

subgraph group_backend["Analysis API"]
  node_app["Express app<br/>[app.js]"]
  node_routes["Analyze route<br/>[routes.js]"]
  node_requests["Request handler<br/>[Requests.js]"]
end

subgraph group_analysis["Analysis services"]
  node_pdf["PDF extraction<br/>[Requests.js]"]
  node_matcher["Match analysis<br/>[Analyze.js]"]
end

subgraph group_persistence["Persistence"]
  node_dbconnect["Mongo connection<br/>[db.js]"]
  node_analysismodel[("Analysis schema<br/>[Analysis.js]")]
end

node_user(("Applicant"))
node_groq{{"Groq API"}}

node_user -->|"enters inputs"| node_main
node_main -->|"POST /analyze"| node_routes
node_app -->|"mounts routes"| node_routes
node_routes -->|"dispatches"| node_requests
node_requests -->|"extracts PDFs"| node_pdf
node_requests -->|"submits text"| node_matcher
node_matcher -->|"requests comparison"| node_groq
node_requests -->|"returns result"| node_main
node_main -->|"sets result"| node_ui
node_ui -->|"passes result"| node_result
node_app -->|"connects database"| node_dbconnect

click node_app "https://github.com/riyaz510/jd-match-analyzer/blob/main/app.js"
click node_routes "https://github.com/riyaz510/jd-match-analyzer/blob/main/Routes/routes.js"
click node_requests "https://github.com/riyaz510/jd-match-analyzer/blob/main/Controllers/Requests.js"
click node_main "https://github.com/riyaz510/jd-match-analyzer/blob/main/Views/src/components/Main.jsx"
click node_ui "https://github.com/riyaz510/jd-match-analyzer/blob/main/Views/src/App.jsx"
click node_result "https://github.com/riyaz510/jd-match-analyzer/blob/main/Views/src/components/Result.jsx"
click node_pdf "https://github.com/riyaz510/jd-match-analyzer/blob/main/Controllers/Requests.js"
click node_matcher "https://github.com/riyaz510/jd-match-analyzer/blob/main/Models/Analyze.js"
click node_dbconnect "https://github.com/riyaz510/jd-match-analyzer/blob/main/DataBase/db.js"
click node_analysismodel "https://github.com/riyaz510/jd-match-analyzer/blob/main/Models/Analysis.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_main,node_ui,node_result toneBlue
class node_app,node_routes,node_requests toneAmber
class node_pdf,node_matcher,node_groq toneMint
class node_dbconnect,node_analysismodel toneRose
class node_user toneIndigo
```

## Components

### Web interface

- [Input form](https://github.com/riyaz510/jd-match-analyzer/blob/main/Views/src/components/Main.jsx): `Views/src/components/Main.jsx`
- [App state](https://github.com/riyaz510/jd-match-analyzer/blob/main/Views/src/App.jsx): `Views/src/App.jsx`
- [Result display](https://github.com/riyaz510/jd-match-analyzer/blob/main/Views/src/components/Result.jsx): `Views/src/components/Result.jsx`

### Analysis API

- [Express app](https://github.com/riyaz510/jd-match-analyzer/blob/main/app.js): `app.js`
- [Analyze route](https://github.com/riyaz510/jd-match-analyzer/blob/main/Routes/routes.js): `Routes/routes.js`
- [Request handler](https://github.com/riyaz510/jd-match-analyzer/blob/main/Controllers/Requests.js): `Controllers/Requests.js`

### Analysis services

- [PDF extraction](https://github.com/riyaz510/jd-match-analyzer/blob/main/Controllers/Requests.js): `Controllers/Requests.js`
- [Match analysis](https://github.com/riyaz510/jd-match-analyzer/blob/main/Models/Analyze.js): `Models/Analyze.js`

### Persistence

- [Mongo connection](https://github.com/riyaz510/jd-match-analyzer/blob/main/DataBase/db.js): `DataBase/db.js`
- [Analysis schema](https://github.com/riyaz510/jd-match-analyzer/blob/main/Models/Analysis.js): `Models/Analysis.js`

### Other components

- **Applicant**
- **Groq API**

## Connections

- Applicant → Input form: enters inputs
- Input form → Analyze route: POST /analyze
- Express app → Analyze route: mounts routes
- Analyze route → Request handler: dispatches
- Request handler → PDF extraction: extracts PDFs
- Request handler → Match analysis: submits text
- Match analysis → Groq API: requests comparison
- Request handler → Input form: returns result
- Input form → App state: sets result
- App state → Result display: passes result
- Express app → Mongo connection: connects database
