# lans12138/resume-copilot architecture

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

- Interactive diagram: https://gitdiagram.com/lans12138/resume-copilot
- Repository: https://github.com/lans12138/resume-copilot

## Overview

Resume Copilot is an HR decision-support application: staff prepare job and resume data, run evidence-backed candidate matching, then review and approve any individual actions before side effects occur. The browser is the user-facing workspace; the API and worker-backed services implement the domain workflows. Separate branches cover resume extraction and correction, evaluation, and interview scheduling. The README documents the principal run and approval boundaries; the source excerpts and index show selected API, authentication, runtime, and frontend wiring, but do not expose every domain implementation detail.

Main entry points: [`apps/web/src/api/client.ts`](https://github.com/lans12138/resume-copilot/blob/main/apps/web/src/api/client.ts) (API client), [`backend/app/documents`](https://github.com/lans12138/resume-copilot/tree/main/backend/app/documents) (Resume documents), [`backend/app/match_run`](https://github.com/lans12138/resume-copilot/tree/main/backend/app/match_run) (Batch matching), [`backend/app/retrieval`](https://github.com/lans12138/resume-copilot/tree/main/backend/app/retrieval) (Candidate retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Recruiting workspace"]
  node_web["Web workspace<br/>[App.tsx]"]
  node_webapi["API client<br/>[client.ts]"]
end

subgraph group_domain["Hiring workflows"]
  node_documents["Resume documents"]
  node_profile["Candidate profiles"]
  node_jobs["Job management<br/>[service.py]"]
  node_match["Batch matching"]
  node_retrieval["Candidate retrieval"]
  node_reports["Evidence reports"]
  node_explanations["Match explanations"]
  node_interviews["Interview scheduling"]
  node_evaluation["System evaluation"]
end

subgraph group_runtime["Agent and execution"]
  node_application["Application run<br/>[service.py]"]
  node_agent["Run engine<br/>[engine.py]"]
  node_approval["Approval workflow<br/>[service.py]"]
  node_sideeffects["Approved side effects<br/>[side_effects.py]"]
end

subgraph group_platform["Shared platform"]
  node_auth["Authentication<br/>[dependencies.py]"]
  node_database[("PostgreSQL<br/>[database.py]")]
  node_queue["Task queue<br/>[celery.py]"]
  node_sse["Progress events"]
  node_model["Model gateway<br/>[model_gateway.py]"]
end

node_hr(("HR user"))

node_hr -->|"uses"| node_web
node_web -->|"requests data"| node_webapi
node_webapi -->|"authenticates API"| node_auth
node_webapi -.->|"manages resumes"| node_documents
node_webapi -.->|"manages jobs"| node_jobs
node_documents -->|"queues parsing"| node_queue
node_documents -.->|"produces profile drafts"| node_profile
node_hr -.->|"corrects draft"| node_profile
node_webapi -->|"starts batch run"| node_match
node_match -->|"enqueues execution"| node_queue
node_match -.->|"retrieves candidates"| node_retrieval
node_retrieval -.->|"reads candidate data"| node_profile
node_retrieval -.->|"embeds queries"| node_model
node_match -.->|"builds evidence reports"| node_reports
node_reports -.->|"requests explanations"| node_explanations
node_webapi -.->|"starts individual run"| node_application
node_application -.->|"executes graph"| node_agent
node_agent -->|"pauses for approval"| node_approval
node_approval -->|"authorizes action"| node_sideeffects
node_sideeffects -.->|"writes interview"| node_interviews
node_webapi -->|"starts evaluation"| node_evaluation
node_evaluation -->|"publishes run"| node_queue
node_webapi -->|"follows progress"| node_sse
node_agent -->|"persists run state"| node_database
node_approval -->|"stores decisions"| node_database
node_documents -.->|"stores document records"| node_database

click node_web "https://github.com/lans12138/resume-copilot/blob/main/apps/web/src/App.tsx"
click node_webapi "https://github.com/lans12138/resume-copilot/blob/main/apps/web/src/api/client.ts"
click node_documents "https://github.com/lans12138/resume-copilot/tree/main/backend/app/documents"
click node_profile "https://github.com/lans12138/resume-copilot/tree/main/backend/app/candidates"
click node_jobs "https://github.com/lans12138/resume-copilot/blob/main/backend/app/jobs/service.py"
click node_match "https://github.com/lans12138/resume-copilot/tree/main/backend/app/match_run"
click node_retrieval "https://github.com/lans12138/resume-copilot/tree/main/backend/app/retrieval"
click node_reports "https://github.com/lans12138/resume-copilot/tree/main/backend/app/reports"
click node_explanations "https://github.com/lans12138/resume-copilot/tree/main/backend/app/explanations"
click node_application "https://github.com/lans12138/resume-copilot/blob/main/backend/app/job_applications/service.py"
click node_agent "https://github.com/lans12138/resume-copilot/blob/main/backend/app/agent/engine.py"
click node_approval "https://github.com/lans12138/resume-copilot/blob/main/backend/app/approvals/service.py"
click node_sideeffects "https://github.com/lans12138/resume-copilot/blob/main/backend/app/job_applications/side_effects.py"
click node_interviews "https://github.com/lans12138/resume-copilot/tree/main/backend/app/interviews"
click node_evaluation "https://github.com/lans12138/resume-copilot/tree/main/backend/app/evaluations"
click node_auth "https://github.com/lans12138/resume-copilot/blob/main/backend/app/auth/dependencies.py"
click node_database "https://github.com/lans12138/resume-copilot/blob/main/backend/app/infrastructure/database.py"
click node_queue "https://github.com/lans12138/resume-copilot/blob/main/backend/app/infrastructure/celery.py"
click node_sse "https://github.com/lans12138/resume-copilot/tree/main/backend/app/sse"
click node_model "https://github.com/lans12138/resume-copilot/blob/main/backend/app/infrastructure/model_gateway.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,node_webapi,node_hr toneBlue
class node_documents,node_profile,node_jobs,node_match,node_retrieval,node_reports,node_explanations,node_interviews,node_evaluation toneAmber
class node_application,node_agent,node_approval,node_sideeffects toneMint
class node_auth,node_database,node_queue,node_sse,node_model toneRose
```

## Components

### Recruiting workspace

- [Web workspace](https://github.com/lans12138/resume-copilot/blob/main/apps/web/src/App.tsx): `apps/web/src/App.tsx`
- [API client](https://github.com/lans12138/resume-copilot/blob/main/apps/web/src/api/client.ts): `apps/web/src/api/client.ts`

### Hiring workflows

- [Resume documents](https://github.com/lans12138/resume-copilot/tree/main/backend/app/documents): `backend/app/documents`
- [Candidate profiles](https://github.com/lans12138/resume-copilot/tree/main/backend/app/candidates): `backend/app/candidates`
- [Job management](https://github.com/lans12138/resume-copilot/blob/main/backend/app/jobs/service.py): `backend/app/jobs/service.py`
- [Batch matching](https://github.com/lans12138/resume-copilot/tree/main/backend/app/match_run): `backend/app/match_run`
- [Candidate retrieval](https://github.com/lans12138/resume-copilot/tree/main/backend/app/retrieval): `backend/app/retrieval`
- [Evidence reports](https://github.com/lans12138/resume-copilot/tree/main/backend/app/reports): `backend/app/reports`
- [Match explanations](https://github.com/lans12138/resume-copilot/tree/main/backend/app/explanations): `backend/app/explanations`
- [Interview scheduling](https://github.com/lans12138/resume-copilot/tree/main/backend/app/interviews): `backend/app/interviews`
- [System evaluation](https://github.com/lans12138/resume-copilot/tree/main/backend/app/evaluations): `backend/app/evaluations`

### Agent and execution

- [Application run](https://github.com/lans12138/resume-copilot/blob/main/backend/app/job_applications/service.py): `backend/app/job_applications/service.py`
- [Run engine](https://github.com/lans12138/resume-copilot/blob/main/backend/app/agent/engine.py): `backend/app/agent/engine.py`
- [Approval workflow](https://github.com/lans12138/resume-copilot/blob/main/backend/app/approvals/service.py): `backend/app/approvals/service.py`
- [Approved side effects](https://github.com/lans12138/resume-copilot/blob/main/backend/app/job_applications/side_effects.py): `backend/app/job_applications/side_effects.py`

### Shared platform

- [Authentication](https://github.com/lans12138/resume-copilot/blob/main/backend/app/auth/dependencies.py): `backend/app/auth/dependencies.py`
- [PostgreSQL](https://github.com/lans12138/resume-copilot/blob/main/backend/app/infrastructure/database.py): `backend/app/infrastructure/database.py`
- [Task queue](https://github.com/lans12138/resume-copilot/blob/main/backend/app/infrastructure/celery.py): `backend/app/infrastructure/celery.py`
- [Progress events](https://github.com/lans12138/resume-copilot/tree/main/backend/app/sse): `backend/app/sse`
- [Model gateway](https://github.com/lans12138/resume-copilot/blob/main/backend/app/infrastructure/model_gateway.py): `backend/app/infrastructure/model_gateway.py`

### Other components

- **HR user**

## Connections

- HR user → Web workspace: uses (evidence: `README.md`)
- Web workspace → API client: requests data (evidence: `apps/web/src/App.tsx`)
- API client → Authentication: authenticates API (evidence: `backend/app/auth/dependencies.py`)
- API client → Resume documents: manages resumes
- API client → Job management: manages jobs
- Resume documents → Task queue: queues parsing (evidence: `backend/app/documents/routes.py`)
- Resume documents → Candidate profiles: produces profile drafts
- HR user → Candidate profiles: corrects draft
- API client → Batch matching: starts batch run (evidence: `backend/app/match_run/routes.py`)
- Batch matching → Task queue: enqueues execution (evidence: `backend/app/match_run/routes.py`)
- Batch matching → Candidate retrieval: retrieves candidates
- Candidate retrieval → Candidate profiles: reads candidate data (evidence: `backend/app/candidates/repository.py`)
- Candidate retrieval → Model gateway: embeds queries
- Batch matching → Evidence reports: builds evidence reports (evidence: `backend/app/reports/routes.py`)
- Evidence reports → Match explanations: requests explanations
- API client → Application run: starts individual run
- Application run → Run engine: executes graph
- Run engine → Approval workflow: pauses for approval (evidence: `README.md`)
- Approval workflow → Approved side effects: authorizes action (evidence: `README.md`)
- Approved side effects → Interview scheduling: writes interview
- API client → System evaluation: starts evaluation (evidence: `backend/app/evaluations/routes.py`)
- System evaluation → Task queue: publishes run (evidence: `backend/app/evaluations/routes.py`)
- API client → Progress events: follows progress
- Run engine → PostgreSQL: persists run state (evidence: `README.md`)
- Approval workflow → PostgreSQL: stores decisions (evidence: `README.md`)
- Resume documents → PostgreSQL: stores document records
