# raphaelmatori/ai-resume architecture

> Architecture diagram of the GitHub repository raphaelmatori/ai-resume, 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/raphaelmatori/ai-resume
- Repository: https://github.com/raphaelmatori/ai-resume

## Overview

AI Resume Builder is an Electron desktop app backed by Python agents. Its main workflow ingests candidate resumes into traceable facts, distills pasted or linked vacancy material, then generates tailored DOCX documents and a separate match report. The README documents the overall stages and features; sampled source confirms the Python processing and Electron bridge. Some Electron handlers and generation details are only partially excerpted, so those links rely on README statements rather than unsampled implementation assumptions.

Main entry points: [`execution/generate_application.py`](https://github.com/raphaelmatori/ai-resume/blob/main/execution/generate_application.py) (Application drafting), [`execution/analyze_match.py`](https://github.com/raphaelmatori/ai-resume/blob/main/execution/analyze_match.py) (Match analysis), [`main.js`](https://github.com/raphaelmatori/ai-resume/blob/main/main.js) (Electron orchestration), [`execution/ingest_candidate.py`](https://github.com/raphaelmatori/ai-resume/blob/main/execution/ingest_candidate.py) (Fact extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_ui["Workflow UI<br/>[renderer.js]"]
  node_bridge["IPC bridge<br/>[preload.js]"]
  node_electron["Electron orchestration<br/>[main.js]"]
end

subgraph group_candidate["Candidate processing"]
  node_resume_files["Resume PDFs<br/>[.gitkeep]"]
  node_candidate_ingest["Fact extraction"]
  node_fact_schema["Fact models<br/>[models.py]"]
  node_candidate_profile["Candidate profile"]
end

subgraph group_vacancy["Vacancy processing"]
  node_job_input["Job text or URL<br/>[.gitkeep]"]
  node_vacancy_ingest["Vacancy distillation<br/>[ingest_vacancy.py]"]
  node_vacancy_profile["Vacancy profile<br/>[ingest_vacancy.py]"]
end

subgraph group_application["Application outputs"]
  node_llm_config["LLM configuration<br/>[utils.py]"]
  node_generation["Application drafting"]
  node_generation_models["Document schemas<br/>[gen_models.py]"]
  node_docx["Tailored DOCX files"]
  node_match["Match analysis<br/>[analyze_match.py]"]
  node_report["Match report<br/>[analyze_match.py]"]
end

node_user(("Applicant"))
node_llm{{"LLM providers"}}

node_user -->|"uses"| node_ui
node_ui -->|"invokes IPC"| node_bridge
node_bridge -->|"dispatches"| node_electron
node_electron -->|"runs script"| node_candidate_ingest
node_electron -.->|"runs script"| node_vacancy_ingest
node_electron -->|"runs script"| node_generation
node_electron -.->|"runs script"| node_match
node_user -->|"selects PDF"| node_resume_files
node_resume_files -->|"reads PDFs"| node_candidate_ingest
node_candidate_ingest -->|"creates facts"| node_fact_schema
node_candidate_ingest -->|"gets model"| node_llm_config
node_llm_config -->|"configures provider"| node_llm
node_candidate_ingest -->|"writes profile"| node_candidate_profile
node_user -->|"provides text or URL"| node_job_input
node_job_input -->|"reads input"| node_vacancy_ingest
node_vacancy_ingest -->|"gets model"| node_llm_config
node_vacancy_ingest -->|"fetches linked content"| node_llm
node_vacancy_ingest -->|"writes profile"| node_vacancy_profile
node_generation -->|"reads profile"| node_candidate_profile
node_generation -->|"reads profile"| node_vacancy_profile
node_generation -->|"gets model"| node_llm_config
node_generation -->|"uses schemas"| node_generation_models
node_generation -->|"drafts content"| node_llm
node_generation -->|"renders DOCX"| node_docx
node_match -->|"reads profile"| node_candidate_profile
node_match -->|"reads profile"| node_vacancy_profile
node_match -->|"gets model"| node_llm_config
node_match -->|"scores fit"| node_llm
node_match -->|"writes report"| node_report
node_ui -->|"opens results"| node_docx

click node_ui "https://github.com/raphaelmatori/ai-resume/blob/main/renderer.js"
click node_bridge "https://github.com/raphaelmatori/ai-resume/blob/main/preload.js"
click node_electron "https://github.com/raphaelmatori/ai-resume/blob/main/main.js"
click node_resume_files "https://github.com/raphaelmatori/ai-resume/blob/main/sources/candidate/.gitkeep"
click node_candidate_ingest "https://github.com/raphaelmatori/ai-resume/blob/main/execution/ingest_candidate.py"
click node_fact_schema "https://github.com/raphaelmatori/ai-resume/blob/main/execution/models.py"
click node_candidate_profile "https://github.com/raphaelmatori/ai-resume/blob/main/execution/ingest_candidate.py"
click node_job_input "https://github.com/raphaelmatori/ai-resume/blob/main/sources/vacancy/.gitkeep"
click node_vacancy_ingest "https://github.com/raphaelmatori/ai-resume/blob/main/execution/ingest_vacancy.py"
click node_vacancy_profile "https://github.com/raphaelmatori/ai-resume/blob/main/execution/ingest_vacancy.py"
click node_llm_config "https://github.com/raphaelmatori/ai-resume/blob/main/execution/utils.py"
click node_generation "https://github.com/raphaelmatori/ai-resume/blob/main/execution/generate_application.py"
click node_generation_models "https://github.com/raphaelmatori/ai-resume/blob/main/execution/gen_models.py"
click node_docx "https://github.com/raphaelmatori/ai-resume/blob/main/execution/generate_application.py"
click node_match "https://github.com/raphaelmatori/ai-resume/blob/main/execution/analyze_match.py"
click node_report "https://github.com/raphaelmatori/ai-resume/blob/main/execution/analyze_match.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_ui,node_bridge,node_electron toneBlue
class node_resume_files,node_candidate_ingest,node_fact_schema,node_candidate_profile toneAmber
class node_job_input,node_vacancy_ingest,node_vacancy_profile toneMint
class node_llm_config,node_generation,node_generation_models,node_docx,node_match,node_report toneRose
class node_user,node_llm toneIndigo
```

## Components

### Desktop experience

- [Workflow UI](https://github.com/raphaelmatori/ai-resume/blob/main/renderer.js): `renderer.js`
- [IPC bridge](https://github.com/raphaelmatori/ai-resume/blob/main/preload.js): `preload.js`
- [Electron orchestration](https://github.com/raphaelmatori/ai-resume/blob/main/main.js): `main.js`

### Candidate processing

- [Resume PDFs](https://github.com/raphaelmatori/ai-resume/blob/main/sources/candidate/.gitkeep): `sources/candidate/.gitkeep`
- [Fact extraction](https://github.com/raphaelmatori/ai-resume/blob/main/execution/ingest_candidate.py): `execution/ingest_candidate.py`
- [Fact models](https://github.com/raphaelmatori/ai-resume/blob/main/execution/models.py): `execution/models.py`
- [Candidate profile](https://github.com/raphaelmatori/ai-resume/blob/main/execution/ingest_candidate.py): `execution/ingest_candidate.py`

### Vacancy processing

- [Job text or URL](https://github.com/raphaelmatori/ai-resume/blob/main/sources/vacancy/.gitkeep): `sources/vacancy/.gitkeep`
- [Vacancy distillation](https://github.com/raphaelmatori/ai-resume/blob/main/execution/ingest_vacancy.py): `execution/ingest_vacancy.py`
- [Vacancy profile](https://github.com/raphaelmatori/ai-resume/blob/main/execution/ingest_vacancy.py): `execution/ingest_vacancy.py`

### Application outputs

- [LLM configuration](https://github.com/raphaelmatori/ai-resume/blob/main/execution/utils.py): `execution/utils.py`
- [Application drafting](https://github.com/raphaelmatori/ai-resume/blob/main/execution/generate_application.py): `execution/generate_application.py`
- [Document schemas](https://github.com/raphaelmatori/ai-resume/blob/main/execution/gen_models.py): `execution/gen_models.py`
- [Tailored DOCX files](https://github.com/raphaelmatori/ai-resume/blob/main/execution/generate_application.py): `execution/generate_application.py`
- [Match analysis](https://github.com/raphaelmatori/ai-resume/blob/main/execution/analyze_match.py): `execution/analyze_match.py`
- [Match report](https://github.com/raphaelmatori/ai-resume/blob/main/execution/analyze_match.py): `execution/analyze_match.py`

### Other components

- **Applicant**
- **LLM providers**

## Connections

- Applicant → Workflow UI: uses (evidence: `README.md`)
- Workflow UI → IPC bridge: invokes IPC (evidence: `preload.js`)
- IPC bridge → Electron orchestration: dispatches (evidence: `preload.js`)
- Electron orchestration → Fact extraction: runs script (evidence: `main.js`)
- Electron orchestration → Vacancy distillation: runs script (evidence: `README.md`)
- Electron orchestration → Application drafting: runs script (evidence: `main.js`)
- Electron orchestration → Match analysis: runs script (evidence: `README.md`)
- Applicant → Resume PDFs: selects PDF (evidence: `README.md`)
- Resume PDFs → Fact extraction: reads PDFs (evidence: `execution/ingest_candidate.py`)
- Fact extraction → Fact models: creates facts (evidence: `execution/ingest_candidate.py`)
- Fact extraction → LLM configuration: gets model (evidence: `execution/ingest_candidate.py`)
- LLM configuration → LLM providers: configures provider (evidence: `execution/utils.py`)
- Fact extraction → Candidate profile: writes profile (evidence: `README.md`)
- Applicant → Job text or URL: provides text or URL (evidence: `README.md`)
- Job text or URL → Vacancy distillation: reads input (evidence: `execution/ingest_vacancy.py`)
- Vacancy distillation → LLM configuration: gets model (evidence: `execution/ingest_vacancy.py`)
- Vacancy distillation → LLM providers: fetches linked content (evidence: `execution/ingest_vacancy.py`)
- Vacancy distillation → Vacancy profile: writes profile (evidence: `execution/ingest_vacancy.py`)
- Application drafting → Candidate profile: reads profile (evidence: `README.md`)
- Application drafting → Vacancy profile: reads profile (evidence: `README.md`)
- Application drafting → LLM configuration: gets model (evidence: `execution/generate_application.py`)
- Application drafting → Document schemas: uses schemas (evidence: `execution/generate_application.py`)
- Application drafting → LLM providers: drafts content (evidence: `README.md`)
- Application drafting → Tailored DOCX files: renders DOCX (evidence: `execution/generate_application.py`)
- Match analysis → Candidate profile: reads profile (evidence: `execution/analyze_match.py`)
- Match analysis → Vacancy profile: reads profile (evidence: `execution/analyze_match.py`)
- Match analysis → LLM configuration: gets model (evidence: `execution/analyze_match.py`)
- Match analysis → LLM providers: scores fit (evidence: `execution/analyze_match.py`)
- Match analysis → Match report: writes report (evidence: `execution/analyze_match.py`)
- Workflow UI → Tailored DOCX files: opens results (evidence: `renderer.js`)
