# jigonzalez930209/egui-workbench architecture

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

- Interactive diagram: https://gitdiagram.com/jigonzalez930209/egui-workbench
- Repository: https://github.com/jigonzalez930209/egui-workbench

## Overview

egui-workbench is a reusable egui desktop workbench shell and UI library, not a complete editor or document renderer. An application composes its shell and components, receives UI events, and owns state and command handling. The library also offers charting and file viewing, with supporting data/query modules and optional runtime helpers. README-documented integrations extend the product to Python, agents, and sandboxed extensions. Some subsystem paths are supported by the tree and README rather than sampled implementation; edges are limited to documented relationships or indexed references.

Main entry points: [`templates/app/src/app.rs`](https://github.com/jigonzalez930209/egui-workbench/blob/main/templates/app/src/app.rs) (Starter app state), [`src/components`](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/components) (Reusable components), [`src/app`](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/app) (App runtime helpers), [`src/app/shell.rs`](https://github.com/jigonzalez930209/egui-workbench/blob/main/src/app/shell.rs) (Fixed workbench shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_app["Starter app state<br/>[app.rs]"]
  node_runtime_helpers["App runtime helpers"]
  node_commands["Command registry"]
  node_workbench_shell["Fixed workbench shell<br/>[shell.rs]"]
  node_devtools["DevTools"]
  node_journal["Command journal<br/>[journal.rs]"]
  node_layout["Workspace layout<br/>[layout.rs]"]
end

subgraph group_ui["Workbench UI"]
  node_chrome["Window and chrome"]
  node_components["Reusable components"]
  node_theme_global["Themes and global"]
end

subgraph group_content["Content components"]
  node_charts["Interactive plots"]
  node_plot_gpu["GPU plot rendering<br/>[gpu.rs]"]
  node_viewer["File viewer"]
  node_data_grid["Data grid<br/>[data_grid.rs]"]
end

subgraph group_data["Data services"]
  node_data_sources["Data sources"]
  node_data_column["Column data model<br/>[column.rs]"]
  node_query["Query parser and AST<br/>[parser.rs]"]
end

subgraph group_integrations["Bindings and extensions"]
  node_python["Python workbench<br/>[app.py]"]
  node_host["Declarative host<br/>[runtime.rs]"]
  node_agent["Agent and MCP"]
  node_extensions["WASM extensions<br/>[runtime.rs]"]
end

node_app_dev(("Application developer"))
node_user(("Workbench user"))

node_app_dev -->|"builds on"| node_app
node_app -->|"uses runtime"| node_runtime_helpers
node_app -->|"handles commands"| node_commands
node_app -->|"shows shell"| node_workbench_shell
node_workbench_shell -->|"frames content"| node_chrome
node_app -->|"composes UI"| node_components
node_user -->|"interacts with"| node_components
node_components -->|"returns events"| node_app
node_app -->|"sets theme"| node_theme_global
node_app -->|"records commands"| node_journal
node_app -->|"opens chart views"| node_charts
node_app -.->|"opens file views"| node_viewer
node_charts -.->|"renders with"| node_plot_gpu
node_viewer -.->|"reads files"| node_data_sources
node_data_grid -.->|"presents columns"| node_data_column
node_query -->|"uses values"| node_data_column
node_app_dev -->|"builds Python app"| node_python
node_python -.->|"uses native host"| node_host
node_app_dev -->|"enables agent control"| node_agent
node_app_dev -->|"loads extensions"| node_extensions
node_devtools -->|"shows journal"| node_journal
node_runtime_helpers -->|"provides layout"| node_layout

click node_app "https://github.com/jigonzalez930209/egui-workbench/blob/main/templates/app/src/app.rs"
click node_runtime_helpers "https://github.com/jigonzalez930209/egui-workbench/tree/main/src/app"
click node_commands "https://github.com/jigonzalez930209/egui-workbench/tree/main/src/commands"
click node_workbench_shell "https://github.com/jigonzalez930209/egui-workbench/blob/main/src/app/shell.rs"
click node_chrome "https://github.com/jigonzalez930209/egui-workbench/tree/main/src/chrome"
click node_components "https://github.com/jigonzalez930209/egui-workbench/tree/main/src/components"
click node_theme_global "https://github.com/jigonzalez930209/egui-workbench/tree/main/src/foundation"
click node_devtools "https://github.com/jigonzalez930209/egui-workbench/tree/main/src/app/devtools"
click node_journal "https://github.com/jigonzalez930209/egui-workbench/blob/main/src/app/journal.rs"
click node_layout "https://github.com/jigonzalez930209/egui-workbench/blob/main/src/app/layout.rs"
click node_charts "https://github.com/jigonzalez930209/egui-workbench/tree/main/src/components/plot"
click node_plot_gpu "https://github.com/jigonzalez930209/egui-workbench/blob/main/src/components/plot/gpu.rs"
click node_viewer "https://github.com/jigonzalez930209/egui-workbench/tree/main/src/components/viewer"
click node_data_grid "https://github.com/jigonzalez930209/egui-workbench/blob/main/src/components/data_grid.rs"
click node_data_sources "https://github.com/jigonzalez930209/egui-workbench/tree/main/src/data"
click node_data_column "https://github.com/jigonzalez930209/egui-workbench/blob/main/src/data/column.rs"
click node_query "https://github.com/jigonzalez930209/egui-workbench/blob/main/src/data/query/parser.rs"
click node_python "https://github.com/jigonzalez930209/egui-workbench/blob/main/crates/egui-workbench-python/python/egui_workbench/app.py"
click node_host "https://github.com/jigonzalez930209/egui-workbench/blob/main/crates/egui-workbench-host/src/runtime.rs"
click node_agent "https://github.com/jigonzalez930209/egui-workbench/tree/main/crates/egui-workbench-agent/src"
click node_extensions "https://github.com/jigonzalez930209/egui-workbench/blob/main/crates/egui-workbench-extensions/src/runtime.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_runtime_helpers,node_commands,node_workbench_shell,node_devtools,node_journal,node_layout,node_user toneBlue
class node_chrome,node_components,node_theme_global toneAmber
class node_charts,node_plot_gpu,node_viewer,node_data_grid toneMint
class node_data_sources,node_data_column,node_query toneRose
class node_python,node_host,node_agent,node_extensions,node_app_dev toneIndigo
```

## Components

### Application runtime

- [Starter app state](https://github.com/jigonzalez930209/egui-workbench/blob/main/templates/app/src/app.rs): `templates/app/src/app.rs`
- [App runtime helpers](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/app): `src/app`
- [Command registry](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/commands): `src/commands`
- [Fixed workbench shell](https://github.com/jigonzalez930209/egui-workbench/blob/main/src/app/shell.rs): `src/app/shell.rs`
- [DevTools](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/app/devtools): `src/app/devtools`
- [Command journal](https://github.com/jigonzalez930209/egui-workbench/blob/main/src/app/journal.rs): `src/app/journal.rs`
- [Workspace layout](https://github.com/jigonzalez930209/egui-workbench/blob/main/src/app/layout.rs): `src/app/layout.rs`

### Workbench UI

- [Window and chrome](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/chrome): `src/chrome`
- [Reusable components](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/components): `src/components`
- [Themes and global](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/foundation): `src/foundation`

### Content components

- [Interactive plots](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/components/plot): `src/components/plot`
- [GPU plot rendering](https://github.com/jigonzalez930209/egui-workbench/blob/main/src/components/plot/gpu.rs): `src/components/plot/gpu.rs`
- [File viewer](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/components/viewer): `src/components/viewer`
- [Data grid](https://github.com/jigonzalez930209/egui-workbench/blob/main/src/components/data_grid.rs): `src/components/data_grid.rs`

### Data services

- [Data sources](https://github.com/jigonzalez930209/egui-workbench/tree/main/src/data): `src/data`
- [Column data model](https://github.com/jigonzalez930209/egui-workbench/blob/main/src/data/column.rs): `src/data/column.rs`
- [Query parser and AST](https://github.com/jigonzalez930209/egui-workbench/blob/main/src/data/query/parser.rs): `src/data/query/parser.rs`

### Bindings and extensions

- [Python workbench](https://github.com/jigonzalez930209/egui-workbench/blob/main/crates/egui-workbench-python/python/egui_workbench/app.py): `crates/egui-workbench-python/python/egui_workbench/app.py`
- [Declarative host](https://github.com/jigonzalez930209/egui-workbench/blob/main/crates/egui-workbench-host/src/runtime.rs): `crates/egui-workbench-host/src/runtime.rs`
- [Agent and MCP](https://github.com/jigonzalez930209/egui-workbench/tree/main/crates/egui-workbench-agent/src): `crates/egui-workbench-agent/src`
- [WASM extensions](https://github.com/jigonzalez930209/egui-workbench/blob/main/crates/egui-workbench-extensions/src/runtime.rs): `crates/egui-workbench-extensions/src/runtime.rs`

### Other components

- **Application developer**
- **Workbench user**

## Connections

- Application developer → Starter app state: builds on (evidence: `README.md`)
- Starter app state → App runtime helpers: uses runtime (evidence: `templates/app/src/app.rs`)
- Starter app state → Command registry: handles commands (evidence: `templates/app/src/app.rs`)
- Starter app state → Fixed workbench shell: shows shell (evidence: `templates/app/src/app.rs`)
- Fixed workbench shell → Window and chrome: frames content
- Starter app state → Reusable components: composes UI (evidence: `README.md`)
- Workbench user → Reusable components: interacts with (evidence: `README.md`)
- Reusable components → Starter app state: returns events (evidence: `README.md`)
- Starter app state → Themes and global: sets theme (evidence: `templates/app/src/app.rs`)
- Starter app state → Command journal: records commands (evidence: `templates/app/src/app.rs`)
- Starter app state → Interactive plots: opens chart views (evidence: `templates/app/src/app.rs`)
- Starter app state → File viewer: opens file views (evidence: `README.md`)
- Interactive plots → GPU plot rendering: renders with (evidence: `src/components/plot/mod.rs`)
- File viewer → Data sources: reads files (evidence: `README.md`)
- Data grid → Column data model: presents columns
- Query parser and AST → Column data model: uses values (evidence: `src/data/query/parser.rs`)
- Application developer → Python workbench: builds Python app (evidence: `README.md`)
- Python workbench → Declarative host: uses native host (evidence: `README.md`)
- Application developer → Agent and MCP: enables agent control (evidence: `README.md`)
- Application developer → WASM extensions: loads extensions (evidence: `README.md`)
- DevTools → Command journal: shows journal (evidence: `src/app/devtools/mod.rs`)
- App runtime helpers → Workspace layout: provides layout (evidence: `src/app/mod.rs`)
