# mtothexmax/cv_meister architecture

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

- Interactive diagram: https://gitdiagram.com/mtothexmax/cv_meister
- Repository: https://github.com/mtothexmax/cv_meister

## Overview

CV Meister is a browser-based job-application workspace for maintaining shared personal details and CV content alongside per-employer application data. Its apparent workflow is to edit and tailor application documents, then preview or export them; the sampled code confirms the data models, JSON-format functions, Typst-source generation, image processing, and IndexedDB persistence. The README is only the generic Svelte starter, and the large UI page was not excerpted, so connections from user actions to these services and the final rendering flow remain unverified.

Main entry points: [`src/lib/appJson.ts`](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/appJson.ts) (JSON import/export), [`src/routes/+page.svelte`](https://github.com/mtothexmax/cv_meister/blob/main/src/routes/%2Bpage.svelte) (Workspace UI), [`src/lib/cv.ts`](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/cv.ts) (CV data and source), [`src/lib/letter.ts`](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/letter.ts) (Letter source)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Application workspace"]
  node_workspace_ui["Workspace UI<br/>[+page.svelte]"]
  node_landing["Landing view<br/>[Landing.svelte]"]
  node_color_picker["Color picker<br/>[ColorPicker.svelte]"]
end

subgraph group_domain["Application data"]
  node_shared_data["Shared details<br/>[shared.ts]"]
  node_job_data["Job records<br/>[job.ts]"]
  node_cv_data["CV data and source<br/>[cv.ts]"]
  node_static_data["Static materials<br/>[static.ts]"]
  node_json_exchange["JSON import/export<br/>[appJson.ts]"]
end

subgraph group_documents["Document generation"]
  node_letter_source["Letter source<br/>[letter.ts]"]
  node_letter_compiler["Letter compiler<br/>[letterCompiler.ts]"]
  node_typst_runtime["Typst runtime<br/>[typst.ts]"]
end

subgraph group_support["Files and persistence"]
  node_image_processing["Image processing<br/>[images.ts]"]
  node_color_extraction["Color extraction<br/>[colors.ts]"]
  node_local_state[("Local state<br/>[storage.ts]")]
end

node_user(("Applicant"))

node_user -.->|"edits workspace"| node_workspace_ui
node_workspace_ui -.->|"shows view"| node_landing
node_workspace_ui -.->|"persists state"| node_local_state
node_json_exchange -->|"normalizes CV"| node_cv_data
node_json_exchange -->|"encodes jobs"| node_job_data
node_json_exchange -->|"encodes letters"| node_letter_source
node_json_exchange -->|"encodes details"| node_shared_data
node_json_exchange -->|"handles file data"| node_image_processing
node_json_exchange -->|"encodes materials"| node_static_data
node_cv_data -->|"uses Typst helpers"| node_letter_source
node_cv_data -->|"uses shared data"| node_shared_data
node_cv_data -->|"filters by job"| node_job_data
node_job_data -->|"defaults letter"| node_letter_source
node_static_data -->|"creates IDs"| node_shared_data
node_color_extraction -->|"rasterizes SVG"| node_image_processing
node_workspace_ui -.->|"selects accent"| node_color_picker
node_letter_source -.->|"provides source"| node_letter_compiler
node_letter_compiler -.->|"compiles document"| node_typst_runtime

click node_workspace_ui "https://github.com/mtothexmax/cv_meister/blob/main/src/routes/%2Bpage.svelte"
click node_landing "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/Landing.svelte"
click node_color_picker "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/ColorPicker.svelte"
click node_shared_data "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/shared.ts"
click node_job_data "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/job.ts"
click node_cv_data "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/cv.ts"
click node_static_data "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/static.ts"
click node_json_exchange "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/appJson.ts"
click node_letter_source "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/letter.ts"
click node_letter_compiler "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/letterCompiler.ts"
click node_typst_runtime "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/typst.ts"
click node_image_processing "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/images.ts"
click node_color_extraction "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/colors.ts"
click node_local_state "https://github.com/mtothexmax/cv_meister/blob/main/src/lib/storage.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_landing,node_color_picker toneBlue
class node_shared_data,node_job_data,node_cv_data,node_static_data,node_json_exchange toneAmber
class node_letter_source,node_letter_compiler,node_typst_runtime toneMint
class node_image_processing,node_color_extraction,node_local_state toneRose
class node_user toneIndigo
```

## Components

### Application workspace

- [Workspace UI](https://github.com/mtothexmax/cv_meister/blob/main/src/routes/%2Bpage.svelte): `src/routes/+page.svelte`
- [Landing view](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/Landing.svelte): `src/lib/Landing.svelte`
- [Color picker](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/ColorPicker.svelte): `src/lib/ColorPicker.svelte`

### Application data

- [Shared details](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/shared.ts): `src/lib/shared.ts`
- [Job records](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/job.ts): `src/lib/job.ts`
- [CV data and source](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/cv.ts): `src/lib/cv.ts`
- [Static materials](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/static.ts): `src/lib/static.ts`
- [JSON import/export](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/appJson.ts): `src/lib/appJson.ts`

### Document generation

- [Letter source](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/letter.ts): `src/lib/letter.ts`
- [Letter compiler](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/letterCompiler.ts): `src/lib/letterCompiler.ts`
- [Typst runtime](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/typst.ts): `src/lib/typst.ts`

### Files and persistence

- [Image processing](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/images.ts): `src/lib/images.ts`
- [Color extraction](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/colors.ts): `src/lib/colors.ts`
- [Local state](https://github.com/mtothexmax/cv_meister/blob/main/src/lib/storage.ts): `src/lib/storage.ts`

### Other components

- **Applicant**

## Connections

- Applicant → Workspace UI: edits workspace
- Workspace UI → Landing view: shows view
- Workspace UI → Local state: persists state
- JSON import/export → CV data and source: normalizes CV (evidence: `src/lib/appJson.ts`)
- JSON import/export → Job records: encodes jobs (evidence: `src/lib/appJson.ts`)
- JSON import/export → Letter source: encodes letters (evidence: `src/lib/appJson.ts`)
- JSON import/export → Shared details: encodes details (evidence: `src/lib/appJson.ts`)
- JSON import/export → Image processing: handles file data (evidence: `src/lib/appJson.ts`)
- JSON import/export → Static materials: encodes materials (evidence: `src/lib/appJson.ts`)
- CV data and source → Letter source: uses Typst helpers (evidence: `src/lib/cv.ts`)
- CV data and source → Shared details: uses shared data (evidence: `src/lib/cv.ts`)
- CV data and source → Job records: filters by job (evidence: `src/lib/cv.ts`)
- Job records → Letter source: defaults letter (evidence: `src/lib/job.ts`)
- Static materials → Shared details: creates IDs (evidence: `src/lib/static.ts`)
- Color extraction → Image processing: rasterizes SVG (evidence: `src/lib/colors.ts`)
- Workspace UI → Color picker: selects accent
- Letter source → Letter compiler: provides source
- Letter compiler → Typst runtime: compiles document
