# salah-guenenna/careermatch-ai architecture

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

- Interactive diagram: https://gitdiagram.com/salah-guenenna/careermatch-ai
- Repository: https://github.com/salah-guenenna/careermatch-ai

## Overview

CareerMatch AI is a CV-to-job matching application. A user signs in, uploads a PDF CV and adds a job offer, then requests an analysis and reviews its score, skills, explanation, recommendations, history, and PDF report. The repository README describes these as implemented product capabilities, while also calling the current release a runnable foundation. The graph shows the frontend/API flow and the sampled backend analysis and persistence layers; some dashboard and semantic-matching details are documented or indexed but were not sampled in full.

Main entry points: [`frontend/src/App.tsx`](https://github.com/salah-guenenna/careermatch-ai/blob/main/frontend/src/App.tsx) (Workspace UI), [`backend/app/main.py`](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/main.py) (API application), [`backend/app/api/auth.py`](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/auth.py) (Authentication and profile), [`backend/app/api/resources.py`](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/resources.py) (CV and job management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_web_app["Workspace UI<br/>[App.tsx]"]
  node_web_api["HTTP client<br/>[api.ts]"]
end

subgraph group_api["API workflows"]
  node_app_entry["API application<br/>[main.py]"]
  node_health["Health checks<br/>[routes.py]"]
  node_auth["Authentication and profile<br/>[auth.py]"]
  node_resources["CV and job management<br/>[resources.py]"]
  node_dashboard["Dashboard stats<br/>[dashboard.py]"]
  node_analyses["Analysis and reports<br/>[analyses.py]"]
end

subgraph group_matching["Matching services"]
  node_pdf_text["PDF text extraction<br/>[pdf_extractor.py]"]
  node_matcher["Explainable scoring<br/>[matcher.py]"]
  node_semantic["Semantic similarity"]
end

subgraph group_platform["Identity and persistence"]
  node_security["Token security<br/>[security.py]"]
  node_config["Application settings<br/>[config.py]"]
  node_db_access["Session dependency<br/>[dependencies.py]"]
  node_db_session["Database engine<br/>[session.py]"]
  node_db_models[("Product records<br/>[models.py]")]
end

node_user(("Career user"))

node_user -->|"uses"| node_web_app
node_web_app -->|"sends requests"| node_web_api
node_web_app -->|"registers and signs in"| node_auth
node_web_app -->|"uploads and manages"| node_resources
node_web_app -->|"requests analyses"| node_analyses
node_web_app -->|"loads statistics"| node_dashboard
node_app_entry -->|"registers routes"| node_health
node_app_entry -->|"registers routes"| node_auth
node_app_entry -->|"registers routes"| node_resources
node_app_entry -->|"registers routes"| node_analyses
node_app_entry -->|"registers routes"| node_dashboard
node_health -->|"reads settings"| node_config
node_health -->|"checks connection"| node_db_session
node_auth -->|"verifies and issues tokens"| node_security
node_auth -->|"opens session"| node_db_access
node_auth -->|"reads and writes users"| node_db_models
node_resources -->|"opens session"| node_db_access
node_resources -->|"reads and writes records"| node_db_models
node_resources -->|"extracts CV text"| node_pdf_text
node_analyses -->|"opens session"| node_db_access
node_analyses -->|"reads and writes results"| node_db_models
node_analyses -->|"scores CV and job"| node_matcher
node_matcher -.->|"optionally blends similarity"| node_semantic
node_matcher -->|"checks feature setting"| node_config
node_db_access -->|"creates sessions"| node_db_session
node_db_session -->|"configures engine"| node_config
node_db_session -->|"registers tables"| node_db_models
node_security -->|"reads secret settings"| node_config

click node_web_app "https://github.com/salah-guenenna/careermatch-ai/blob/main/frontend/src/App.tsx"
click node_web_api "https://github.com/salah-guenenna/careermatch-ai/blob/main/frontend/src/api.ts"
click node_app_entry "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/main.py"
click node_health "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/routes.py"
click node_auth "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/auth.py"
click node_resources "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/resources.py"
click node_dashboard "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/dashboard.py"
click node_analyses "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/analyses.py"
click node_pdf_text "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/services/pdf_extractor.py"
click node_matcher "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/services/matcher.py"
click node_semantic "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/services/semantic_matcher.py"
click node_security "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/core/security.py"
click node_config "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/core/config.py"
click node_db_access "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/db/dependencies.py"
click node_db_session "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/db/session.py"
click node_db_models "https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/db/models.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_web_app,node_web_api,node_user toneBlue
class node_app_entry,node_health,node_auth,node_resources,node_dashboard,node_analyses toneAmber
class node_pdf_text,node_matcher,node_semantic toneMint
class node_security,node_config,node_db_access,node_db_session,node_db_models toneRose
```

## Components

### Web client

- [Workspace UI](https://github.com/salah-guenenna/careermatch-ai/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [HTTP client](https://github.com/salah-guenenna/careermatch-ai/blob/main/frontend/src/api.ts): `frontend/src/api.ts`

### API workflows

- [API application](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Health checks](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/routes.py): `backend/app/api/routes.py`
- [Authentication and profile](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/auth.py): `backend/app/api/auth.py`
- [CV and job management](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/resources.py): `backend/app/api/resources.py`
- [Dashboard stats](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/dashboard.py): `backend/app/api/dashboard.py`
- [Analysis and reports](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/api/analyses.py): `backend/app/api/analyses.py`

### Matching services

- [PDF text extraction](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/services/pdf_extractor.py): `backend/app/services/pdf_extractor.py`
- [Explainable scoring](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/services/matcher.py): `backend/app/services/matcher.py`
- [Semantic similarity](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/services/semantic_matcher.py): `backend/app/services/semantic_matcher.py`

### Identity and persistence

- [Token security](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/core/security.py): `backend/app/core/security.py`
- [Application settings](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/core/config.py): `backend/app/core/config.py`
- [Session dependency](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/db/dependencies.py): `backend/app/db/dependencies.py`
- [Database engine](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/db/session.py): `backend/app/db/session.py`
- [Product records](https://github.com/salah-guenenna/careermatch-ai/blob/main/backend/app/db/models.py): `backend/app/db/models.py`

### Other components

- **Career user**

## Connections

- Career user → Workspace UI: uses (evidence: `README.md`)
- Workspace UI → HTTP client: sends requests (evidence: `frontend/src/App.tsx`)
- Workspace UI → Authentication and profile: registers and signs in (evidence: `frontend/src/App.tsx`)
- Workspace UI → CV and job management: uploads and manages (evidence: `frontend/src/App.tsx`)
- Workspace UI → Analysis and reports: requests analyses (evidence: `frontend/src/App.tsx`)
- Workspace UI → Dashboard stats: loads statistics (evidence: `frontend/src/App.tsx`)
- API application → Health checks: registers routes (evidence: `backend/app/main.py`)
- API application → Authentication and profile: registers routes (evidence: `backend/app/main.py`)
- API application → CV and job management: registers routes (evidence: `backend/app/main.py`)
- API application → Analysis and reports: registers routes (evidence: `backend/app/main.py`)
- API application → Dashboard stats: registers routes (evidence: `backend/app/main.py`)
- Health checks → Application settings: reads settings (evidence: `backend/app/api/routes.py`)
- Health checks → Database engine: checks connection (evidence: `backend/app/api/routes.py`)
- Authentication and profile → Token security: verifies and issues tokens (evidence: `backend/app/api/auth.py`)
- Authentication and profile → Session dependency: opens session (evidence: `backend/app/api/auth.py`)
- Authentication and profile → Product records: reads and writes users (evidence: `backend/app/api/auth.py`)
- CV and job management → Session dependency: opens session (evidence: `backend/app/api/resources.py`)
- CV and job management → Product records: reads and writes records (evidence: `backend/app/api/resources.py`)
- CV and job management → PDF text extraction: extracts CV text (evidence: `backend/app/api/resources.py`)
- Analysis and reports → Session dependency: opens session (evidence: `backend/app/api/analyses.py`)
- Analysis and reports → Product records: reads and writes results (evidence: `backend/app/api/analyses.py`)
- Analysis and reports → Explainable scoring: scores CV and job (evidence: `backend/app/api/analyses.py`)
- Explainable scoring → Semantic similarity: optionally blends similarity (evidence: `backend/app/services/matcher.py`)
- Explainable scoring → Application settings: checks feature setting (evidence: `backend/app/services/matcher.py`)
- Session dependency → Database engine: creates sessions (evidence: `backend/app/db/dependencies.py`)
- Database engine → Application settings: configures engine (evidence: `backend/app/db/session.py`)
- Database engine → Product records: registers tables (evidence: `backend/app/db/session.py`)
- Token security → Application settings: reads secret settings (evidence: `backend/app/core/security.py`)
