# swayaa/hows architecture

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

- Interactive diagram: https://gitdiagram.com/swayaa/hows
- Repository: https://github.com/swayaa/hows

## Overview

Hows is a local Windows-first Steps Recorder successor: the user starts capture, reviews and annotates the resulting guide, then saves or exports it. The desktop path runs through the Svelte editor and Tauri commands into a recorder worker and capture/session core; guides use the documented .steps format. Exporting is available in the app, while steps-cli also exports existing guides and builds guides from scripts. The graph preserves documented CLI and settings capabilities; unsampled implementation links are omitted where the excerpts do not establish them.

Main entry points: [`app/src-tauri/src/commands.rs`](https://github.com/swayaa/hows/blob/main/app/src-tauri/src/commands.rs) (Tauri commands), [`app/src/App.svelte`](https://github.com/swayaa/hows/blob/main/app/src/App.svelte) (Editor shell), [`app/src-tauri/src/recorder.rs`](https://github.com/swayaa/hows/blob/main/app/src-tauri/src/recorder.rs) (Recorder worker), [`core/store/src/lib.rs`](https://github.com/swayaa/hows/blob/main/core/store/src/lib.rs) (Steps storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_app["Editor shell<br/>[App.svelte]"]
  node_annotation["Annotation tools"]
  node_annotation_ops["Annotation geometry<br/>[annotate.ts]"]
  node_settings_ui["Settings screen"]
end

subgraph group_runtime["Capture runtime"]
  node_tauri["Tauri commands<br/>[commands.rs]"]
  node_worker["Recorder worker<br/>[recorder.rs]"]
  node_capture_window["Capture window<br/>[capture_window.rs]"]
  node_settings["Local settings<br/>[settings.rs]"]
  node_capture["Platform capture<br/>[lib.rs]"]
  node_session["Recording session<br/>[lib.rs]"]
  node_step_text["Step text templates<br/>[texts.rs]"]
end

subgraph group_guide["Guide data"]
  node_model["Guide model<br/>[model.rs]"]
  node_store["Steps storage<br/>[lib.rs]"]
  node_steps_file[".steps guide"]
end

subgraph group_outputs["Export and CLI"]
  node_export["Export engine<br/>[lib.rs]"]
  node_pdf["PDF renderer<br/>[pdf.rs]"]
  node_cli["steps-cli<br/>[main.rs]"]
end

node_user(("Guide author"))

node_user -->|"starts capture"| node_app
node_app -->|"invokes commands"| node_tauri
node_tauri -->|"controls recording"| node_worker
node_worker -->|"runs session"| node_session
node_worker -.->|"captures input"| node_capture
node_capture -.->|"supplies events"| node_session
node_session -->|"generates text"| node_step_text
node_tauri -->|"syncs capture UI"| node_capture_window
node_tauri -->|"loads and saves"| node_settings
node_settings_ui -->|"updates settings"| node_tauri
node_user -->|"edits screenshots"| node_annotation
node_app -->|"renders editor stage"| node_annotation
node_annotation -->|"uses geometry"| node_annotation_ops
node_user -->|"saves guide"| node_steps_file
node_store -->|"uses data model"| node_model
node_store -.->|"reads and writes"| node_steps_file
node_app -->|"exports guide"| node_export
node_export -->|"renders PDF"| node_pdf
node_cli -.->|"opens guides"| node_store
node_cli -->|"exports formats"| node_export
node_user -->|"runs scripts"| node_cli

click node_app "https://github.com/swayaa/hows/blob/main/app/src/App.svelte"
click node_annotation "https://github.com/swayaa/hows/blob/main/app/src/AnnotateStage.svelte"
click node_annotation_ops "https://github.com/swayaa/hows/blob/main/app/src/annotate.ts"
click node_settings_ui "https://github.com/swayaa/hows/blob/main/app/src/SettingsPage.svelte"
click node_tauri "https://github.com/swayaa/hows/blob/main/app/src-tauri/src/commands.rs"
click node_worker "https://github.com/swayaa/hows/blob/main/app/src-tauri/src/recorder.rs"
click node_capture_window "https://github.com/swayaa/hows/blob/main/app/src-tauri/src/capture_window.rs"
click node_settings "https://github.com/swayaa/hows/blob/main/app/src-tauri/src/settings.rs"
click node_capture "https://github.com/swayaa/hows/blob/main/core/capture/src/lib.rs"
click node_session "https://github.com/swayaa/hows/blob/main/core/session/src/lib.rs"
click node_step_text "https://github.com/swayaa/hows/blob/main/core/session/src/texts.rs"
click node_model "https://github.com/swayaa/hows/blob/main/core/store/src/model.rs"
click node_store "https://github.com/swayaa/hows/blob/main/core/store/src/lib.rs"
click node_export "https://github.com/swayaa/hows/blob/main/core/export/src/lib.rs"
click node_pdf "https://github.com/swayaa/hows/blob/main/core/export/src/pdf.rs"
click node_cli "https://github.com/swayaa/hows/blob/main/core/cli/src/main.rs"

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_annotation,node_annotation_ops,node_settings_ui toneBlue
class node_tauri,node_worker,node_capture_window,node_settings,node_capture,node_session,node_step_text toneAmber
class node_model,node_store,node_steps_file toneMint
class node_export,node_pdf,node_cli toneRose
class node_user toneIndigo
```

## Components

### Desktop experience

- [Editor shell](https://github.com/swayaa/hows/blob/main/app/src/App.svelte): `app/src/App.svelte`
- [Annotation tools](https://github.com/swayaa/hows/blob/main/app/src/AnnotateStage.svelte): `app/src/AnnotateStage.svelte`
- [Annotation geometry](https://github.com/swayaa/hows/blob/main/app/src/annotate.ts): `app/src/annotate.ts`
- [Settings screen](https://github.com/swayaa/hows/blob/main/app/src/SettingsPage.svelte): `app/src/SettingsPage.svelte`

### Capture runtime

- [Tauri commands](https://github.com/swayaa/hows/blob/main/app/src-tauri/src/commands.rs): `app/src-tauri/src/commands.rs`
- [Recorder worker](https://github.com/swayaa/hows/blob/main/app/src-tauri/src/recorder.rs): `app/src-tauri/src/recorder.rs`
- [Capture window](https://github.com/swayaa/hows/blob/main/app/src-tauri/src/capture_window.rs): `app/src-tauri/src/capture_window.rs`
- [Local settings](https://github.com/swayaa/hows/blob/main/app/src-tauri/src/settings.rs): `app/src-tauri/src/settings.rs`
- [Platform capture](https://github.com/swayaa/hows/blob/main/core/capture/src/lib.rs): `core/capture/src/lib.rs`
- [Recording session](https://github.com/swayaa/hows/blob/main/core/session/src/lib.rs): `core/session/src/lib.rs`
- [Step text templates](https://github.com/swayaa/hows/blob/main/core/session/src/texts.rs): `core/session/src/texts.rs`

### Guide data

- [Guide model](https://github.com/swayaa/hows/blob/main/core/store/src/model.rs): `core/store/src/model.rs`
- [Steps storage](https://github.com/swayaa/hows/blob/main/core/store/src/lib.rs): `core/store/src/lib.rs`
- **.steps guide**

### Export and CLI

- [Export engine](https://github.com/swayaa/hows/blob/main/core/export/src/lib.rs): `core/export/src/lib.rs`
- [PDF renderer](https://github.com/swayaa/hows/blob/main/core/export/src/pdf.rs): `core/export/src/pdf.rs`
- [steps-cli](https://github.com/swayaa/hows/blob/main/core/cli/src/main.rs): `core/cli/src/main.rs`

### Other components

- **Guide author**

## Connections

- Guide author → Editor shell: starts capture (evidence: `README.md`)
- Editor shell → Tauri commands: invokes commands (evidence: `app/src/App.svelte`)
- Tauri commands → Recorder worker: controls recording (evidence: `app/src-tauri/src/commands.rs`)
- Recorder worker → Recording session: runs session (evidence: `app/src-tauri/src/recorder.rs`)
- Recorder worker → Platform capture: captures input
- Platform capture → Recording session: supplies events
- Recording session → Step text templates: generates text (evidence: `core/session/src/lib.rs`)
- Tauri commands → Capture window: syncs capture UI (evidence: `app/src-tauri/src/commands.rs`)
- Tauri commands → Local settings: loads and saves (evidence: `app/src-tauri/src/commands.rs`)
- Settings screen → Tauri commands: updates settings (evidence: `app/src/SettingsPage.svelte`)
- Guide author → Annotation tools: edits screenshots (evidence: `README.md`)
- Editor shell → Annotation tools: renders editor stage (evidence: `app/src/App.svelte`)
- Annotation tools → Annotation geometry: uses geometry (evidence: `app/src/AnnotateStage.svelte`)
- Guide author → .steps guide: saves guide (evidence: `README.md`)
- Steps storage → Guide model: uses data model (evidence: `core/store/src/lib.rs`)
- Steps storage → .steps guide: reads and writes
- Editor shell → Export engine: exports guide (evidence: `README.md`)
- Export engine → PDF renderer: renders PDF (evidence: `core/export/src/lib.rs`)
- steps-cli → Steps storage: opens guides
- steps-cli → Export engine: exports formats (evidence: `README.md`)
- Guide author → steps-cli: runs scripts (evidence: `README.md`)
