# pavankalyanv5/ai-resume-generator architecture

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

- Interactive diagram: https://gitdiagram.com/pavankalyanv5/ai-resume-generator
- Repository: https://github.com/pavankalyanv5/ai-resume-generator

## Overview

AI Resume Generator is a local-first resume-tailoring product. A user imports a master resume and submits a job description; the app parses the JD, selects relevant content, optionally reviews the plan, redacts private details before AI tailoring, checks and restores the result locally, then renders PDF/DOCX. The graph also preserves documented learning, analytics, Drive, and mobile-companion capabilities. Pipeline ordering and several subsystem links are based on the README; unsampled implementation details are not treated as inspected source.

Main entry points: [`crates/server/src/api.rs`](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/api.rs) (Job API), [`crates/core/src/select.rs`](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/select.rs) (Content selection), [`crates/core/src/redact.rs`](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/redact.rs) (PII protection), [`apps/web/src/App.tsx`](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/apps/web/src/App.tsx) (Web interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User applications"]
  node_web["Web interface<br/>[App.tsx]"]
  node_webapi["API client<br/>[api.ts]"]
  node_desktop["Desktop host<br/>[lib.rs]"]
  node_phone["Android companion<br/>[lib.rs]"]
end

subgraph group_pipeline["Job pipeline"]
  node_server["HTTP server<br/>[lib.rs]"]
  node_api["Job API<br/>[api.rs]"]
  node_fetch["JD fetch<br/>[fetch.rs]"]
end

subgraph group_tailoring["Resume intelligence"]
  node_import["Resume import<br/>[import.rs]"]
  node_schema["Resume model<br/>[schema.rs]"]
  node_jd["JD parsing<br/>[jd.rs]"]
  node_selection["Content selection<br/>[select.rs]"]
  node_heuristics["Page heuristics<br/>[heuristics.rs]"]
  node_review["Plan review<br/>[review.rs]"]
  node_privacy["PII protection<br/>[redact.rs]"]
  node_grounding["Grounding and restore<br/>[profile_model.rs]"]
  node_render["PDF and DOCX<br/>[latex.rs]"]
end

subgraph group_state["State and learning"]
  node_db[("SQLite job saga<br/>[lib.rs]")]
  node_realtime["Live events<br/>[realtime.rs]"]
  node_learning["Corrections and models<br/>[learn.rs]"]
  node_analytics["Applications analytics<br/>[Applications.tsx]"]
end

subgraph group_integrations["External integrations"]
  node_ai["AI providers<br/>[mod.rs]"]
  node_drive["Google Drive<br/>[drive.rs]"]
end

node_user(("Resume owner"))

node_user -->|"submits JD"| node_web
node_web -->|"requests jobs"| node_webapi
node_webapi -.->|"calls API"| node_api
node_desktop -->|"hosts locally"| node_server
node_phone -->|"uses desktop proxy"| node_server
node_api -.->|"fetches JD URL"| node_fetch
node_api -->|"creates job"| node_db
node_import -->|"produces model"| node_schema
node_api -->|"starts parsing"| node_jd
node_jd -->|"supplies requirements"| node_selection
node_selection -->|"decides page target"| node_heuristics
node_selection -->|"provides candidate plan"| node_review
node_review -->|"redacts review prompt"| node_privacy
node_api -->|"builds redacted payload"| node_privacy
node_privacy -->|"sends guarded request"| node_ai
node_ai -->|"returns rewrite"| node_grounding
node_grounding -->|"restores then renders"| node_render
node_render -->|"uploads if requested"| node_drive
node_api -->|"publishes job events"| node_realtime
node_api -->|"records corrections"| node_learning
node_learning -.->|"supplies learning metrics"| node_analytics
node_user -->|"tracks outcomes"| node_analytics

click node_web "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/apps/web/src/App.tsx"
click node_webapi "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/apps/web/src/api.ts"
click node_desktop "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/apps/desktop/src-tauri/src/lib.rs"
click node_phone "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/companion/src/lib.rs"
click node_server "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/lib.rs"
click node_api "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/api.rs"
click node_fetch "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/fetch.rs"
click node_db "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/lib.rs"
click node_import "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/import.rs"
click node_schema "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/schema.rs"
click node_jd "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/jd.rs"
click node_selection "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/select.rs"
click node_heuristics "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/heuristics.rs"
click node_review "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/review.rs"
click node_privacy "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/redact.rs"
click node_ai "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/providers/mod.rs"
click node_grounding "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/profile_model.rs"
click node_render "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/latex.rs"
click node_drive "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/drive.rs"
click node_realtime "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/realtime.rs"
click node_learning "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/learn.rs"
click node_analytics "https://github.com/pavankalyanv5/ai-resume-generator/blob/main/apps/web/src/pages/Applications.tsx"

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_desktop,node_phone toneBlue
class node_server,node_api,node_fetch toneAmber
class node_import,node_schema,node_jd,node_selection,node_heuristics,node_review,node_privacy,node_grounding,node_render toneMint
class node_db,node_realtime,node_learning,node_analytics toneRose
class node_ai,node_drive,node_user toneIndigo
```

## Components

### User applications

- [Web interface](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/apps/web/src/App.tsx): `apps/web/src/App.tsx`
- [API client](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/apps/web/src/api.ts): `apps/web/src/api.ts`
- [Desktop host](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/apps/desktop/src-tauri/src/lib.rs): `apps/desktop/src-tauri/src/lib.rs`
- [Android companion](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/companion/src/lib.rs): `crates/companion/src/lib.rs`

### Job pipeline

- [HTTP server](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/lib.rs): `crates/server/src/lib.rs`
- [Job API](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/api.rs): `crates/server/src/api.rs`
- [JD fetch](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/fetch.rs): `crates/server/src/fetch.rs`

### Resume intelligence

- [Resume import](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/import.rs): `crates/core/src/import.rs`
- [Resume model](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/schema.rs): `crates/core/src/schema.rs`
- [JD parsing](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/jd.rs): `crates/core/src/jd.rs`
- [Content selection](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/select.rs): `crates/core/src/select.rs`
- [Page heuristics](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/heuristics.rs): `crates/core/src/heuristics.rs`
- [Plan review](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/review.rs): `crates/core/src/review.rs`
- [PII protection](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/redact.rs): `crates/core/src/redact.rs`
- [Grounding and restore](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/profile_model.rs): `crates/core/src/profile_model.rs`
- [PDF and DOCX](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/core/src/latex.rs): `crates/core/src/latex.rs`

### State and learning

- [SQLite job saga](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/lib.rs): `crates/server/src/lib.rs`
- [Live events](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/realtime.rs): `crates/server/src/realtime.rs`
- [Corrections and models](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/learn.rs): `crates/server/src/learn.rs`
- [Applications analytics](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/apps/web/src/pages/Applications.tsx): `apps/web/src/pages/Applications.tsx`

### External integrations

- [AI providers](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/providers/mod.rs): `crates/server/src/providers/mod.rs`
- [Google Drive](https://github.com/pavankalyanv5/ai-resume-generator/blob/main/crates/server/src/drive.rs): `crates/server/src/drive.rs`

### Other components

- **Resume owner**

## Connections

- Resume owner → Web interface: submits JD (evidence: `README.md`)
- Web interface → API client: requests jobs (evidence: `apps/web/src/App.tsx`)
- API client → Job API: calls API
- Desktop host → HTTP server: hosts locally (evidence: `README.md`)
- Android companion → HTTP server: uses desktop proxy (evidence: `README.md`)
- Job API → JD fetch: fetches JD URL
- Job API → SQLite job saga: creates job (evidence: `README.md`)
- Resume import → Resume model: produces model (evidence: `crates/core/src/schema.rs`)
- Job API → JD parsing: starts parsing (evidence: `README.md`)
- JD parsing → Content selection: supplies requirements (evidence: `crates/core/src/select.rs`)
- Content selection → Page heuristics: decides page target (evidence: `crates/core/src/select.rs`)
- Content selection → Plan review: provides candidate plan (evidence: `crates/core/src/review.rs`)
- Plan review → PII protection: redacts review prompt (evidence: `crates/core/src/review.rs`)
- Job API → PII protection: builds redacted payload (evidence: `README.md`)
- PII protection → AI providers: sends guarded request (evidence: `README.md`)
- AI providers → Grounding and restore: returns rewrite (evidence: `README.md`)
- Grounding and restore → PDF and DOCX: restores then renders (evidence: `README.md`)
- PDF and DOCX → Google Drive: uploads if requested (evidence: `README.md`)
- Job API → Live events: publishes job events (evidence: `README.md`)
- Job API → Corrections and models: records corrections (evidence: `README.md`)
- Corrections and models → Applications analytics: supplies learning metrics
- Resume owner → Applications analytics: tracks outcomes (evidence: `README.md`)
