# ylx959/resite architecture

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

- Interactive diagram: https://gitdiagram.com/ylx959/resite
- Repository: https://github.com/ylx959/resite

## Overview

Resite is a browser-based resume website creator: users edit structured resume content, see the shared template update in a live preview, then export a ready-to-host ZIP or save/import JSON. The graph follows the documented editor-to-reducer-to-resume flow and the implemented persistence, preview, and export relationships. Several editor details and deployment instructions are documented but not fully sampled; unsampled links are omitted rather than inferred.

Main entry points: [`src/App.tsx`](https://github.com/ylx959/resite/blob/main/src/App.tsx) (App shell), [`src/hooks/useResumeStore.ts`](https://github.com/ylx959/resite/blob/main/src/hooks/useResumeStore.ts) (Resume store hook), [`src/components/preview/ResumePreview.tsx`](https://github.com/ylx959/resite/blob/main/src/components/preview/ResumePreview.tsx) (Live preview), [`src/templates/minimal/MinimalResume.tsx`](https://github.com/ylx959/resite/blob/main/src/templates/minimal/MinimalResume.tsx) (Minimal template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editing["Resume editing"]
  node_app["App shell<br/>[App.tsx]"]
  node_editor["Resume editor"]
  node_editor_context["Dispatch context<br/>[EditorContext.tsx]"]
  node_toolbar["File actions<br/>[Toolbar.tsx]"]
end

subgraph group_rendering["Preview and templates"]
  node_preview["Live preview<br/>[ResumePreview.tsx]"]
  node_template_registry["Template registry<br/>[index.ts]"]
  node_minimal_template["Minimal template<br/>[MinimalResume.tsx]"]
  node_template_content["Visible content<br/>[content.ts]"]
  node_anchors["Edit anchors<br/>[anchors.ts]"]
  node_editor_line["Preview edit marker<br/>[EditorLine.tsx]"]
end

subgraph group_persistence["Resume data"]
  node_reducer["Resume reducer<br/>[reducer.ts]"]
  node_resume["Resume model<br/>[resume.ts]"]
  node_store_hook["Resume store hook<br/>[useResumeStore.ts]"]
  node_storage[("Browser storage<br/>[storage.ts]")]
  node_validation["Resume validation<br/>[validation.ts]"]
  node_sample["Starter resume<br/>[sample.ts]"]
end

subgraph group_publishing["Website export"]
  node_export["Website packager<br/>[exportWebsite.ts]"]
  node_site_document["Export HTML document<br/>[SiteDocument.tsx]"]
  node_download["Download file<br/>[download.ts]"]
  node_deploy_guide["Publish guide<br/>[DeployGuide.tsx]"]
  node_guide_content["Publishing steps<br/>[deployGuide.ts]"]
end

node_user(("Resume creator"))
node_hosting(("Vercel Drop"))

node_user -->|"edits and exports"| node_app
node_app -->|"loads store"| node_store_hook
node_app -->|"renders editor"| node_editor
node_app -->|"renders preview"| node_preview
node_app -->|"renders actions"| node_toolbar
node_editor -->|"uses dispatch"| node_editor_context
node_editor_context -->|"dispatches changes"| node_reducer
node_store_hook -->|"reduces actions"| node_reducer
node_store_hook -->|"loads and saves"| node_storage
node_storage -->|"validates saved data"| node_validation
node_store_hook -->|"uses fallback"| node_sample
node_store_hook -->|"returns resume"| node_app
node_toolbar -->|"invokes file actions"| node_app
node_app -->|"validates import"| node_validation
node_preview -->|"selects template"| node_template_registry
node_template_registry -->|"registers component"| node_minimal_template
node_minimal_template -->|"filters sections"| node_template_content
node_minimal_template -->|"marks editable regions"| node_anchors
node_preview -->|"renders edit marker"| node_editor_line
node_editor_line -->|"resolves edit path"| node_anchors
node_app -->|"builds website ZIP"| node_export
node_export -->|"gets template"| node_template_registry
node_export -->|"renders document"| node_site_document
node_app -->|"downloads ZIP"| node_download
node_app -->|"opens guide"| node_deploy_guide
node_deploy_guide -->|"shows instructions"| node_guide_content
node_user -->|"uploads ZIP"| node_hosting

click node_app "https://github.com/ylx959/resite/blob/main/src/App.tsx"
click node_editor "https://github.com/ylx959/resite/tree/main/src/components/editor"
click node_editor_context "https://github.com/ylx959/resite/blob/main/src/hooks/EditorContext.tsx"
click node_reducer "https://github.com/ylx959/resite/blob/main/src/resume/reducer.ts"
click node_resume "https://github.com/ylx959/resite/blob/main/src/types/resume.ts"
click node_store_hook "https://github.com/ylx959/resite/blob/main/src/hooks/useResumeStore.ts"
click node_storage "https://github.com/ylx959/resite/blob/main/src/utils/storage.ts"
click node_validation "https://github.com/ylx959/resite/blob/main/src/utils/validation.ts"
click node_sample "https://github.com/ylx959/resite/blob/main/src/resume/sample.ts"
click node_toolbar "https://github.com/ylx959/resite/blob/main/src/components/app/Toolbar.tsx"
click node_preview "https://github.com/ylx959/resite/blob/main/src/components/preview/ResumePreview.tsx"
click node_template_registry "https://github.com/ylx959/resite/blob/main/src/templates/index.ts"
click node_minimal_template "https://github.com/ylx959/resite/blob/main/src/templates/minimal/MinimalResume.tsx"
click node_template_content "https://github.com/ylx959/resite/blob/main/src/templates/content.ts"
click node_anchors "https://github.com/ylx959/resite/blob/main/src/templates/anchors.ts"
click node_editor_line "https://github.com/ylx959/resite/blob/main/src/components/preview/EditorLine.tsx"
click node_export "https://github.com/ylx959/resite/blob/main/src/utils/exportWebsite.ts"
click node_site_document "https://github.com/ylx959/resite/blob/main/src/templates/SiteDocument.tsx"
click node_download "https://github.com/ylx959/resite/blob/main/src/utils/download.ts"
click node_deploy_guide "https://github.com/ylx959/resite/blob/main/src/components/app/DeployGuide.tsx"
click node_guide_content "https://github.com/ylx959/resite/blob/main/src/content/deployGuide.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_app,node_editor,node_editor_context,node_toolbar toneBlue
class node_preview,node_template_registry,node_minimal_template,node_template_content,node_anchors,node_editor_line toneAmber
class node_reducer,node_resume,node_store_hook,node_storage,node_validation,node_sample toneMint
class node_export,node_site_document,node_download,node_deploy_guide,node_guide_content toneRose
class node_user,node_hosting toneIndigo
```

## Components

### Resume editing

- [App shell](https://github.com/ylx959/resite/blob/main/src/App.tsx): `src/App.tsx`
- [Resume editor](https://github.com/ylx959/resite/tree/main/src/components/editor): `src/components/editor`
- [Dispatch context](https://github.com/ylx959/resite/blob/main/src/hooks/EditorContext.tsx): `src/hooks/EditorContext.tsx`
- [File actions](https://github.com/ylx959/resite/blob/main/src/components/app/Toolbar.tsx): `src/components/app/Toolbar.tsx`

### Preview and templates

- [Live preview](https://github.com/ylx959/resite/blob/main/src/components/preview/ResumePreview.tsx): `src/components/preview/ResumePreview.tsx`
- [Template registry](https://github.com/ylx959/resite/blob/main/src/templates/index.ts): `src/templates/index.ts`
- [Minimal template](https://github.com/ylx959/resite/blob/main/src/templates/minimal/MinimalResume.tsx): `src/templates/minimal/MinimalResume.tsx`
- [Visible content](https://github.com/ylx959/resite/blob/main/src/templates/content.ts): `src/templates/content.ts`
- [Edit anchors](https://github.com/ylx959/resite/blob/main/src/templates/anchors.ts): `src/templates/anchors.ts`
- [Preview edit marker](https://github.com/ylx959/resite/blob/main/src/components/preview/EditorLine.tsx): `src/components/preview/EditorLine.tsx`

### Resume data

- [Resume reducer](https://github.com/ylx959/resite/blob/main/src/resume/reducer.ts): `src/resume/reducer.ts`
- [Resume model](https://github.com/ylx959/resite/blob/main/src/types/resume.ts): `src/types/resume.ts`
- [Resume store hook](https://github.com/ylx959/resite/blob/main/src/hooks/useResumeStore.ts): `src/hooks/useResumeStore.ts`
- [Browser storage](https://github.com/ylx959/resite/blob/main/src/utils/storage.ts): `src/utils/storage.ts`
- [Resume validation](https://github.com/ylx959/resite/blob/main/src/utils/validation.ts): `src/utils/validation.ts`
- [Starter resume](https://github.com/ylx959/resite/blob/main/src/resume/sample.ts): `src/resume/sample.ts`

### Website export

- [Website packager](https://github.com/ylx959/resite/blob/main/src/utils/exportWebsite.ts): `src/utils/exportWebsite.ts`
- [Export HTML document](https://github.com/ylx959/resite/blob/main/src/templates/SiteDocument.tsx): `src/templates/SiteDocument.tsx`
- [Download file](https://github.com/ylx959/resite/blob/main/src/utils/download.ts): `src/utils/download.ts`
- [Publish guide](https://github.com/ylx959/resite/blob/main/src/components/app/DeployGuide.tsx): `src/components/app/DeployGuide.tsx`
- [Publishing steps](https://github.com/ylx959/resite/blob/main/src/content/deployGuide.ts): `src/content/deployGuide.ts`

### Other components

- **Resume creator**
- **Vercel Drop**

## Connections

- Resume creator → App shell: edits and exports (evidence: `README.md`)
- App shell → Resume store hook: loads store (evidence: `src/App.tsx`)
- App shell → Resume editor: renders editor (evidence: `src/App.tsx`)
- App shell → Live preview: renders preview (evidence: `src/App.tsx`)
- App shell → File actions: renders actions (evidence: `src/App.tsx`)
- Resume editor → Dispatch context: uses dispatch (evidence: `src/components/editor/Editor.tsx`)
- Dispatch context → Resume reducer: dispatches changes (evidence: `src/hooks/EditorContext.tsx`)
- Resume store hook → Resume reducer: reduces actions (evidence: `src/hooks/useResumeStore.ts`)
- Resume store hook → Browser storage: loads and saves (evidence: `src/hooks/useResumeStore.ts`)
- Browser storage → Resume validation: validates saved data (evidence: `src/utils/storage.ts`)
- Resume store hook → Starter resume: uses fallback (evidence: `src/hooks/useResumeStore.ts`)
- Resume store hook → App shell: returns resume (evidence: `src/hooks/useResumeStore.ts`)
- File actions → App shell: invokes file actions (evidence: `src/App.tsx`)
- App shell → Resume validation: validates import (evidence: `src/App.tsx`)
- Live preview → Template registry: selects template (evidence: `src/components/preview/ResumePreview.tsx`)
- Template registry → Minimal template: registers component (evidence: `src/templates/index.ts`)
- Minimal template → Visible content: filters sections (evidence: `src/templates/minimal/MinimalResume.tsx`)
- Minimal template → Edit anchors: marks editable regions (evidence: `src/templates/minimal/MinimalResume.tsx`)
- Live preview → Preview edit marker: renders edit marker (evidence: `src/components/preview/ResumePreview.tsx`)
- Preview edit marker → Edit anchors: resolves edit path (evidence: `src/components/preview/EditorLine.tsx`)
- App shell → Website packager: builds website ZIP (evidence: `src/App.tsx`)
- Website packager → Template registry: gets template (evidence: `src/utils/exportWebsite.ts`)
- Website packager → Export HTML document: renders document (evidence: `src/utils/exportWebsite.ts`)
- App shell → Download file: downloads ZIP (evidence: `src/App.tsx`)
- App shell → Publish guide: opens guide (evidence: `src/App.tsx`)
- Publish guide → Publishing steps: shows instructions (evidence: `src/components/app/DeployGuide.tsx`)
- Resume creator → Vercel Drop: uploads ZIP (evidence: `README.md`)
