# hchen90/resume-pro architecture

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

- Interactive diagram: https://gitdiagram.com/hchen90/resume-pro
- Repository: https://github.com/hchen90/resume-pro

## Overview

Resume Pro is a local-first resume editor: users create and structure resumes, preview and export them in selectable templates, optionally improve them with a reviewable AI assistant, and compare resumes with saved job descriptions. Resume, job-description, and AI-session data are workspace-backed and versioned; legacy database support remains part of migration/session infrastructure. The graph retains the documented editing, template, export, AI, job-fit, localization, and desktop capabilities. Several UI and subsystem paths are unsampled, so edges for documented workflows cite the README; source-level edges use the excerpts or SOURCE INDEX.

Main entry points: [`src/lib/db/resume-repository.ts`](https://github.com/hchen90/resume-pro/blob/main/src/lib/db/resume-repository.ts) (Resume repository), [`src/app/api/ai/route.ts`](https://github.com/hchen90/resume-pro/blob/main/src/app/api/ai/route.ts) (Assistant endpoint), [`src/lib/workspace/ensure.ts`](https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/ensure.ts) (Workspace setup), [`src/app/api/ai/confirm/route.ts`](https://github.com/hchen90/resume-pro/blob/main/src/app/api/ai/confirm/route.ts) (Proposal confirmation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editing["Resume editing"]
  node_workspace_ui["Resume workspace"]
  node_resume_model["Resume structure<br/>[types.ts]"]
  node_resume_api["Resume API<br/>[route.ts]"]
  node_validation["Resume validation<br/>[validation.ts]"]
  node_localization["Interface languages<br/>[i18n.ts]"]
end

subgraph group_presentation["Preview and export"]
  node_preview["Live preview<br/>[resume-preview.tsx]"]
  node_resume_doc["Resume document"]
  node_template_registry["Template registry<br/>[registry.ts]"]
  node_template_views["Resume templates"]
  node_export["Print and PDF<br/>[print-button.tsx]"]
end

subgraph group_assistant["AI assistance"]
  node_ai_panel["AI assistant panel<br/>[ai-panel.tsx]"]
  node_ai_route["Assistant endpoint<br/>[route.ts]"]
  node_assistant_runner["Assistant runner<br/>[runner.ts]"]
  node_patch_engine["Resume patch engine<br/>[patch.ts]"]
  node_proposal_review["Proposal review"]
  node_confirm_route["Proposal confirmation<br/>[route.ts]"]
  node_ai_model["AI model access<br/>[model.ts]"]
end

subgraph group_workspace["Workspace data"]
  node_resume_repo["Resume repository"]
  node_artifact_store["Change artifacts"]
  node_chat_repository["AI session repository"]
  node_workspace_setup["Workspace setup<br/>[ensure.ts]"]
  node_workspace_git["Workspace Git<br/>[git.ts]"]
  node_workspace_layout["Workspace layout<br/>[layout.ts]"]
  node_workspace_migration["Legacy migration<br/>[migrate.ts]"]
  node_jd_repository["Job descriptions"]
end

subgraph group_jobfit["Job fit"]
  node_job_ui["Job-match tool<br/>[job-match-tool.tsx]"]
  node_job_route["Job-match endpoint<br/>[route.ts]"]
end

node_user(("Resume editor"))
node_provider{{"AI provider"}}

node_user -->|"edits resumes"| node_workspace_ui
node_workspace_ui -->|"previews"| node_preview
node_preview -->|"selects template"| node_template_registry
node_preview -->|"renders"| node_resume_doc
node_resume_doc -.->|"renders document"| node_template_views
node_user -->|"prints or exports"| node_export
node_workspace_ui -.->|"loads and saves"| node_resume_api
node_resume_api -->|"validates input"| node_validation
node_resume_api -->|"reads and writes"| node_resume_repo
node_resume_repo -->|"ensures workspace"| node_workspace_setup
node_resume_repo -->|"creates resume data"| node_resume_model
node_resume_repo -.->|"stores documents"| node_workspace_layout
node_workspace_setup -->|"initializes Git"| node_workspace_git
node_workspace_setup -->|"sets up layout"| node_workspace_layout
node_workspace_setup -->|"migrates legacy data"| node_workspace_migration
node_user -->|"requests improvements"| node_ai_panel
node_ai_panel -.->|"sends assistant request"| node_ai_route
node_ai_route -->|"runs assistant"| node_assistant_runner
node_ai_route -->|"loads resume"| node_resume_repo
node_ai_route -->|"loads and saves session"| node_chat_repository
node_ai_route -->|"supersedes artifacts"| node_artifact_store
node_assistant_runner -.->|"produces resume changes"| node_patch_engine
node_ai_panel -->|"reviews proposed changes"| node_proposal_review
node_proposal_review -.->|"confirms proposal"| node_confirm_route
node_confirm_route -->|"loads and saves session"| node_chat_repository
node_confirm_route -->|"saves change artifact"| node_artifact_store
node_confirm_route -->|"commits workspace changes"| node_workspace_setup
node_user -->|"checks job fit"| node_job_ui
node_job_ui -.->|"requests analysis"| node_job_route
node_job_route -->|"loads job description"| node_jd_repository
node_job_route -->|"loads resume"| node_resume_repo
node_job_route -->|"invokes model"| node_ai_model
node_ai_model -.->|"calls configured API"| node_provider
node_user -->|"uses localized interface"| node_localization

click node_workspace_ui "https://github.com/hchen90/resume-pro/blob/main/src/components/resume/resume-workspace.tsx"
click node_resume_model "https://github.com/hchen90/resume-pro/blob/main/src/lib/resume/types.ts"
click node_resume_api "https://github.com/hchen90/resume-pro/blob/main/src/app/api/resumes/%5Bid%5D/route.ts"
click node_resume_repo "https://github.com/hchen90/resume-pro/blob/main/src/lib/db/resume-repository.ts"
click node_validation "https://github.com/hchen90/resume-pro/blob/main/src/lib/resume/validation.ts"
click node_preview "https://github.com/hchen90/resume-pro/blob/main/src/components/resume/resume-preview.tsx"
click node_resume_doc "https://github.com/hchen90/resume-pro/blob/main/src/components/resume/resume-document.tsx"
click node_template_registry "https://github.com/hchen90/resume-pro/blob/main/src/templates/resume/registry.ts"
click node_template_views "https://github.com/hchen90/resume-pro/tree/main/src/templates/resume"
click node_export "https://github.com/hchen90/resume-pro/blob/main/src/components/resume/print-button.tsx"
click node_ai_panel "https://github.com/hchen90/resume-pro/blob/main/src/components/resume/ai-panel.tsx"
click node_ai_route "https://github.com/hchen90/resume-pro/blob/main/src/app/api/ai/route.ts"
click node_assistant_runner "https://github.com/hchen90/resume-pro/blob/main/src/lib/ai/langgraph/runner.ts"
click node_patch_engine "https://github.com/hchen90/resume-pro/blob/main/src/lib/ai/patch.ts"
click node_proposal_review "https://github.com/hchen90/resume-pro/blob/main/src/components/resume/ai-proposal-review.tsx"
click node_confirm_route "https://github.com/hchen90/resume-pro/blob/main/src/app/api/ai/confirm/route.ts"
click node_artifact_store "https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/ai-artifact-store.ts"
click node_chat_repository "https://github.com/hchen90/resume-pro/blob/main/src/lib/db/ai-chat-repository.ts"
click node_workspace_setup "https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/ensure.ts"
click node_workspace_git "https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/git.ts"
click node_workspace_layout "https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/layout.ts"
click node_workspace_migration "https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/migrate.ts"
click node_job_ui "https://github.com/hchen90/resume-pro/blob/main/src/components/job-match/job-match-tool.tsx"
click node_job_route "https://github.com/hchen90/resume-pro/blob/main/src/app/api/job-match/route.ts"
click node_jd_repository "https://github.com/hchen90/resume-pro/blob/main/src/lib/db/job-description-repository.ts"
click node_ai_model "https://github.com/hchen90/resume-pro/blob/main/src/lib/ai/model.ts"
click node_localization "https://github.com/hchen90/resume-pro/blob/main/src/lib/i18n.ts"

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_workspace_ui,node_resume_model,node_resume_api,node_validation,node_localization toneBlue
class node_preview,node_resume_doc,node_template_registry,node_template_views,node_export toneAmber
class node_ai_panel,node_ai_route,node_assistant_runner,node_patch_engine,node_proposal_review,node_confirm_route,node_ai_model toneMint
class node_resume_repo,node_artifact_store,node_chat_repository,node_workspace_setup,node_workspace_git,node_workspace_layout,node_workspace_migration,node_jd_repository toneRose
class node_job_ui,node_job_route,node_user,node_provider toneIndigo
```

## Components

### Resume editing

- [Resume workspace](https://github.com/hchen90/resume-pro/blob/main/src/components/resume/resume-workspace.tsx): `src/components/resume/resume-workspace.tsx`
- [Resume structure](https://github.com/hchen90/resume-pro/blob/main/src/lib/resume/types.ts): `src/lib/resume/types.ts`
- [Resume API](https://github.com/hchen90/resume-pro/blob/main/src/app/api/resumes/%5Bid%5D/route.ts): `src/app/api/resumes/[id]/route.ts`
- [Resume validation](https://github.com/hchen90/resume-pro/blob/main/src/lib/resume/validation.ts): `src/lib/resume/validation.ts`
- [Interface languages](https://github.com/hchen90/resume-pro/blob/main/src/lib/i18n.ts): `src/lib/i18n.ts`

### Preview and export

- [Live preview](https://github.com/hchen90/resume-pro/blob/main/src/components/resume/resume-preview.tsx): `src/components/resume/resume-preview.tsx`
- [Resume document](https://github.com/hchen90/resume-pro/blob/main/src/components/resume/resume-document.tsx): `src/components/resume/resume-document.tsx`
- [Template registry](https://github.com/hchen90/resume-pro/blob/main/src/templates/resume/registry.ts): `src/templates/resume/registry.ts`
- [Resume templates](https://github.com/hchen90/resume-pro/tree/main/src/templates/resume): `src/templates/resume`
- [Print and PDF](https://github.com/hchen90/resume-pro/blob/main/src/components/resume/print-button.tsx): `src/components/resume/print-button.tsx`

### AI assistance

- [AI assistant panel](https://github.com/hchen90/resume-pro/blob/main/src/components/resume/ai-panel.tsx): `src/components/resume/ai-panel.tsx`
- [Assistant endpoint](https://github.com/hchen90/resume-pro/blob/main/src/app/api/ai/route.ts): `src/app/api/ai/route.ts`
- [Assistant runner](https://github.com/hchen90/resume-pro/blob/main/src/lib/ai/langgraph/runner.ts): `src/lib/ai/langgraph/runner.ts`
- [Resume patch engine](https://github.com/hchen90/resume-pro/blob/main/src/lib/ai/patch.ts): `src/lib/ai/patch.ts`
- [Proposal review](https://github.com/hchen90/resume-pro/blob/main/src/components/resume/ai-proposal-review.tsx): `src/components/resume/ai-proposal-review.tsx`
- [Proposal confirmation](https://github.com/hchen90/resume-pro/blob/main/src/app/api/ai/confirm/route.ts): `src/app/api/ai/confirm/route.ts`
- [AI model access](https://github.com/hchen90/resume-pro/blob/main/src/lib/ai/model.ts): `src/lib/ai/model.ts`

### Workspace data

- [Resume repository](https://github.com/hchen90/resume-pro/blob/main/src/lib/db/resume-repository.ts): `src/lib/db/resume-repository.ts`
- [Change artifacts](https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/ai-artifact-store.ts): `src/lib/workspace/ai-artifact-store.ts`
- [AI session repository](https://github.com/hchen90/resume-pro/blob/main/src/lib/db/ai-chat-repository.ts): `src/lib/db/ai-chat-repository.ts`
- [Workspace setup](https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/ensure.ts): `src/lib/workspace/ensure.ts`
- [Workspace Git](https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/git.ts): `src/lib/workspace/git.ts`
- [Workspace layout](https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/layout.ts): `src/lib/workspace/layout.ts`
- [Legacy migration](https://github.com/hchen90/resume-pro/blob/main/src/lib/workspace/migrate.ts): `src/lib/workspace/migrate.ts`
- [Job descriptions](https://github.com/hchen90/resume-pro/blob/main/src/lib/db/job-description-repository.ts): `src/lib/db/job-description-repository.ts`

### Job fit

- [Job-match tool](https://github.com/hchen90/resume-pro/blob/main/src/components/job-match/job-match-tool.tsx): `src/components/job-match/job-match-tool.tsx`
- [Job-match endpoint](https://github.com/hchen90/resume-pro/blob/main/src/app/api/job-match/route.ts): `src/app/api/job-match/route.ts`

### Other components

- **Resume editor**
- **AI provider**

## Connections

- Resume editor → Resume workspace: edits resumes (evidence: `README.md`)
- Resume workspace → Live preview: previews (evidence: `README.md`)
- Live preview → Template registry: selects template (evidence: `src/components/resume/resume-preview.tsx`)
- Live preview → Resume document: renders (evidence: `src/components/resume/resume-preview.tsx`)
- Resume document → Resume templates: renders document
- Resume editor → Print and PDF: prints or exports (evidence: `README.md`)
- Resume workspace → Resume API: loads and saves
- Resume API → Resume validation: validates input (evidence: `src/app/api/resumes/[id]/route.ts`)
- Resume API → Resume repository: reads and writes (evidence: `src/app/api/resumes/[id]/route.ts`)
- Resume repository → Workspace setup: ensures workspace (evidence: `src/lib/db/resume-repository.ts`)
- Resume repository → Resume structure: creates resume data (evidence: `src/lib/db/resume-repository.ts`)
- Resume repository → Workspace layout: stores documents
- Workspace setup → Workspace Git: initializes Git (evidence: `src/lib/workspace/ensure.ts`)
- Workspace setup → Workspace layout: sets up layout (evidence: `src/lib/workspace/ensure.ts`)
- Workspace setup → Legacy migration: migrates legacy data (evidence: `src/lib/workspace/ensure.ts`)
- Resume editor → AI assistant panel: requests improvements (evidence: `README.md`)
- AI assistant panel → Assistant endpoint: sends assistant request
- Assistant endpoint → Assistant runner: runs assistant (evidence: `src/app/api/ai/route.ts`)
- Assistant endpoint → Resume repository: loads resume (evidence: `src/app/api/ai/route.ts`)
- Assistant endpoint → AI session repository: loads and saves session (evidence: `src/app/api/ai/route.ts`)
- Assistant endpoint → Change artifacts: supersedes artifacts (evidence: `src/app/api/ai/route.ts`)
- Assistant runner → Resume patch engine: produces resume changes
- AI assistant panel → Proposal review: reviews proposed changes (evidence: `README.md`)
- Proposal review → Proposal confirmation: confirms proposal
- Proposal confirmation → AI session repository: loads and saves session (evidence: `src/app/api/ai/confirm/route.ts`)
- Proposal confirmation → Change artifacts: saves change artifact (evidence: `src/app/api/ai/confirm/route.ts`)
- Proposal confirmation → Workspace setup: commits workspace changes (evidence: `src/app/api/ai/confirm/route.ts`)
- Resume editor → Job-match tool: checks job fit (evidence: `README.md`)
- Job-match tool → Job-match endpoint: requests analysis
- Job-match endpoint → Job descriptions: loads job description (evidence: `src/app/api/job-match/route.ts`)
- Job-match endpoint → Resume repository: loads resume (evidence: `src/app/api/job-match/route.ts`)
- Job-match endpoint → AI model access: invokes model (evidence: `src/app/api/job-match/route.ts`)
- AI model access → AI provider: calls configured API (evidence: `README.md`)
- Resume editor → Interface languages: uses localized interface (evidence: `README.md`)
