# kiet-projects-2026/kiek_csd_team-3 architecture

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

- Interactive diagram: https://gitdiagram.com/kiet-projects-2026/kiek_csd_team-3
- Repository: https://github.com/kiet-projects-2026/kiek_csd_team-3

## Overview

This is a role-based resume-screening and recruiting application. Candidates register or sign in, upload a resume for job matches or a job-specific score, then may apply; recruiters post jobs and review or update applications. The React client calls an authenticated Express API backed by MongoDB, while matching is delegated to a separate ML service. The README documents the main role flows; some page-to-API call details and recruiter/profile internals were not sampled, so those links are omitted or marked unverified.

Main entry points: [`frontend/src/api/apiClient.js`](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/frontend/src/api/apiClient.js) (HTTP client), [`backend/server.js`](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/server.js) (API server and routing), [`frontend/src/App.jsx`](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/frontend/src/App.jsx) (Routes and layouts), [`backend/routes/candidateRoutes.js`](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/routes/candidateRoutes.js) (Candidate matching and applications)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Routes and layouts<br/>[App.jsx]"]
  node_auth_ui["Sign-in and registration"]
  node_candidate_ui["Candidate workflows"]
  node_recruiter_ui["Recruiter workflows"]
  node_auth_context["Session state<br/>[AuthContext.jsx]"]
  node_api_client["HTTP client<br/>[apiClient.js]"]
end

subgraph group_api["Backend API"]
  node_server["API server and routing<br/>[server.js]"]
  node_auth_routes["Authentication<br/>[authRoutes.js]"]
  node_profile_routes["Profiles<br/>[profileRoutes.js]"]
  node_candidate_routes["Candidate matching and applications<br/>[candidateRoutes.js]"]
  node_recruiter_routes["Recruiter jobs and applicants<br/>[recruiterRoutes.js]"]
  node_auth_middleware["Token protection<br/>[authMiddleware.js]"]
  node_upload["Resume upload<br/>[upload.js]"]
end

subgraph group_data["Domain data"]
  node_users[("User records<br/>[User.js]")]
  node_jobs[("Job records<br/>[Job.js]")]
  node_applications[("Application records<br/>[Application.js]")]
end

subgraph group_matching["Resume matching"]
  node_ml_bridge["ML service client<br/>[mlService.js]"]
  node_ml_api["Matching endpoint<br/>[app.py]"]
  node_parser["Resume parsing<br/>[document_parser.py]"]
  node_matcher["Job scoring<br/>[matcher.py]"]
end

node_candidate(("Candidate"))
node_recruiter(("Recruiter"))
node_mongo[("MongoDB")]

node_candidate -->|"uses"| node_app
node_recruiter -->|"uses"| node_app
node_app -->|"provides session"| node_auth_context
node_app -->|"routes to"| node_auth_ui
node_app -->|"routes to"| node_candidate_ui
node_app -->|"routes to"| node_recruiter_ui
node_auth_ui -.->|"calls"| node_api_client
node_candidate_ui -.->|"calls"| node_api_client
node_recruiter_ui -.->|"calls"| node_api_client
node_api_client -->|"requests"| node_auth_routes
node_api_client -->|"requests"| node_profile_routes
node_api_client -->|"requests"| node_candidate_routes
node_api_client -->|"requests"| node_recruiter_routes
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_profile_routes
node_server -->|"mounts"| node_candidate_routes
node_server -->|"mounts"| node_recruiter_routes
node_server -->|"protects routes"| node_auth_middleware
node_server -->|"connects"| node_mongo
node_auth_routes -->|"reads and creates"| node_users
node_auth_middleware -->|"loads user"| node_users
node_profile_routes -->|"reads and updates"| node_users
node_candidate_routes -->|"accepts resume"| node_upload
node_candidate_routes -->|"reads jobs"| node_jobs
node_candidate_routes -->|"requests matches"| node_ml_bridge
node_candidate_routes -->|"creates and reads"| node_applications
node_recruiter_routes -->|"manages jobs"| node_jobs
node_recruiter_routes -->|"manages applications"| node_applications
node_recruiter_routes -->|"loads recruiter"| node_users
node_ml_bridge -->|"posts resume and jobs"| node_ml_api
node_ml_api -->|"uses"| node_parser
node_ml_api -->|"uses"| node_matcher

