# piza-tempest/cvision_project architecture

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

- Interactive diagram: https://gitdiagram.com/piza-tempest/cvision_project
- Repository: https://github.com/piza-tempest/cvision_project

## Overview

CVision is a Streamlit CV-to-job matching application, with a separate admin panel for job-listing and scraper operations. The jobseeker flow accepts a CV, extracts structured information, and presents ranked job matches; matching reads CV data through an adapter and compares it with listings. Admin users manage scraper runs, schedules, listings, and activity logs. The README also documents listing enrichment with AI extraction and embeddings. Several links reflect explicit README statements or source-index references; unsampled implementation details are not inferred beyond those references.

Main entry points: [`CVReviwer/db.py`](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/db.py) (MySQL database), [`CVReviwer/app.py`](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/app.py) (Streamlit app), [`CVReviwer/match_service.py`](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/match_service.py) (Match service), [`CVReviwer/admin.py`](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/admin.py) (Admin panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_jobseeker["Jobseeker flow"]
  node_app["Streamlit app<br/>[app.py]"]
  node_cv_upload["CV upload<br/>[cv_upload.py]"]
  node_cv_analysis["CV extraction<br/>[cv_analysis.py]"]
  node_embed["CV embedding<br/>[embed.py]"]
end

subgraph group_matching["Matching pipeline"]
  node_match_controller["Match controller"]
  node_cv_adapter["CV data adapter<br/>[cv_data_adapter.py]"]
  node_match_service["Match service<br/>[match_service.py]"]
  node_cv_embedding["Embedding logic<br/>[cv_embedding.py]"]
end

subgraph group_admin["Admin operations"]
  node_admin["Admin panel<br/>[admin.py]"]
  node_scraper_controller["Scraper controller"]
  node_scraper_service["Scraper service<br/>[scraper_service.py]"]
  node_job_controller["Job controller<br/>[job_controller.py]"]
  node_job_service["Job service<br/>[job_service.py]"]
  node_validation["Validation"]
  node_auth["Authentication<br/>[auth_service.py]"]
  node_logs["Activity logs<br/>[log_service.py]"]
end

subgraph group_data["Persistence and enrichment"]
  node_enrichment["Listing enrichment<br/>[enrich_jobs.py]"]
  node_db[("MySQL database<br/>[db.py]")]
end

node_visitor(("Jobseeker"))
node_admin_user(("Administrator"))
node_providers{{"Job providers"}}

node_visitor -->|"uses"| node_app
node_app -->|"uploads CV"| node_cv_upload
node_app -->|"extracts data"| node_cv_analysis
node_app -->|"processes CV"| node_embed
node_app -->|"requests matches"| node_match_controller
node_match_controller -->|"retrieves CV data"| node_cv_adapter
node_match_controller -->|"generates matches"| node_match_service
node_match_service -->|"reads CV data"| node_cv_adapter
node_match_service -->|"loads listings"| node_job_service
node_match_service -->|"uses embeddings"| node_cv_embedding
node_match_service -->|"stores matches"| node_db
node_admin_user -->|"manages listings"| node_admin
node_admin -->|"checks credentials"| node_auth
node_admin -->|"manages scrapers"| node_scraper_controller
node_admin -->|"manages jobs"| node_job_controller
node_admin -->|"reads activity"| node_logs
node_scraper_controller -->|"runs scrapers"| node_scraper_service
node_scraper_controller -->|"validates input"| node_validation
node_scraper_controller -->|"records activity"| node_logs
node_scraper_service -.->|"fetches listings"| node_providers
node_scraper_service -->|"saves listings"| node_job_service
node_scraper_service -->|"persists scraper data"| node_db
node_job_controller -->|"updates listings"| node_job_service
node_job_controller -->|"validates edits"| node_validation
node_job_service -->|"reads and writes"| node_db
node_auth -->|"reads and writes"| node_db
node_logs -->|"writes entries"| node_db
node_enrichment -->|"loads listings"| node_db

click node_app "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/app.py"
click node_cv_upload "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/cv_upload.py"
click node_cv_analysis "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/cv_analysis.py"
click node_embed "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/embed.py"
click node_match_controller "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/match_controller.py"
click node_cv_adapter "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/cv_data_adapter.py"
click node_match_service "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/match_service.py"
click node_cv_embedding "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/cv_embedding.py"
click node_admin "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/admin.py"
click node_scraper_controller "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/scraper_controller.py"
click node_scraper_service "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/scraper_service.py"
click node_job_controller "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/job_controller.py"
click node_job_service "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/job_service.py"
click node_validation "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/validation_service.py"
click node_auth "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/auth_service.py"
click node_logs "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/log_service.py"
click node_enrichment "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/enrich_jobs.py"
click node_db "https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/db.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_cv_upload,node_cv_analysis,node_embed toneBlue
class node_match_controller,node_cv_adapter,node_match_service,node_cv_embedding toneAmber
class node_admin,node_scraper_controller,node_scraper_service,node_job_controller,node_job_service,node_validation,node_auth,node_logs toneMint
class node_enrichment,node_db toneRose
class node_visitor,node_admin_user,node_providers toneIndigo
```

## Components

### Jobseeker flow

- [Streamlit app](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/app.py): `CVReviwer/app.py`
- [CV upload](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/cv_upload.py): `CVReviwer/cv_upload.py`
- [CV extraction](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/cv_analysis.py): `CVReviwer/cv_analysis.py`
- [CV embedding](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/embed.py): `CVReviwer/embed.py`

### Matching pipeline

- [Match controller](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/match_controller.py): `CVReviwer/match_controller.py`
- [CV data adapter](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/cv_data_adapter.py): `CVReviwer/cv_data_adapter.py`
- [Match service](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/match_service.py): `CVReviwer/match_service.py`
- [Embedding logic](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/cv_embedding.py): `CVReviwer/cv_embedding.py`

### Admin operations

- [Admin panel](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/admin.py): `CVReviwer/admin.py`
- [Scraper controller](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/scraper_controller.py): `CVReviwer/scraper_controller.py`
- [Scraper service](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/scraper_service.py): `CVReviwer/scraper_service.py`
- [Job controller](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/job_controller.py): `CVReviwer/job_controller.py`
- [Job service](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/job_service.py): `CVReviwer/job_service.py`
- [Validation](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/validation_service.py): `CVReviwer/validation_service.py`
- [Authentication](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/auth_service.py): `CVReviwer/auth_service.py`
- [Activity logs](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/log_service.py): `CVReviwer/log_service.py`

### Persistence and enrichment

- [Listing enrichment](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/enrich_jobs.py): `CVReviwer/enrich_jobs.py`
- [MySQL database](https://github.com/piza-tempest/cvision_project/blob/main/CVReviwer/db.py): `CVReviwer/db.py`

### Other components

- **Jobseeker**
- **Administrator**
- **Job providers**

## Connections

- Jobseeker → Streamlit app: uses (evidence: `README.md`)
- Streamlit app → CV upload: uploads CV (evidence: `CVReviwer/app.py`)
- Streamlit app → CV extraction: extracts data (evidence: `CVReviwer/app.py`)
- Streamlit app → CV embedding: processes CV (evidence: `CVReviwer/app.py`)
- Streamlit app → Match controller: requests matches (evidence: `CVReviwer/app.py`)
- Match controller → CV data adapter: retrieves CV data (evidence: `CVReviwer/match_controller.py`)
- Match controller → Match service: generates matches (evidence: `CVReviwer/match_controller.py`)
- Match service → CV data adapter: reads CV data (evidence: `CVReviwer/match_service.py`)
- Match service → Job service: loads listings (evidence: `CVReviwer/match_service.py`)
- Match service → Embedding logic: uses embeddings (evidence: `CVReviwer/match_service.py`)
- Match service → MySQL database: stores matches (evidence: `CVReviwer/match_service.py`)
- Administrator → Admin panel: manages listings (evidence: `README.md`)
- Admin panel → Authentication: checks credentials (evidence: `CVReviwer/admin.py`)
- Admin panel → Scraper controller: manages scrapers (evidence: `CVReviwer/admin.py`)
- Admin panel → Job controller: manages jobs (evidence: `CVReviwer/admin.py`)
- Admin panel → Activity logs: reads activity (evidence: `CVReviwer/admin.py`)
- Scraper controller → Scraper service: runs scrapers (evidence: `CVReviwer/scraper_controller.py`)
- Scraper controller → Validation: validates input (evidence: `CVReviwer/scraper_controller.py`)
- Scraper controller → Activity logs: records activity (evidence: `CVReviwer/scraper_controller.py`)
- Scraper service → Job providers: fetches listings
- Scraper service → Job service: saves listings (evidence: `CVReviwer/scraper_service.py`)
- Scraper service → MySQL database: persists scraper data (evidence: `CVReviwer/scraper_service.py`)
- Job controller → Job service: updates listings (evidence: `CVReviwer/job_controller.py`)
- Job controller → Validation: validates edits (evidence: `CVReviwer/job_controller.py`)
- Job service → MySQL database: reads and writes (evidence: `CVReviwer/job_service.py`)
- Authentication → MySQL database: reads and writes (evidence: `CVReviwer/auth_service.py`)
- Activity logs → MySQL database: writes entries (evidence: `CVReviwer/log_service.py`)
- Listing enrichment → MySQL database: loads listings (evidence: `CVReviwer/enrich_jobs.py`)
