# abdulla-aldosari/mindstream architecture

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

- Interactive diagram: https://gitdiagram.com/abdulla-aldosari/mindstream
- Repository: https://github.com/abdulla-aldosari/mindstream

## Overview

MindStream is a VS Code sidebar extension for capturing and organizing notes and ideas. Users create or edit a note in the webview, choose its type and category, and manage status, priority, tasks, archiving, and code links; the host validates and persists the result in workspace JSON. The product also supports custom types and categories, filtering and sorting, import/export, weekly reports, and a work-pause note. The graph follows documented behavior and indexed module references; some subsystem details were not sampled.

Main entry points: [`src/sidebarController.ts`](https://github.com/abdulla-aldosari/mindstream/blob/main/src/sidebarController.ts) (Message controller), [`src/extension.ts`](https://github.com/abdulla-aldosari/mindstream/blob/main/src/extension.ts) (Extension setup), [`media/sidebar/main.js`](https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/main.js) (Sidebar app), [`src/storage.ts`](https://github.com/abdulla-aldosari/mindstream/blob/main/src/storage.ts) (Workspace JSON storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Extension host"]
  node_extension["Extension setup<br/>[extension.ts]"]
  node_provider["Sidebar provider<br/>[sidebarProvider.ts]"]
  node_controller["Message controller"]
end

subgraph group_webview["Sidebar interface"]
  node_webview["Sidebar app<br/>[main.js]"]
  node_editor["Note editor<br/>[noteEditor.js]"]
  node_list["Note list<br/>[list.js]"]
  node_taskui["Task editor<br/>[taskEditor.js]"]
  node_pauseui["Pause panel<br/>[workPausePanel.js]"]
end

subgraph group_domain["Notes and organization"]
  node_items["Note operations<br/>[itemsStore.ts]"]
  node_models["Note data model<br/>[models.ts]"]
  node_storage[("Workspace JSON storage<br/>[storage.ts]")]
  node_types["Type registry<br/>[typesRegistry.ts]"]
  node_categories["Category registry"]
  node_tasks["Task validation<br/>[tasks.ts]"]
  node_priority["Priority rules<br/>[priority.ts]"]
end

subgraph group_features["Product features"]
  node_links["Code link tracking<br/>[linkTracker.ts]"]
  node_linkresolve["Link resolution<br/>[linkResolver.ts]"]
  node_export["Import and export<br/>[export.ts]"]
  node_report["Weekly reports<br/>[report.ts]"]
  node_pause["Work pause<br/>[workPauseStore.ts]"]
end

node_user(("VS Code user"))

node_user -->|"uses sidebar"| node_webview
node_extension -->|"sets up"| node_provider
node_provider -->|"routes messages"| node_controller
node_webview -->|"exchanges state"| node_provider
node_webview -->|"opens editor"| node_editor
node_webview -->|"initializes list"| node_list
node_editor -->|"uses task editor"| node_taskui
node_controller -->|"handles note actions"| node_items
node_controller -->|"validates type"| node_types
node_controller -->|"validates category"| node_categories
node_controller -->|"checks pause state"| node_pause
node_items -->|"reads and saves"| node_storage
node_storage -->|"parses data"| node_models
node_storage -->|"validates priority"| node_priority
node_storage -->|"sanitizes links"| node_linkresolve
node_items -->|"uses item types"| node_models
node_controller -.->|"sanitizes tasks"| node_tasks
node_extension -->|"initializes tracking"| node_links
node_links -->|"tracks note links"| node_items
node_links -->|"resolves locations"| node_linkresolve
node_extension -.->|"registers commands"| node_export
node_extension -->|"registers reports"| node_report
node_controller -.->|"serves report actions"| node_report
node_extension -->|"sets up pause"| node_pause
node_webview -->|"initializes panel"| node_pauseui
node_controller -->|"handles pause messages"| node_pause

click node_extension "https://github.com/abdulla-aldosari/mindstream/blob/main/src/extension.ts"
click node_provider "https://github.com/abdulla-aldosari/mindstream/blob/main/src/sidebarProvider.ts"
click node_controller "https://github.com/abdulla-aldosari/mindstream/blob/main/src/sidebarController.ts"
click node_webview "https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/main.js"
click node_editor "https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/noteEditor.js"
click node_list "https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/list.js"
click node_taskui "https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/taskEditor.js"
click node_items "https://github.com/abdulla-aldosari/mindstream/blob/main/src/itemsStore.ts"
click node_models "https://github.com/abdulla-aldosari/mindstream/blob/main/src/models.ts"
click node_storage "https://github.com/abdulla-aldosari/mindstream/blob/main/src/storage.ts"
click node_types "https://github.com/abdulla-aldosari/mindstream/blob/main/src/typesRegistry.ts"
click node_categories "https://github.com/abdulla-aldosari/mindstream/blob/main/src/categoriesRegistry.ts"
click node_tasks "https://github.com/abdulla-aldosari/mindstream/blob/main/src/tasks.ts"
click node_priority "https://github.com/abdulla-aldosari/mindstream/blob/main/src/priority.ts"
click node_links "https://github.com/abdulla-aldosari/mindstream/blob/main/src/linkTracker.ts"
click node_linkresolve "https://github.com/abdulla-aldosari/mindstream/blob/main/src/linkResolver.ts"
click node_export "https://github.com/abdulla-aldosari/mindstream/blob/main/src/export.ts"
click node_report "https://github.com/abdulla-aldosari/mindstream/blob/main/src/report.ts"
click node_pause "https://github.com/abdulla-aldosari/mindstream/blob/main/src/workPauseStore.ts"
click node_pauseui "https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/workPausePanel.js"

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_extension,node_provider,node_controller,node_user toneBlue
class node_webview,node_editor,node_list,node_taskui,node_pauseui toneAmber
class node_items,node_models,node_storage,node_types,node_categories,node_tasks,node_priority toneMint
class node_links,node_linkresolve,node_export,node_report,node_pause toneRose
```

## Components

### Extension host

- [Extension setup](https://github.com/abdulla-aldosari/mindstream/blob/main/src/extension.ts): `src/extension.ts`
- [Sidebar provider](https://github.com/abdulla-aldosari/mindstream/blob/main/src/sidebarProvider.ts): `src/sidebarProvider.ts`
- [Message controller](https://github.com/abdulla-aldosari/mindstream/blob/main/src/sidebarController.ts): `src/sidebarController.ts`

### Sidebar interface

- [Sidebar app](https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/main.js): `media/sidebar/main.js`
- [Note editor](https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/noteEditor.js): `media/sidebar/noteEditor.js`
- [Note list](https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/list.js): `media/sidebar/list.js`
- [Task editor](https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/taskEditor.js): `media/sidebar/taskEditor.js`
- [Pause panel](https://github.com/abdulla-aldosari/mindstream/blob/main/media/sidebar/workPausePanel.js): `media/sidebar/workPausePanel.js`

### Notes and organization

- [Note operations](https://github.com/abdulla-aldosari/mindstream/blob/main/src/itemsStore.ts): `src/itemsStore.ts`
- [Note data model](https://github.com/abdulla-aldosari/mindstream/blob/main/src/models.ts): `src/models.ts`
- [Workspace JSON storage](https://github.com/abdulla-aldosari/mindstream/blob/main/src/storage.ts): `src/storage.ts`
- [Type registry](https://github.com/abdulla-aldosari/mindstream/blob/main/src/typesRegistry.ts): `src/typesRegistry.ts`
- [Category registry](https://github.com/abdulla-aldosari/mindstream/blob/main/src/categoriesRegistry.ts): `src/categoriesRegistry.ts`
- [Task validation](https://github.com/abdulla-aldosari/mindstream/blob/main/src/tasks.ts): `src/tasks.ts`
- [Priority rules](https://github.com/abdulla-aldosari/mindstream/blob/main/src/priority.ts): `src/priority.ts`

### Product features

- [Code link tracking](https://github.com/abdulla-aldosari/mindstream/blob/main/src/linkTracker.ts): `src/linkTracker.ts`
- [Link resolution](https://github.com/abdulla-aldosari/mindstream/blob/main/src/linkResolver.ts): `src/linkResolver.ts`
- [Import and export](https://github.com/abdulla-aldosari/mindstream/blob/main/src/export.ts): `src/export.ts`
- [Weekly reports](https://github.com/abdulla-aldosari/mindstream/blob/main/src/report.ts): `src/report.ts`
- [Work pause](https://github.com/abdulla-aldosari/mindstream/blob/main/src/workPauseStore.ts): `src/workPauseStore.ts`

### Other components

- **VS Code user**

## Connections

- VS Code user → Sidebar app: uses sidebar
- Extension setup → Sidebar provider: sets up (evidence: `src/extension.ts`)
- Sidebar provider → Message controller: routes messages (evidence: `src/sidebarProvider.ts`)
- Sidebar app → Sidebar provider: exchanges state (evidence: `src/sidebarProvider.ts`)
- Sidebar app → Note editor: opens editor (evidence: `media/sidebar/main.js`)
- Sidebar app → Note list: initializes list (evidence: `media/sidebar/main.js`)
- Note editor → Task editor: uses task editor (evidence: `media/sidebar/noteEditor.js`)
- Message controller → Note operations: handles note actions (evidence: `src/sidebarController.ts`)
- Message controller → Type registry: validates type (evidence: `src/sidebarController.ts`)
- Message controller → Category registry: validates category (evidence: `src/sidebarController.ts`)
- Message controller → Work pause: checks pause state (evidence: `src/sidebarController.ts`)
- Note operations → Workspace JSON storage: reads and saves (evidence: `src/itemsStore.ts`)
- Workspace JSON storage → Note data model: parses data (evidence: `src/storage.ts`)
- Workspace JSON storage → Priority rules: validates priority (evidence: `src/storage.ts`)
- Workspace JSON storage → Link resolution: sanitizes links (evidence: `src/storage.ts`)
- Note operations → Note data model: uses item types (evidence: `src/itemsStore.ts`)
- Message controller → Task validation: sanitizes tasks (evidence: `src/sidebarController.ts`)
- Extension setup → Code link tracking: initializes tracking (evidence: `src/extension.ts`)
- Code link tracking → Note operations: tracks note links (evidence: `src/linkTracker.ts`)
- Code link tracking → Link resolution: resolves locations (evidence: `src/linkTracker.ts`)
- Extension setup → Import and export: registers commands
- Extension setup → Weekly reports: registers reports (evidence: `src/extension.ts`)
- Message controller → Weekly reports: serves report actions
- Extension setup → Work pause: sets up pause (evidence: `src/extension.ts`)
- Sidebar app → Pause panel: initializes panel (evidence: `media/sidebar/main.js`)
- Message controller → Work pause: handles pause messages (evidence: `src/sidebarController.ts`)