click node_app "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/kiet-projects-2026/kiek_csd_team-3/tree/main/frontend/src/pages/auth"
click node_candidate_ui "https://github.com/kiet-projects-2026/kiek_csd_team-3/tree/main/frontend/src/pages/candidate"
click node_recruiter_ui "https://github.com/kiet-projects-2026/kiek_csd_team-3/tree/main/frontend/src/pages/recruiter"
click node_auth_context "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/frontend/src/context/AuthContext.jsx"
click node_api_client "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/frontend/src/api/apiClient.js"
click node_server "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/server.js"
click node_auth_routes "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/routes/authRoutes.js"
click node_profile_routes "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/routes/profileRoutes.js"
click node_candidate_routes "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/routes/candidateRoutes.js"
click node_recruiter_routes "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/routes/recruiterRoutes.js"
click node_auth_middleware "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/middleware/authMiddleware.js"
click node_upload "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/middleware/upload.js"
click node_users "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/models/User.js"
click node_jobs "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/models/Job.js"
click node_applications "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/models/Application.js"
click node_ml_bridge "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/services/mlService.js"
click node_ml_api "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/ml_service/app.py"
click node_parser "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/ml_service/document_parser.py"
click node_matcher "https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/ml_service/matcher.py"

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_auth_ui,node_candidate_ui,node_recruiter_ui,node_auth_context,node_api_client toneBlue
class node_server,node_auth_routes,node_profile_routes,node_candidate_routes,node_recruiter_routes,node_auth_middleware,node_upload,node_mongo toneAmber
class node_users,node_jobs,node_applications toneMint
class node_ml_bridge,node_ml_api,node_parser,node_matcher toneRose
class node_candidate,node_recruiter toneIndigo
```

## Components

### Web client

- [Routes and layouts](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Sign-in and registration](https://github.com/kiet-projects-2026/kiek_csd_team-3/tree/main/frontend/src/pages/auth): `frontend/src/pages/auth`
- [Candidate workflows](https://github.com/kiet-projects-2026/kiek_csd_team-3/tree/main/frontend/src/pages/candidate): `frontend/src/pages/candidate`
- [Recruiter workflows](https://github.com/kiet-projects-2026/kiek_csd_team-3/tree/main/frontend/src/pages/recruiter): `frontend/src/pages/recruiter`
- [Session state](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [HTTP client](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/frontend/src/api/apiClient.js): `frontend/src/api/apiClient.js`

### Backend API

- [API server and routing](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/server.js): `backend/server.js`
- [Authentication](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Profiles](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/routes/profileRoutes.js): `backend/routes/profileRoutes.js`
- [Candidate matching and applications](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/routes/candidateRoutes.js): `backend/routes/candidateRoutes.js`
- [Recruiter jobs and applicants](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/routes/recruiterRoutes.js): `backend/routes/recruiterRoutes.js`
- [Token protection](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/middleware/authMiddleware.js): `backend/middleware/authMiddleware.js`
- [Resume upload](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/middleware/upload.js): `backend/middleware/upload.js`

### Domain data

- [User records](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/models/User.js): `backend/models/User.js`
- [Job records](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/models/Job.js): `backend/models/Job.js`
- [Application records](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/models/Application.js): `backend/models/Application.js`

### Resume matching

- [ML service client](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/backend/services/mlService.js): `backend/services/mlService.js`
- [Matching endpoint](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/ml_service/app.py): `ml_service/app.py`
- [Resume parsing](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/ml_service/document_parser.py): `ml_service/document_parser.py`
- [Job scoring](https://github.com/kiet-projects-2026/kiek_csd_team-3/blob/main/ml_service/matcher.py): `ml_service/matcher.py`

### Other components

- **Candidate**
- **Recruiter**
- **MongoDB**

## Connections

- Candidate → Routes and layouts: uses
- Recruiter → Routes and layouts: uses
- Routes and layouts → Session state: provides session (evidence: `frontend/src/App.jsx`)
- Routes and layouts → Sign-in and registration: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layouts → Candidate workflows: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layouts → Recruiter workflows: routes to (evidence: `frontend/src/App.jsx`)
- Sign-in and registration → HTTP client: calls (evidence: `frontend/src/pages/auth/Register.jsx`)
- Candidate workflows → HTTP client: calls (evidence: `frontend/src/pages/candidate/SpecificJobMatch.jsx`)
- Recruiter workflows → HTTP client: calls (evidence: `frontend/src/pages/recruiter/RecruiterJobs.jsx`)
- HTTP client → Authentication: requests (evidence: `frontend/src/api/apiClient.js`)
- HTTP client → Profiles: requests (evidence: `frontend/src/api/apiClient.js`)
- HTTP client → Candidate matching and applications: requests (evidence: `frontend/src/api/apiClient.js`)
- HTTP client → Recruiter jobs and applicants: requests (evidence: `frontend/src/api/apiClient.js`)
- API server and routing → Authentication: mounts (evidence: `backend/server.js`)
- API server and routing → Profiles: mounts (evidence: `backend/server.js`)
- API server and routing → Candidate matching and applications: mounts (evidence: `backend/server.js`)
- API server and routing → Recruiter jobs and applicants: mounts (evidence: `backend/server.js`)
- API server and routing → Token protection: protects routes (evidence: `backend/server.js`)
- API server and routing → MongoDB: connects (evidence: `backend/server.js`)
- Authentication → User records: reads and creates (evidence: `backend/routes/authRoutes.js`)
- Token protection → User records: loads user (evidence: `backend/middleware/authMiddleware.js`)
- Profiles → User records: reads and updates (evidence: `backend/routes/profileRoutes.js`)
- Candidate matching and applications → Resume upload: accepts resume (evidence: `backend/routes/candidateRoutes.js`)
- Candidate matching and applications → Job records: reads jobs (evidence: `backend/routes/candidateRoutes.js`)
- Candidate matching and applications → ML service client: requests matches (evidence: `backend/routes/candidateRoutes.js`)
- Candidate matching and applications → Application records: creates and reads (evidence: `backend/routes/candidateRoutes.js`)
- Recruiter jobs and applicants → Job records: manages jobs (evidence: `backend/routes/recruiterRoutes.js`)
- Recruiter jobs and applicants → Application records: manages applications (evidence: `backend/routes/recruiterRoutes.js`)
- Recruiter jobs and applicants → User records: loads recruiter (evidence: `backend/routes/recruiterRoutes.js`)
- ML service client → Matching endpoint: posts resume and jobs (evidence: `backend/services/mlService.js`)
- Matching endpoint → Resume parsing: uses (evidence: `ml_service/app.py`)
- Matching endpoint → Job scoring: uses (evidence: `ml_service/app.py`)
