# ztygod/tynote architecture

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

- Interactive diagram: https://gitdiagram.com/ztygod/tynote
- Repository: https://github.com/ztygod/tynote

## Overview

Tynote is a Tauri/React desktop note-taking app. Its visible workflow is navigating to a feature, then managing notes, starred items, quick links, todos, or search results through page components and shared state. The README documents broader capabilities such as AI chat and inbox capture; sampled code shows search’s ask mode but not a live AI service, and the inbox page is a stub. Edges reflect explicit README statements or source-index references; unsampled implementation details are not inferred.

Main entry points: [`src/router/index.ts`](https://github.com/ztygod/tynote/blob/main/src/router/index.ts) (Route map), [`src/components/search/search-dialog.tsx`](https://github.com/ztygod/tynote/blob/main/src/components/search/search-dialog.tsx) (Global search dialog), [`src/pages/starred/index.tsx`](https://github.com/ztygod/tynote/blob/main/src/pages/starred/index.tsx) (Starred notes), [`src/main.tsx`](https://github.com/ztygod/tynote/blob/main/src/main.tsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["React entry<br/>[main.tsx]"]
  node_router["Route map<br/>[index.ts]"]
  node_layout["App layout<br/>[app-layout.tsx]"]
end

subgraph group_notes["Notes and links"]
  node_home["Home page<br/>[index.tsx]"]
  node_quicklinks["Quick links manager"]
  node_quicklink_state["Quick-link state"]
  node_quicklink_repo["Quick-link repository<br/>[repository.ts]"]
  node_starred["Starred notes<br/>[index.tsx]"]
  node_starred_state["Starred state<br/>[starred-store.ts]"]
  node_starred_prefs["Filter presets"]
end

subgraph group_productivity["Productivity views"]
  node_dashboard["Dashboard<br/>[index.tsx]"]
  node_todo["Todo workspace<br/>[index.tsx]"]
  node_todo_views["Todo views<br/>[table.tsx]"]
  node_inbox["Inbox capture<br/>[index.tsx]"]
end

subgraph group_search["Search and discovery"]
  node_search_dialog["Global search dialog<br/>[search-dialog.tsx]"]
  node_search_filters["Search filters<br/>[search-filters.tsx]"]
  node_search_results["Search results<br/>[search-results.tsx]"]
  node_search_state["Search state<br/>[search-store.ts]"]
end

subgraph group_runtime["State and presentation"]
  node_ui_primitives["UI primitives"]
  node_page_theme["Page themes<br/>[page-theme.ts]"]
  node_local_storage[("Browser storage<br/>[storage.ts]")]
end

node_user(("Desktop user"))
node_ai_assistant{{"AI assistant"}}

node_user -->|"opens app"| node_entry
node_entry -->|"loads routes"| node_router
node_router -->|"renders shell"| node_layout
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_todo
node_router -->|"routes to"| node_starred
node_router -->|"routes to"| node_inbox
node_entry -->|"mounts search"| node_search_dialog
node_home -.->|"offers management"| node_quicklinks
node_quicklinks -->|"updates state"| node_quicklink_state
node_quicklink_state -->|"uses repository"| node_quicklink_repo
node_quicklink_repo -->|"persists links"| node_local_storage
node_starred -->|"loads items"| node_starred_state
node_starred -->|"loads presets"| node_starred_prefs
node_starred_state -->|"persists items"| node_local_storage
node_starred_prefs -->|"persists presets"| node_local_storage
node_todo -->|"renders views"| node_todo_views
node_search_dialog -->|"reads and updates"| node_search_state
node_search_dialog -->|"renders filters"| node_search_filters
node_search_dialog -->|"renders results"| node_search_results
node_search_dialog -.->|"offers ask mode"| node_ai_assistant
node_search_dialog -->|"uses controls"| node_ui_primitives
node_search_filters -->|"updates filters"| node_search_state
node_search_results -->|"reads results"| node_search_state
node_dashboard -->|"uses theme"| node_page_theme
node_starred -->|"uses theme"| node_page_theme
node_todo -->|"uses controls"| node_ui_primitives

click node_entry "https://github.com/ztygod/tynote/blob/main/src/main.tsx"
click node_router "https://github.com/ztygod/tynote/blob/main/src/router/index.ts"
click node_layout "https://github.com/ztygod/tynote/blob/main/src/components/layout/app-layout.tsx"
click node_home "https://github.com/ztygod/tynote/blob/main/src/pages/home/index.tsx"
click node_quicklinks "https://github.com/ztygod/tynote/blob/main/src/pages/home/components/quicklinks-manager.tsx"
click node_quicklink_state "https://github.com/ztygod/tynote/blob/main/src/store/quicklinks-store.ts"
click node_quicklink_repo "https://github.com/ztygod/tynote/blob/main/src/features/quicklinks/model/repository.ts"
click node_starred "https://github.com/ztygod/tynote/blob/main/src/pages/starred/index.tsx"
click node_starred_state "https://github.com/ztygod/tynote/blob/main/src/store/starred-store.ts"
click node_starred_prefs "https://github.com/ztygod/tynote/blob/main/src/store/starred-preference-store.ts"
click node_dashboard "https://github.com/ztygod/tynote/blob/main/src/pages/dashboard/index.tsx"
click node_todo "https://github.com/ztygod/tynote/blob/main/src/pages/todo/index.tsx"
click node_todo_views "https://github.com/ztygod/tynote/blob/main/src/pages/todo/components/table.tsx"
click node_inbox "https://github.com/ztygod/tynote/blob/main/src/pages/inbox/index.tsx"
click node_search_dialog "https://github.com/ztygod/tynote/blob/main/src/components/search/search-dialog.tsx"
click node_search_filters "https://github.com/ztygod/tynote/blob/main/src/components/search/search-filters.tsx"
click node_search_results "https://github.com/ztygod/tynote/blob/main/src/components/search/search-results.tsx"
click node_search_state "https://github.com/ztygod/tynote/blob/main/src/store/search-store.ts"
click node_ui_primitives "https://github.com/ztygod/tynote/tree/main/src/components/ui"
click node_page_theme "https://github.com/ztygod/tynote/blob/main/src/lib/page-theme.ts"
click node_local_storage "https://github.com/ztygod/tynote/blob/main/src/utils/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_entry,node_router,node_layout,node_user toneBlue
class node_home,node_quicklinks,node_quicklink_state,node_quicklink_repo,node_starred,node_starred_state,node_starred_prefs toneAmber
class node_dashboard,node_todo,node_todo_views,node_inbox toneMint
class node_search_dialog,node_search_filters,node_search_results,node_search_state toneRose
class node_ui_primitives,node_page_theme,node_local_storage,node_ai_assistant toneIndigo
```

## Components

### Application shell

- [React entry](https://github.com/ztygod/tynote/blob/main/src/main.tsx): `src/main.tsx`
- [Route map](https://github.com/ztygod/tynote/blob/main/src/router/index.ts): `src/router/index.ts`
- [App layout](https://github.com/ztygod/tynote/blob/main/src/components/layout/app-layout.tsx): `src/components/layout/app-layout.tsx`

### Notes and links

- [Home page](https://github.com/ztygod/tynote/blob/main/src/pages/home/index.tsx): `src/pages/home/index.tsx`
- [Quick links manager](https://github.com/ztygod/tynote/blob/main/src/pages/home/components/quicklinks-manager.tsx): `src/pages/home/components/quicklinks-manager.tsx`
- [Quick-link state](https://github.com/ztygod/tynote/blob/main/src/store/quicklinks-store.ts): `src/store/quicklinks-store.ts`
- [Quick-link repository](https://github.com/ztygod/tynote/blob/main/src/features/quicklinks/model/repository.ts): `src/features/quicklinks/model/repository.ts`
- [Starred notes](https://github.com/ztygod/tynote/blob/main/src/pages/starred/index.tsx): `src/pages/starred/index.tsx`
- [Starred state](https://github.com/ztygod/tynote/blob/main/src/store/starred-store.ts): `src/store/starred-store.ts`
- [Filter presets](https://github.com/ztygod/tynote/blob/main/src/store/starred-preference-store.ts): `src/store/starred-preference-store.ts`

### Productivity views

- [Dashboard](https://github.com/ztygod/tynote/blob/main/src/pages/dashboard/index.tsx): `src/pages/dashboard/index.tsx`
- [Todo workspace](https://github.com/ztygod/tynote/blob/main/src/pages/todo/index.tsx): `src/pages/todo/index.tsx`
- [Todo views](https://github.com/ztygod/tynote/blob/main/src/pages/todo/components/table.tsx): `src/pages/todo/components/table.tsx`
- [Inbox capture](https://github.com/ztygod/tynote/blob/main/src/pages/inbox/index.tsx): `src/pages/inbox/index.tsx`

### Search and discovery

- [Global search dialog](https://github.com/ztygod/tynote/blob/main/src/components/search/search-dialog.tsx): `src/components/search/search-dialog.tsx`
- [Search filters](https://github.com/ztygod/tynote/blob/main/src/components/search/search-filters.tsx): `src/components/search/search-filters.tsx`
- [Search results](https://github.com/ztygod/tynote/blob/main/src/components/search/search-results.tsx): `src/components/search/search-results.tsx`
- [Search state](https://github.com/ztygod/tynote/blob/main/src/store/search-store.ts): `src/store/search-store.ts`

### State and presentation

- [UI primitives](https://github.com/ztygod/tynote/tree/main/src/components/ui): `src/components/ui`
- [Page themes](https://github.com/ztygod/tynote/blob/main/src/lib/page-theme.ts): `src/lib/page-theme.ts`
- [Browser storage](https://github.com/ztygod/tynote/blob/main/src/utils/storage.ts): `src/utils/storage.ts`

### Other components

- **Desktop user**
- **AI assistant**

## Connections

- Desktop user → React entry: opens app (evidence: `README.md`)
- React entry → Route map: loads routes (evidence: `src/main.tsx`)
- Route map → App layout: renders shell (evidence: `src/router/index.ts`)
- Route map → Home page: routes to (evidence: `src/router/index.ts`)
- Route map → Dashboard: routes to (evidence: `src/router/index.ts`)
- Route map → Todo workspace: routes to (evidence: `src/router/index.ts`)
- Route map → Starred notes: routes to (evidence: `src/router/index.ts`)
- Route map → Inbox capture: routes to (evidence: `src/router/index.ts`)
- React entry → Global search dialog: mounts search (evidence: `src/main.tsx`)
- Home page → Quick links manager: offers management
- Quick links manager → Quick-link state: updates state (evidence: `src/pages/home/components/quicklinks-manager.tsx`)
- Quick-link state → Quick-link repository: uses repository (evidence: `src/store/quicklinks-store.ts`)
- Quick-link repository → Browser storage: persists links (evidence: `src/features/quicklinks/model/repository.ts`)
- Starred notes → Starred state: loads items (evidence: `src/pages/starred/index.tsx`)
- Starred notes → Filter presets: loads presets (evidence: `src/pages/starred/index.tsx`)
- Starred state → Browser storage: persists items (evidence: `src/store/starred-store.ts`)
- Filter presets → Browser storage: persists presets (evidence: `src/store/starred-preference-store.ts`)
- Todo workspace → Todo views: renders views (evidence: `src/pages/todo/index.tsx`)
- Global search dialog → Search state: reads and updates (evidence: `src/components/search/search-dialog.tsx`)
- Global search dialog → Search filters: renders filters (evidence: `src/components/search/search-dialog.tsx`)
- Global search dialog → Search results: renders results (evidence: `src/components/search/search-dialog.tsx`)
- Global search dialog → AI assistant: offers ask mode (evidence: `README.md`)
- Global search dialog → UI primitives: uses controls (evidence: `src/components/search/search-dialog.tsx`)
- Search filters → Search state: updates filters (evidence: `src/components/search/search-filters.tsx`)
- Search results → Search state: reads results (evidence: `src/components/search/search-results.tsx`)
- Dashboard → Page themes: uses theme (evidence: `src/pages/dashboard/index.tsx`)
- Starred notes → Page themes: uses theme (evidence: `src/pages/starred/index.tsx`)
- Todo workspace → UI primitives: uses controls (evidence: `src/pages/todo/index.tsx`)
