# nghiadz-123/do-an-tot-nghiep-ptit-be architecture

> Architecture diagram of the GitHub repository nghiadz-123/do-an-tot-nghiep-ptit-be, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nghiadz-123/do-an-tot-nghiep-ptit-be
- Repository: https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be

## Overview

This is a Django REST recruitment platform with candidate and recruiter workflows, ATS application tracking, and AI-assisted CV and job matching. Candidates create accounts, manage profiles and CVs, apply to jobs, and track applications; recruiters manage companies and jobs, review applicants, and invite candidates. AI capabilities include CV scoring and suggestions, job recommendations, and recruiter-side matching. The graph reflects documented workflows and indexed source references; several feature modules were not sampled, so their internal call paths are not asserted.

Main entry points: [`backend/apps/accounts/models.py`](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/accounts/models.py) (Accounts), [`backend/apps/ai/views.py`](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/views.py) (AI API), [`backend/apps/applications/models.py`](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/applications/models.py) (Applications), [`backend/apps/jobs/services.py`](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/jobs/services.py) (Job lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Accounts and profiles"]
  node_accounts[("Accounts<br/>[models.py]")]
  node_candidate_profile[("Candidate profiles<br/>[models.py]")]
  node_employer_profile[("Employers and companies<br/>[models.py]")]
  node_administration["Administration<br/>[services.py]"]
end

subgraph group_marketplace["Recruitment marketplace"]
  node_catalog[("Skills and catalog<br/>[services.py]")]
  node_jobs[("Job listings<br/>[models.py]")]
  node_job_ops["Job lifecycle<br/>[services.py]"]
  node_talent_search["Talent search<br/>[views.py]"]
  node_favorites[("Favorites<br/>[services.py]")]
  node_invitations["Candidate invitations<br/>[services.py]"]
end

subgraph group_ats["Applications and CVs"]
  node_cv_ops["CV upload and parsing<br/>[services.py]"]
  node_cv_store[("CV records<br/>[models.py]")]
  node_applications[("Applications<br/>[models.py]")]
  node_application_ops["ATS workflow<br/>[services.py]"]
end

subgraph group_intelligence["AI services"]
  node_ai_api["AI API<br/>[views.py]"]
  node_cv_analysis["CV scoring and analysis<br/>[cv_analysis.py]"]
  node_cv_suggestions["CV suggestions<br/>[cv_suggestion.py]"]
  node_recommendations["Job recommendations"]
  node_matching["Candidate matching"]
  node_vectorstore[("Vector search<br/>[client.py]")]
  node_llm["LLM providers<br/>[factory.py]"]
end

node_candidate(("Candidate"))
node_recruiter(("Recruiter"))
node_postgres[("PostgreSQL")]
node_chroma[("ChromaDB")]
node_llm_provider{{"Gemini / OpenAI"}}

node_candidate -->|"registers and signs in"| node_accounts
node_recruiter -->|"registers and signs in"| node_accounts
node_accounts -.->|"provides candidate profile"| node_candidate_profile
node_accounts -.->|"provides employer profile"| node_employer_profile
node_candidate -->|"uploads or builds CV"| node_cv_ops
node_cv_ops -->|"stores and parses"| node_cv_store
node_cv_ops -->|"CV used to apply"| node_applications
node_candidate -->|"submits application"| node_application_ops
node_application_ops -->|"records status and history"| node_applications
node_application_ops -->|"checks job status; updates count"| node_jobs
node_recruiter -->|"manages job listings"| node_job_ops
node_job_ops -->|"creates and changes"| node_jobs
node_job_ops -->|"resolves job skills"| node_catalog
node_candidate -->|"publishes searchable CV"| node_talent_search
node_recruiter -->|"searches candidates"| node_talent_search
node_recruiter -->|"invites candidates"| node_invitations
node_invitations -.->|"invitation may lead to application"| node_applications
node_candidate -.->|"saves jobs or companies"| node_favorites
node_recruiter -.->|"uses admin operations"| node_administration
node_candidate -->|"requests AI features"| node_ai_api
node_ai_api -.->|"scores CV"| node_cv_analysis
node_ai_api -.->|"requests CV suggestions"| node_cv_suggestions
node_ai_api -.->|"requests job recommendations"| node_recommendations
node_recruiter -.->|"requests candidate ranking"| node_matching
node_cv_analysis -.->|"uses language model"| node_llm
node_cv_suggestions -.->|"uses language model"| node_llm
node_recommendations -.->|"uses semantic search"| node_vectorstore
node_matching -.->|"uses semantic matching"| node_vectorstore
node_llm -.->|"calls provider"| node_llm_provider
node_vectorstore -.->|"stores embeddings"| node_chroma
node_accounts -.->|"persists relational records"| node_postgres
node_jobs -.->|"persists relational records"| node_postgres
node_applications -.->|"persists relational records"| node_postgres

click node_accounts "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/accounts/models.py"
click node_candidate_profile "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/candidates/models.py"
click node_employer_profile "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/employers/models.py"
click node_catalog "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/catalog/services.py"
click node_jobs "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/jobs/models.py"
click node_job_ops "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/jobs/services.py"
click node_talent_search "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/talents/views.py"
click node_favorites "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/favorites/services.py"
click node_invitations "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/invitations/services.py"
click node_cv_ops "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/cvs/services.py"
click node_cv_store "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/cvs/models.py"
click node_applications "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/applications/models.py"
click node_application_ops "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/applications/services.py"
click node_administration "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/administration/services.py"
click node_ai_api "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/views.py"
click node_cv_analysis "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/services/cv_analysis.py"
click node_cv_suggestions "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/services/cv_suggestion.py"
click node_recommendations "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/services/job_recommendation.py"
click node_matching "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/services/candidate_matching.py"
click node_vectorstore "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/vectorstore/client.py"
click node_llm "https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/llm/factory.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_accounts,node_candidate_profile,node_employer_profile,node_administration toneBlue
class node_catalog,node_jobs,node_job_ops,node_talent_search,node_favorites,node_invitations,node_postgres,node_chroma toneAmber
class node_cv_ops,node_cv_store,node_applications,node_application_ops toneMint
class node_ai_api,node_cv_analysis,node_cv_suggestions,node_recommendations,node_matching,node_vectorstore,node_llm toneRose
class node_candidate,node_recruiter,node_llm_provider toneIndigo
```

## Components

### Accounts and profiles

- [Accounts](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/accounts/models.py): `backend/apps/accounts/models.py`
- [Candidate profiles](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/candidates/models.py): `backend/apps/candidates/models.py`
- [Employers and companies](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/employers/models.py): `backend/apps/employers/models.py`
- [Administration](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/administration/services.py): `backend/apps/administration/services.py`

### Recruitment marketplace

- [Skills and catalog](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/catalog/services.py): `backend/apps/catalog/services.py`
- [Job listings](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/jobs/models.py): `backend/apps/jobs/models.py`
- [Job lifecycle](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/jobs/services.py): `backend/apps/jobs/services.py`
- [Talent search](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/talents/views.py): `backend/apps/talents/views.py`
- [Favorites](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/favorites/services.py): `backend/apps/favorites/services.py`
- [Candidate invitations](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/invitations/services.py): `backend/apps/invitations/services.py`

### Applications and CVs

- [CV upload and parsing](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/cvs/services.py): `backend/apps/cvs/services.py`
- [CV records](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/cvs/models.py): `backend/apps/cvs/models.py`
- [Applications](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/applications/models.py): `backend/apps/applications/models.py`
- [ATS workflow](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/applications/services.py): `backend/apps/applications/services.py`

### AI services

- [AI API](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/views.py): `backend/apps/ai/views.py`
- [CV scoring and analysis](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/services/cv_analysis.py): `backend/apps/ai/services/cv_analysis.py`
- [CV suggestions](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/services/cv_suggestion.py): `backend/apps/ai/services/cv_suggestion.py`
- [Job recommendations](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/services/job_recommendation.py): `backend/apps/ai/services/job_recommendation.py`
- [Candidate matching](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/services/candidate_matching.py): `backend/apps/ai/services/candidate_matching.py`
- [Vector search](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/vectorstore/client.py): `backend/apps/ai/vectorstore/client.py`
- [LLM providers](https://github.com/nghiadz-123/do-an-tot-nghiep-ptit-be/blob/main/backend/apps/ai/llm/factory.py): `backend/apps/ai/llm/factory.py`

### Other components

- **Candidate**
- **Recruiter**
- **PostgreSQL**
- **ChromaDB**
- **Gemini / OpenAI**

## Connections

- Candidate → Accounts: registers and signs in (evidence: `README.md`)
- Recruiter → Accounts: registers and signs in (evidence: `README.md`)
- Accounts → Candidate profiles: provides candidate profile
- Accounts → Employers and companies: provides employer profile
- Candidate → CV upload and parsing: uploads or builds CV (evidence: `README.md`)
- CV upload and parsing → CV records: stores and parses (evidence: `backend/apps/cvs/services.py`)
- CV upload and parsing → Applications: CV used to apply (evidence: `README.md`)
- Candidate → ATS workflow: submits application (evidence: `README.md`)
- ATS workflow → Applications: records status and history (evidence: `backend/apps/applications/services.py`)
- ATS workflow → Job listings: checks job status; updates count (evidence: `backend/apps/applications/services.py`)
- Recruiter → Job lifecycle: manages job listings (evidence: `README.md`)
- Job lifecycle → Job listings: creates and changes (evidence: `backend/apps/jobs/services.py`)
- Job lifecycle → Skills and catalog: resolves job skills (evidence: `backend/apps/jobs/services.py`)
- Candidate → Talent search: publishes searchable CV (evidence: `README.md`)
- Recruiter → Talent search: searches candidates (evidence: `README.md`)
- Recruiter → Candidate invitations: invites candidates (evidence: `README.md`)
- Candidate invitations → Applications: invitation may lead to application (evidence: `README.md`)
- Candidate → Favorites: saves jobs or companies (evidence: `backend/apps/favorites/services.py`)
- Recruiter → Administration: uses admin operations (evidence: `backend/apps/administration/services.py`)
- Candidate → AI API: requests AI features (evidence: `README.md`)
- AI API → CV scoring and analysis: scores CV (evidence: `README.md`)
- AI API → CV suggestions: requests CV suggestions (evidence: `README.md`)
- AI API → Job recommendations: requests job recommendations (evidence: `README.md`)
- Recruiter → Candidate matching: requests candidate ranking (evidence: `README.md`)
- CV scoring and analysis → LLM providers: uses language model
- CV suggestions → LLM providers: uses language model
- Job recommendations → Vector search: uses semantic search
- Candidate matching → Vector search: uses semantic matching
- LLM providers → Gemini / OpenAI: calls provider (evidence: `README.md`)
- Vector search → ChromaDB: stores embeddings (evidence: `README.md`)
- Accounts → PostgreSQL: persists relational records (evidence: `README.md`)
- Job listings → PostgreSQL: persists relational records (evidence: `README.md`)
- Applications → PostgreSQL: persists relational records (evidence: `README.md`)
