# volkanto/rook-lite architecture

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

- Interactive diagram: https://gitdiagram.com/volkanto/rook-lite
- Repository: https://github.com/volkanto/rook-lite

## Overview

Rook Lite is a browser-only, local-first daily notes and summaries app. The main workflow is navigating dated notes, editing and organizing them, then searching or generating period summaries; data persists in IndexedDB, with backup and export available. The graph includes the documented Ollama option and command-palette capabilities. Relationships use the supplied excerpts or README; unsampled route internals are represented by the main application node rather than inferred call chains.

Main entry points: [`src/main.ts`](https://github.com/volkanto/rook-lite/blob/main/src/main.ts) (App shell and views), [`src/command-palette/commandPalette.ts`](https://github.com/volkanto/rook-lite/blob/main/src/command-palette/commandPalette.ts) (Command palette), [`src/summaries.ts`](https://github.com/volkanto/rook-lite/blob/main/src/summaries.ts) (Summary engines), [`src/services.ts`](https://github.com/volkanto/rook-lite/blob/main/src/services.ts) (Note and category services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Application experience"]
  node_app["App shell and views<br/>[main.ts]"]
  node_router["Client router<br/>[routing.ts]"]
  node_palette["Command palette<br/>[commandPalette.ts]"]
  node_registry["Command registry<br/>[commandRegistry.ts]"]
  node_palette_search["Palette search<br/>[commandSearch.ts]"]
  node_search_parser["Search parser<br/>[searchParser.ts]"]
  node_history["Command history<br/>[commandHistory.ts]"]
  node_autocomplete["Tag autocomplete"]
end

subgraph group_notes["Notes and storage"]
  node_note_service["Note and category services<br/>[services.ts]"]
  node_markdown["Markdown processing<br/>[markdown.ts]"]
  node_database[("IndexedDB repositories<br/>[db.ts]")]
  node_models["Domain models<br/>[models.ts]"]
end

subgraph group_summaries["Summaries"]
  node_summary_service["Summary engines<br/>[summaries.ts]"]
end

subgraph group_support["Portability and language"]
  node_data_tools["Backup and exports<br/>[data.ts]"]
  node_localization["Localization<br/>[i18n.ts]"]
end

node_user(("User"))
node_ollama["Local Ollama"]
node_indexeddb[("Browser IndexedDB")]

node_user -->|"uses"| node_app
node_app -->|"routes via"| node_router
node_app -->|"opens"| node_palette
node_palette -->|"builds from"| node_registry
node_palette -->|"searches with"| node_palette_search
node_palette -->|"parses filters"| node_search_parser
node_palette -->|"reads history"| node_history
node_palette_search -->|"parses queries"| node_search_parser
node_palette_search -->|"normalizes with"| node_note_service
node_app -->|"uses"| node_note_service
node_app -->|"invokes exports"| node_data_tools
node_app -->|"reads strings"| node_localization
node_app -->|"escapes errors"| node_markdown
node_app -->|"uses"| node_autocomplete
node_note_service -->|"persists notes"| node_database
node_note_service -->|"derives note text"| node_markdown
node_database -->|"stores records"| node_indexeddb
node_data_tools -->|"snapshots data"| node_database
node_data_tools -->|"uses prompt"| node_summary_service
node_summary_service -->|"stores summaries"| node_database
node_summary_service -->|"extracts text"| node_markdown
node_summary_service -->|"reads locale"| node_localization
node_summary_service -->|"requests summaries"| node_ollama

click node_app "https://github.com/volkanto/rook-lite/blob/main/src/main.ts"
click node_router "https://github.com/volkanto/rook-lite/blob/main/src/routing.ts"
click node_palette "https://github.com/volkanto/rook-lite/blob/main/src/command-palette/commandPalette.ts"
click node_registry "https://github.com/volkanto/rook-lite/blob/main/src/command-palette/commandRegistry.ts"
click node_palette_search "https://github.com/volkanto/rook-lite/blob/main/src/command-palette/commandSearch.ts"
click node_search_parser "https://github.com/volkanto/rook-lite/blob/main/src/command-palette/searchParser.ts"
click node_history "https://github.com/volkanto/rook-lite/blob/main/src/command-palette/commandHistory.ts"
click node_autocomplete "https://github.com/volkanto/rook-lite/blob/main/src/tag-autocomplete.ts"
click node_note_service "https://github.com/volkanto/rook-lite/blob/main/src/services.ts"
click node_markdown "https://github.com/volkanto/rook-lite/blob/main/src/markdown.ts"
click node_database "https://github.com/volkanto/rook-lite/blob/main/src/db.ts"
click node_models "https://github.com/volkanto/rook-lite/blob/main/src/models.ts"
click node_summary_service "https://github.com/volkanto/rook-lite/blob/main/src/summaries.ts"
click node_data_tools "https://github.com/volkanto/rook-lite/blob/main/src/data.ts"
click node_localization "https://github.com/volkanto/rook-lite/blob/main/src/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_app,node_router,node_palette,node_registry,node_palette_search,node_search_parser,node_history,node_autocomplete,node_user toneBlue
class node_note_service,node_markdown,node_database,node_models,node_indexeddb toneAmber
class node_summary_service toneMint
class node_data_tools,node_localization toneRose
class node_ollama toneIndigo
```

## Components

### Application experience

- [App shell and views](https://github.com/volkanto/rook-lite/blob/main/src/main.ts): `src/main.ts`
- [Client router](https://github.com/volkanto/rook-lite/blob/main/src/routing.ts): `src/routing.ts`
- [Command palette](https://github.com/volkanto/rook-lite/blob/main/src/command-palette/commandPalette.ts): `src/command-palette/commandPalette.ts`
- [Command registry](https://github.com/volkanto/rook-lite/blob/main/src/command-palette/commandRegistry.ts): `src/command-palette/commandRegistry.ts`
- [Palette search](https://github.com/volkanto/rook-lite/blob/main/src/command-palette/commandSearch.ts): `src/command-palette/commandSearch.ts`
- [Search parser](https://github.com/volkanto/rook-lite/blob/main/src/command-palette/searchParser.ts): `src/command-palette/searchParser.ts`
- [Command history](https://github.com/volkanto/rook-lite/blob/main/src/command-palette/commandHistory.ts): `src/command-palette/commandHistory.ts`
- [Tag autocomplete](https://github.com/volkanto/rook-lite/blob/main/src/tag-autocomplete.ts): `src/tag-autocomplete.ts`

### Notes and storage

- [Note and category services](https://github.com/volkanto/rook-lite/blob/main/src/services.ts): `src/services.ts`
- [Markdown processing](https://github.com/volkanto/rook-lite/blob/main/src/markdown.ts): `src/markdown.ts`
- [IndexedDB repositories](https://github.com/volkanto/rook-lite/blob/main/src/db.ts): `src/db.ts`
- [Domain models](https://github.com/volkanto/rook-lite/blob/main/src/models.ts): `src/models.ts`

### Summaries

- [Summary engines](https://github.com/volkanto/rook-lite/blob/main/src/summaries.ts): `src/summaries.ts`

### Portability and language

- [Backup and exports](https://github.com/volkanto/rook-lite/blob/main/src/data.ts): `src/data.ts`
- [Localization](https://github.com/volkanto/rook-lite/blob/main/src/i18n.ts): `src/i18n.ts`

### Other components

- **User**
- **Local Ollama**
- **Browser IndexedDB**

## Connections

- User → App shell and views: uses (evidence: `README.md`)
- App shell and views → Client router: routes via (evidence: `src/main.ts`)
- App shell and views → Command palette: opens (evidence: `src/main.ts`)
- Command palette → Command registry: builds from (evidence: `src/command-palette/commandPalette.ts`)
- Command palette → Palette search: searches with (evidence: `src/command-palette/commandPalette.ts`)
- Command palette → Search parser: parses filters (evidence: `src/command-palette/commandPalette.ts`)
- Command palette → Command history: reads history (evidence: `src/command-palette/commandPalette.ts`)
- Palette search → Search parser: parses queries (evidence: `src/command-palette/commandSearch.ts`)
- Palette search → Note and category services: normalizes with (evidence: `src/command-palette/commandSearch.ts`)
- App shell and views → Note and category services: uses (evidence: `src/main.ts`)
- App shell and views → Backup and exports: invokes exports (evidence: `src/main.ts`)
- App shell and views → Localization: reads strings (evidence: `src/main.ts`)
- App shell and views → Markdown processing: escapes errors (evidence: `src/main.ts`)
- App shell and views → Tag autocomplete: uses (evidence: `src/main.ts`)
- Note and category services → IndexedDB repositories: persists notes (evidence: `src/services.ts`)
- Note and category services → Markdown processing: derives note text (evidence: `src/services.ts`)
- IndexedDB repositories → Browser IndexedDB: stores records (evidence: `README.md`)
- Backup and exports → IndexedDB repositories: snapshots data (evidence: `src/data.ts`)
- Backup and exports → Summary engines: uses prompt (evidence: `src/data.ts`)
- Summary engines → IndexedDB repositories: stores summaries (evidence: `src/summaries.ts`)
- Summary engines → Markdown processing: extracts text (evidence: `src/summaries.ts`)
- Summary engines → Localization: reads locale (evidence: `src/summaries.ts`)
- Summary engines → Local Ollama: requests summaries (evidence: `src/summaries.ts`)
