# migueltrinidad21/wellmatch architecture

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

- Interactive diagram: https://gitdiagram.com/migueltrinidad21/wellmatch
- Repository: https://github.com/migueltrinidad21/wellmatch

## Overview

WellMatch is a job-matching platform for applicants and employers. Applicants create profiles, upload resumes, explore and apply to jobs, and review skill-gap analyses; employers manage company and job information, applicants, and skill-gap reports. The frontend routes users to role-specific pages and calls the backend API; backend controllers handle requests, while services extract and compare skills. The graph emphasizes relationships visible in excerpts or the source index; unsampled capabilities are represented by their source areas without speculative connections.

Main entry points: [`backend/routes/applicantRoutes.js`](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/routes/applicantRoutes.js) (Applicant routes), [`backend/controllers/applicant/resumeControllers.js`](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/applicant/resumeControllers.js) (Resume management), [`backend/services/skillGapService.js`](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/services/skillGapService.js) (Skill-gap comparison), [`backend/services/skillGapAIService.js`](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/services/skillGapAIService.js) (AI explanations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Application router<br/>[App.jsx]"]
  node_api["API client<br/>[axios.js]"]
  node_ui_state["UI state<br/>[stateHandlers.js]"]
end

subgraph group_applicant["Applicant workflows"]
  node_applicant_pages["Applicant pages"]
  node_applicant_skill_ui["Skill-gap analysis UI"]
  node_recommended_jobs["Job recommendations"]
  node_resume_controller["Resume management"]
  node_applicant_jobs["Applicant job actions<br/>[jobControllers.js]"]
end

subgraph group_employer["Employer workflows"]
  node_employer_pages["Employer pages"]
  node_employer_skill_ui["Skill-gap report UI<br/>[SkillGapReport.jsx]"]
  node_employer_jobs["Employer job management<br/>[jobControllers.js]"]
end

subgraph group_backend["API and accounts"]
  node_backend_server["API server<br/>[server.js]"]
  node_applicant_routes["Applicant routes<br/>[applicantRoutes.js]"]
  node_employer_routes["Employer routes<br/>[employerRoutes.js]"]
  node_auth["Authorization<br/>[authorizeUser.js]"]
  node_database[("MySQL database<br/>[database.js]")]
  node_cloudinary[("Cloudinary storage<br/>[cloudinary.js]")]
end

subgraph group_matching["Skills and matching"]
  node_resume_extractor["Resume extraction<br/>[resumeExtractor.js]"]
  node_job_extractor["Job skill extraction"]
  node_app_skill_controller["Applicant skill-gap endpoint"]
  node_employer_skill_controller["Employer skill-gap endpoint"]
  node_gap_service["Skill-gap comparison<br/>[skillGapService.js]"]
  node_gap_ai["AI explanations"]
  node_openai["OpenAI service<br/>[openai.js]"]
  node_skill_utils["Skill scoring utilities"]
end

node_user(("Applicant or employer"))

node_user -.->|"uses"| node_app
node_app -->|"routes to"| node_applicant_pages
node_app -->|"routes to"| node_employer_pages
node_applicant_skill_ui -->|"calls"| node_api
node_applicant_skill_ui -->|"reads state"| node_ui_state
node_employer_skill_ui -->|"calls"| node_api
node_employer_skill_ui -->|"reads state"| node_ui_state
node_recommended_jobs -.->|"calls"| node_api
node_api -.->|"requests"| node_backend_server
node_backend_server -->|"mounts"| node_applicant_routes
node_backend_server -->|"mounts"| node_employer_routes
node_applicant_routes -->|"routes to"| node_app_skill_controller
node_applicant_routes -->|"routes to"| node_applicant_jobs
node_applicant_routes -.->|"routes to"| node_resume_controller
node_employer_routes -->|"routes to"| node_employer_jobs
node_applicant_routes -->|"checks access"| node_auth
node_employer_routes -->|"checks access"| node_auth
node_resume_controller -->|"processes resume"| node_resume_extractor
node_resume_controller -->|"uploads file"| node_cloudinary
node_resume_controller -->|"reads and writes"| node_database
node_employer_jobs -->|"processes job"| node_job_extractor
node_job_extractor -.->|"stores skills"| node_database
node_app_skill_controller -->|"requests comparison"| node_gap_service
node_employer_skill_controller -->|"requests comparison"| node_gap_service
node_app_skill_controller -->|"requests AI output"| node_gap_ai
node_employer_skill_controller -->|"requests AI output"| node_gap_ai
node_gap_service -->|"reads skills"| node_database
node_gap_service -->|"compares and scores"| node_skill_utils
node_gap_ai -->|"reads job data"| node_database
node_gap_ai -->|"generates explanations"| node_openai

click node_app "https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/App.jsx"
click node_api "https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/apis/axios.js"
click node_ui_state "https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/zustand/stateHandlers.js"
click node_applicant_pages "https://github.com/migueltrinidad21/wellmatch/tree/main/frontend/src/pages/applicant"
click node_applicant_skill_ui "https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/pages/applicant/SkillGapAnalysisUI.jsx"
click node_recommended_jobs "https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/pages/applicant/RecommendedJobs.jsx"
click node_employer_pages "https://github.com/migueltrinidad21/wellmatch/tree/main/frontend/src/pages/employer"
click node_employer_skill_ui "https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/pages/employer/SkillGapReport.jsx"
click node_backend_server "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/server.js"
click node_applicant_routes "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/routes/applicantRoutes.js"
click node_employer_routes "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/routes/employerRoutes.js"
click node_auth "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/middlewares/authorizeUser.js"
click node_resume_controller "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/applicant/resumeControllers.js"
click node_applicant_jobs "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/applicant/jobControllers.js"
click node_employer_jobs "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/employer/jobControllers.js"
click node_database "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/configs/database.js"
click node_cloudinary "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/configs/cloudinary.js"
click node_resume_extractor "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/services/resumeExtractor.js"
click node_job_extractor "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/services/extractSkillsAndEmbeddings.js"
click node_app_skill_controller "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/applicant/skillGapController.js"
click node_employer_skill_controller "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/employer/skillGapController.js"
click node_gap_service "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/services/skillGapService.js"
click node_gap_ai "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/services/skillGapAIService.js"
click node_openai "https://github.com/migueltrinidad21/wellmatch/blob/main/backend/configs/openai.js"
click node_skill_utils "https://github.com/migueltrinidad21/wellmatch/tree/main/backend/utils"

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_api,node_ui_state toneBlue
class node_applicant_pages,node_applicant_skill_ui,node_recommended_jobs,node_resume_controller,node_applicant_jobs toneAmber
class node_employer_pages,node_employer_skill_ui,node_employer_jobs toneMint
class node_backend_server,node_applicant_routes,node_employer_routes,node_auth,node_database,node_cloudinary toneRose
class node_resume_extractor,node_job_extractor,node_app_skill_controller,node_employer_skill_controller,node_gap_service,node_gap_ai,node_openai,node_skill_utils,node_user toneIndigo
```

## Components

### Web application

- [Application router](https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/apis/axios.js): `frontend/src/apis/axios.js`
- [UI state](https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/zustand/stateHandlers.js): `frontend/src/zustand/stateHandlers.js`

### Applicant workflows

- [Applicant pages](https://github.com/migueltrinidad21/wellmatch/tree/main/frontend/src/pages/applicant): `frontend/src/pages/applicant`
- [Skill-gap analysis UI](https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/pages/applicant/SkillGapAnalysisUI.jsx): `frontend/src/pages/applicant/SkillGapAnalysisUI.jsx`
- [Job recommendations](https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/pages/applicant/RecommendedJobs.jsx): `frontend/src/pages/applicant/RecommendedJobs.jsx`
- [Resume management](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/applicant/resumeControllers.js): `backend/controllers/applicant/resumeControllers.js`
- [Applicant job actions](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/applicant/jobControllers.js): `backend/controllers/applicant/jobControllers.js`

### Employer workflows

- [Employer pages](https://github.com/migueltrinidad21/wellmatch/tree/main/frontend/src/pages/employer): `frontend/src/pages/employer`
- [Skill-gap report UI](https://github.com/migueltrinidad21/wellmatch/blob/main/frontend/src/pages/employer/SkillGapReport.jsx): `frontend/src/pages/employer/SkillGapReport.jsx`
- [Employer job management](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/employer/jobControllers.js): `backend/controllers/employer/jobControllers.js`

### API and accounts

- [API server](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/server.js): `backend/server.js`
- [Applicant routes](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/routes/applicantRoutes.js): `backend/routes/applicantRoutes.js`
- [Employer routes](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/routes/employerRoutes.js): `backend/routes/employerRoutes.js`
- [Authorization](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/middlewares/authorizeUser.js): `backend/middlewares/authorizeUser.js`
- [MySQL database](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/configs/database.js): `backend/configs/database.js`
- [Cloudinary storage](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/configs/cloudinary.js): `backend/configs/cloudinary.js`

### Skills and matching

- [Resume extraction](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/services/resumeExtractor.js): `backend/services/resumeExtractor.js`
- [Job skill extraction](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/services/extractSkillsAndEmbeddings.js): `backend/services/extractSkillsAndEmbeddings.js`
- [Applicant skill-gap endpoint](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/applicant/skillGapController.js): `backend/controllers/applicant/skillGapController.js`
- [Employer skill-gap endpoint](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/controllers/employer/skillGapController.js): `backend/controllers/employer/skillGapController.js`
- [Skill-gap comparison](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/services/skillGapService.js): `backend/services/skillGapService.js`
- [AI explanations](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/services/skillGapAIService.js): `backend/services/skillGapAIService.js`
- [OpenAI service](https://github.com/migueltrinidad21/wellmatch/blob/main/backend/configs/openai.js): `backend/configs/openai.js`
- [Skill scoring utilities](https://github.com/migueltrinidad21/wellmatch/tree/main/backend/utils): `backend/utils`

### Other components

- **Applicant or employer**

## Connections

- Applicant or employer → Application router: uses
- Application router → Applicant pages: routes to (evidence: `frontend/src/App.jsx`)
- Application router → Employer pages: routes to (evidence: `frontend/src/App.jsx`)
- Skill-gap analysis UI → API client: calls (evidence: `frontend/src/pages/applicant/SkillGapAnalysisUI.jsx`)
- Skill-gap analysis UI → UI state: reads state (evidence: `frontend/src/pages/applicant/SkillGapAnalysisUI.jsx`)
- Skill-gap report UI → API client: calls (evidence: `frontend/src/pages/employer/SkillGapReport.jsx`)
- Skill-gap report UI → UI state: reads state (evidence: `frontend/src/pages/employer/SkillGapReport.jsx`)
- Job recommendations → API client: calls
- API client → API server: requests
- API server → Applicant routes: mounts (evidence: `backend/server.js`)
- API server → Employer routes: mounts (evidence: `backend/server.js`)
- Applicant routes → Applicant skill-gap endpoint: routes to (evidence: `backend/routes/applicantRoutes.js`)
- Applicant routes → Applicant job actions: routes to (evidence: `backend/routes/applicantRoutes.js`)
- Applicant routes → Resume management: routes to (evidence: `backend/routes/applicantRoutes.js`)
- Employer routes → Employer job management: routes to (evidence: `backend/routes/employerRoutes.js`)
- Applicant routes → Authorization: checks access (evidence: `backend/routes/applicantRoutes.js`)
- Employer routes → Authorization: checks access (evidence: `backend/routes/employerRoutes.js`)
- Resume management → Resume extraction: processes resume (evidence: `backend/controllers/applicant/resumeControllers.js`)
- Resume management → Cloudinary storage: uploads file (evidence: `backend/controllers/applicant/resumeControllers.js`)
- Resume management → MySQL database: reads and writes (evidence: `backend/controllers/applicant/resumeControllers.js`)
- Employer job management → Job skill extraction: processes job (evidence: `backend/controllers/employer/jobControllers.js`)
- Job skill extraction → MySQL database: stores skills (evidence: `backend/services/extractSkillsAndEmbeddings.js`)
- Applicant skill-gap endpoint → Skill-gap comparison: requests comparison (evidence: `backend/controllers/applicant/skillGapController.js`)
- Employer skill-gap endpoint → Skill-gap comparison: requests comparison (evidence: `backend/controllers/employer/skillGapController.js`)
- Applicant skill-gap endpoint → AI explanations: requests AI output (evidence: `backend/controllers/applicant/skillGapController.js`)
- Employer skill-gap endpoint → AI explanations: requests AI output (evidence: `backend/controllers/employer/skillGapController.js`)
- Skill-gap comparison → MySQL database: reads skills (evidence: `backend/services/skillGapService.js`)
- Skill-gap comparison → Skill scoring utilities: compares and scores (evidence: `backend/services/skillGapService.js`)
- AI explanations → MySQL database: reads job data (evidence: `backend/services/skillGapAIService.js`)
- AI explanations → OpenAI service: generates explanations (evidence: `backend/services/skillGapAIService.js`)
