# leonardossm/aurora-board architecture

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

- Interactive diagram: https://gitdiagram.com/leonardossm/aurora-board
- Repository: https://github.com/leonardossm/aurora-board

## Overview

Aurora Board is a browser-based infinite whiteboard where users create and connect visual elements and functional widgets, then save, export, or share workspaces through local files. The principal workflow runs from editor controls and canvas gestures through editor actions and shared state into the board model; widgets can consume typed connections, while persistence saves changes locally. The README documents broader capabilities such as import/migration, image export, and isolated plugins. Some subsystem links below reflect README documentation because their implementation files were not sampled.

Main entry points: [`src/store/actions.ts`](https://github.com/leonardossm/aurora-board/blob/main/src/store/actions.ts) (Editor actions), [`src/App.tsx`](https://github.com/leonardossm/aurora-board/blob/main/src/App.tsx) (Application shell), [`src/canvas/Canvas.tsx`](https://github.com/leonardossm/aurora-board/blob/main/src/canvas/Canvas.tsx) (Canvas view), [`src/canvas/controller.ts`](https://github.com/leonardossm/aurora-board/blob/main/src/canvas/controller.ts) (Gesture controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Editor shell"]
  node_app["Application shell<br/>[App.tsx]"]
  node_controls["Editor controls<br/>[Toolbar.tsx]"]
end

subgraph group_canvas["Canvas interaction"]
  node_canvasview["Canvas view<br/>[Canvas.tsx]"]
  node_gestures["Gesture controller<br/>[controller.ts]"]
  node_elementview["Element rendering<br/>[ElementView.tsx]"]
end

subgraph group_model["Board model"]
  node_actions["Editor actions<br/>[actions.ts]"]
  node_state["Editor state<br/>[editor.ts]"]
  node_schema["Board schema<br/>[schema.ts]"]
  node_geometry["Geometry and bindings<br/>[bindings.ts]"]
  node_dataflow["Typed dataflow<br/>[dataflow.ts]"]
end

subgraph group_widgets["Widgets and integrations"]
  node_widgetframe["Widget frame<br/>[WidgetFrame.tsx]"]
  node_registry["Widget registry<br/>[registry.ts]"]
  node_builtin["Built-in widgets"]
  node_ai["AI assistant<br/>[ai.tsx]"]
  node_aiclient["AI client<br/>[aiClient.ts]"]
  node_localserver["Local integrations server<br/>[index.ts]"]
end

subgraph group_data["Persistence and export"]
  node_autosave["Autosave and recovery<br/>[autosave.ts]"]
  node_indexeddb[("IndexedDB storage<br/>[indexeddb.ts]")]
  node_importexport["Import and migration<br/>[exportImport.ts]"]
  node_imageexport["Image export<br/>[exportImage.ts]"]
end

node_user(("Board editor"))
node_externalai(("AI providers"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_canvasview
node_app -->|"renders"| node_controls
node_controls -->|"dispatches"| node_actions
node_canvasview -->|"routes gestures"| node_gestures
node_canvasview -->|"renders elements"| node_elementview
node_gestures -->|"commits edits"| node_actions
node_gestures -->|"resolves bindings"| node_geometry
node_actions -->|"updates"| node_state
node_actions -->|"uses element types"| node_schema
node_actions -->|"persists changes"| node_autosave
node_widgetframe -->|"evaluates connections"| node_dataflow
node_widgetframe -->|"looks up widgets"| node_registry
node_builtin -->|"registers widgets"| node_registry
node_ai -->|"requests responses"| node_aiclient
node_aiclient -.->|"calls local API"| node_localserver
node_localserver -->|"dispatches provider calls"| node_externalai
node_autosave -->|"writes board data"| node_indexeddb
node_user -->|"imports JSON"| node_importexport
node_importexport -->|"validates and migrates"| node_schema
node_user -->|"exports images"| node_imageexport
node_imageexport -->|"renders widget content"| node_registry

click node_app "https://github.com/leonardossm/aurora-board/blob/main/src/App.tsx"
click node_controls "https://github.com/leonardossm/aurora-board/blob/main/src/ui/Toolbar.tsx"
click node_canvasview "https://github.com/leonardossm/aurora-board/blob/main/src/canvas/Canvas.tsx"
click node_gestures "https://github.com/leonardossm/aurora-board/blob/main/src/canvas/controller.ts"
click node_elementview "https://github.com/leonardossm/aurora-board/blob/main/src/canvas/ElementView.tsx"
click node_actions "https://github.com/leonardossm/aurora-board/blob/main/src/store/actions.ts"
click node_state "https://github.com/leonardossm/aurora-board/blob/main/src/store/editor.ts"
click node_schema "https://github.com/leonardossm/aurora-board/blob/main/src/core/schema.ts"
click node_geometry "https://github.com/leonardossm/aurora-board/blob/main/src/core/bindings.ts"
click node_dataflow "https://github.com/leonardossm/aurora-board/blob/main/src/core/dataflow.ts"
click node_widgetframe "https://github.com/leonardossm/aurora-board/blob/main/src/widgets/WidgetFrame.tsx"
click node_registry "https://github.com/leonardossm/aurora-board/blob/main/src/widgets/registry.ts"
click node_builtin "https://github.com/leonardossm/aurora-board/tree/main/src/widgets/builtin"
click node_ai "https://github.com/leonardossm/aurora-board/blob/main/src/widgets/builtin/ai.tsx"
click node_aiclient "https://github.com/leonardossm/aurora-board/blob/main/src/integrations/aiClient.ts"
click node_localserver "https://github.com/leonardossm/aurora-board/blob/main/server/index.ts"
click node_autosave "https://github.com/leonardossm/aurora-board/blob/main/src/persistence/autosave.ts"
click node_indexeddb "https://github.com/leonardossm/aurora-board/blob/main/src/persistence/indexeddb.ts"
click node_importexport "https://github.com/leonardossm/aurora-board/blob/main/src/persistence/exportImport.ts"
click node_imageexport "https://github.com/leonardossm/aurora-board/blob/main/src/render/exportImage.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_controls toneBlue
class node_canvasview,node_gestures,node_elementview toneAmber
class node_actions,node_state,node_schema,node_geometry,node_dataflow toneMint
class node_widgetframe,node_registry,node_builtin,node_ai,node_aiclient,node_localserver toneRose
class node_autosave,node_indexeddb,node_importexport,node_imageexport,node_user,node_externalai toneIndigo
```

## Components

### Editor shell

- [Application shell](https://github.com/leonardossm/aurora-board/blob/main/src/App.tsx): `src/App.tsx`
- [Editor controls](https://github.com/leonardossm/aurora-board/blob/main/src/ui/Toolbar.tsx): `src/ui/Toolbar.tsx`

### Canvas interaction

- [Canvas view](https://github.com/leonardossm/aurora-board/blob/main/src/canvas/Canvas.tsx): `src/canvas/Canvas.tsx`
- [Gesture controller](https://github.com/leonardossm/aurora-board/blob/main/src/canvas/controller.ts): `src/canvas/controller.ts`
- [Element rendering](https://github.com/leonardossm/aurora-board/blob/main/src/canvas/ElementView.tsx): `src/canvas/ElementView.tsx`

### Board model

- [Editor actions](https://github.com/leonardossm/aurora-board/blob/main/src/store/actions.ts): `src/store/actions.ts`
- [Editor state](https://github.com/leonardossm/aurora-board/blob/main/src/store/editor.ts): `src/store/editor.ts`
- [Board schema](https://github.com/leonardossm/aurora-board/blob/main/src/core/schema.ts): `src/core/schema.ts`
- [Geometry and bindings](https://github.com/leonardossm/aurora-board/blob/main/src/core/bindings.ts): `src/core/bindings.ts`
- [Typed dataflow](https://github.com/leonardossm/aurora-board/blob/main/src/core/dataflow.ts): `src/core/dataflow.ts`

### Widgets and integrations

- [Widget frame](https://github.com/leonardossm/aurora-board/blob/main/src/widgets/WidgetFrame.tsx): `src/widgets/WidgetFrame.tsx`
- [Widget registry](https://github.com/leonardossm/aurora-board/blob/main/src/widgets/registry.ts): `src/widgets/registry.ts`
- [Built-in widgets](https://github.com/leonardossm/aurora-board/tree/main/src/widgets/builtin): `src/widgets/builtin`
- [AI assistant](https://github.com/leonardossm/aurora-board/blob/main/src/widgets/builtin/ai.tsx): `src/widgets/builtin/ai.tsx`
- [AI client](https://github.com/leonardossm/aurora-board/blob/main/src/integrations/aiClient.ts): `src/integrations/aiClient.ts`
- [Local integrations server](https://github.com/leonardossm/aurora-board/blob/main/server/index.ts): `server/index.ts`

### Persistence and export

- [Autosave and recovery](https://github.com/leonardossm/aurora-board/blob/main/src/persistence/autosave.ts): `src/persistence/autosave.ts`
- [IndexedDB storage](https://github.com/leonardossm/aurora-board/blob/main/src/persistence/indexeddb.ts): `src/persistence/indexeddb.ts`
- [Import and migration](https://github.com/leonardossm/aurora-board/blob/main/src/persistence/exportImport.ts): `src/persistence/exportImport.ts`
- [Image export](https://github.com/leonardossm/aurora-board/blob/main/src/render/exportImage.ts): `src/render/exportImage.ts`

### Other components

- **Board editor**
- **AI providers**

## Connections

- Board editor → Application shell: uses (evidence: `src/App.tsx`)
- Application shell → Canvas view: renders (evidence: `src/App.tsx`)
- Application shell → Editor controls: renders (evidence: `src/App.tsx`)
- Editor controls → Editor actions: dispatches (evidence: `src/ui/Toolbar.tsx`)
- Canvas view → Gesture controller: routes gestures (evidence: `src/canvas/Canvas.tsx`)
- Canvas view → Element rendering: renders elements (evidence: `src/canvas/Canvas.tsx`)
- Gesture controller → Editor actions: commits edits (evidence: `src/canvas/controller.ts`)
- Gesture controller → Geometry and bindings: resolves bindings (evidence: `src/canvas/controller.ts`)
- Editor actions → Editor state: updates (evidence: `src/store/actions.ts`)
- Editor actions → Board schema: uses element types (evidence: `src/store/actions.ts`)
- Editor actions → Autosave and recovery: persists changes (evidence: `src/store/actions.ts`)
- Widget frame → Typed dataflow: evaluates connections (evidence: `src/widgets/WidgetFrame.tsx`)
- Widget frame → Widget registry: looks up widgets (evidence: `src/widgets/WidgetFrame.tsx`)
- Built-in widgets → Widget registry: registers widgets (evidence: `README.md`)
- AI assistant → AI client: requests responses (evidence: `src/widgets/builtin/ai.tsx`)
- AI client → Local integrations server: calls local API (evidence: `README.md`)
- Local integrations server → AI providers: dispatches provider calls (evidence: `server/index.ts`)
- Autosave and recovery → IndexedDB storage: writes board data (evidence: `src/persistence/autosave.ts`)
- Board editor → Import and migration: imports JSON (evidence: `README.md`)
- Import and migration → Board schema: validates and migrates (evidence: `README.md`)
- Board editor → Image export: exports images (evidence: `README.md`)
- Image export → Widget registry: renders widget content (evidence: `src/render/exportImage.ts`)
