# zhangzhangooo/open-workbench architecture

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

- Interactive diagram: https://gitdiagram.com/zhangzhangooo/open-workbench
- Repository: https://github.com/zhangzhangooo/open-workbench

## Overview

OpenWorkbench is a self-hosted local workbench: users work through a browser UI, call the local Python server, and receive results from local business data, machine capabilities, or configured integrations. The main documented flows include AI chat, OpenClaw task execution with reviewed write-back, file search and document processing, and personal productivity modules. The sampled server routes confirm API-to-store handling; broader subsystem links follow the README’s capability descriptions where implementation excerpts were not supplied.

Main entry points: [`server.py`](https://github.com/zhangzhangooo/open-workbench/blob/main/server.py) (HTTP API Server), [`integrations.py`](https://github.com/zhangzhangooo/open-workbench/blob/main/integrations.py) (Integration Services), [`static/core.js`](https://github.com/zhangzhangooo/open-workbench/blob/main/static/core.js) (Workbench Shell), [`indexer.py`](https://github.com/zhangzhangooo/open-workbench/blob/main/indexer.py) (File Index & Search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser Workbench"]
  node_frontend["Workbench Shell<br/>[core.js]"]
  node_aiui["AI Chat<br/>[mod-ai.js]"]
  node_clawui["OpenClaw UI<br/>[mod-claw.js]"]
  node_homeui["Dashboard<br/>[mod-home.js]"]
  node_docsui["Document UI<br/>[mod-docs.js]"]
  node_systemui["System Tools UI<br/>[mod-system.js]"]
  node_otherui["Productivity Modules"]
end

subgraph group_api["Local Service"]
  node_server["HTTP API Server<br/>[server.py]"]
  node_indexer["File Index &amp; Search<br/>[indexer.py]"]
  node_docread["Document Reading<br/>[docsio.py]"]
  node_docwrite["Document Generation<br/>[docswrite.py]"]
  node_integrationslib["Integration Services<br/>[integrations.py]"]
  node_mailclient["Email Client<br/>[mail.py]"]
  node_sysinfo["Machine Status<br/>[sysinfo.py]"]
  node_terminal["ConPTY Terminal<br/>[conpty.py]"]
end

subgraph group_data["Local Data"]
  node_store[("Business Data Store<br/>[store.py]")]
end

subgraph group_features["User Capabilities"]
end

subgraph group_integrations["External Systems"]
  node_ollama["Ollama API"]
  node_openclaw["OpenClaw"]
  node_mailservice["IMAP / SMTP"]
  node_pushconnectors["Push Connectors<br/>[integrations.py]"]
end

node_user(("Workbench User"))
node_localfiles[("Local Files")]

node_user -->|"uses"| node_frontend
node_frontend -->|"calls API"| node_server
node_aiui -->|"sends chat"| node_server
node_clawui -->|"submits tasks"| node_server
node_homeui -->|"loads dashboard"| node_server
node_docsui -->|"requests documents"| node_server
node_systemui -->|"requests tools"| node_server
node_otherui -->|"calls modules"| node_server
node_server -->|"serves UI"| node_frontend
node_server -->|"reads and writes"| node_store
node_server -->|"searches files"| node_indexer
node_indexer -->|"indexes files"| node_localfiles
node_server -->|"reads documents"| node_docread
node_server -->|"generates documents"| node_docwrite
node_server -->|"runs integrations"| node_integrationslib
node_server -->|"handles email"| node_mailclient
node_server -->|"gets status"| node_sysinfo
node_server -->|"runs commands"| node_terminal
node_integrationslib -.->|"sends prompts"| node_ollama
node_integrationslib -.->|"runs tasks"| node_openclaw
node_mailclient -.->|"uses IMAP SMTP"| node_mailservice
node_server -.->|"dispatches pushes"| node_pushconnectors
node_integrationslib -->|"queues write-backs"| node_store

click node_frontend "https://github.com/zhangzhangooo/open-workbench/blob/main/static/core.js"
click node_aiui "https://github.com/zhangzhangooo/open-workbench/blob/main/static/mod-ai.js"
click node_clawui "https://github.com/zhangzhangooo/open-workbench/blob/main/static/mod-claw.js"
click node_homeui "https://github.com/zhangzhangooo/open-workbench/blob/main/static/mod-home.js"
click node_docsui "https://github.com/zhangzhangooo/open-workbench/blob/main/static/mod-docs.js"
click node_systemui "https://github.com/zhangzhangooo/open-workbench/blob/main/static/mod-system.js"
click node_otherui "https://github.com/zhangzhangooo/open-workbench/tree/main/static"
click node_server "https://github.com/zhangzhangooo/open-workbench/blob/main/server.py"
click node_indexer "https://github.com/zhangzhangooo/open-workbench/blob/main/indexer.py"
click node_docread "https://github.com/zhangzhangooo/open-workbench/blob/main/docsio.py"
click node_docwrite "https://github.com/zhangzhangooo/open-workbench/blob/main/docswrite.py"
click node_integrationslib "https://github.com/zhangzhangooo/open-workbench/blob/main/integrations.py"
click node_mailclient "https://github.com/zhangzhangooo/open-workbench/blob/main/mail.py"
click node_sysinfo "https://github.com/zhangzhangooo/open-workbench/blob/main/sysinfo.py"
click node_terminal "https://github.com/zhangzhangooo/open-workbench/blob/main/conpty.py"
click node_store "https://github.com/zhangzhangooo/open-workbench/blob/main/store.py"
click node_pushconnectors "https://github.com/zhangzhangooo/open-workbench/blob/main/integrations.py"

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_frontend,node_aiui,node_clawui,node_homeui,node_docsui,node_systemui,node_otherui,node_user toneBlue
class node_server,node_indexer,node_docread,node_docwrite,node_integrationslib,node_mailclient,node_sysinfo,node_terminal,node_localfiles toneAmber
class node_store toneMint
class node_ollama,node_openclaw,node_mailservice,node_pushconnectors toneIndigo
```

## Components

### Browser Workbench

- [Workbench Shell](https://github.com/zhangzhangooo/open-workbench/blob/main/static/core.js): `static/core.js`
- [AI Chat](https://github.com/zhangzhangooo/open-workbench/blob/main/static/mod-ai.js): `static/mod-ai.js`
- [OpenClaw UI](https://github.com/zhangzhangooo/open-workbench/blob/main/static/mod-claw.js): `static/mod-claw.js`
- [Dashboard](https://github.com/zhangzhangooo/open-workbench/blob/main/static/mod-home.js): `static/mod-home.js`
- [Document UI](https://github.com/zhangzhangooo/open-workbench/blob/main/static/mod-docs.js): `static/mod-docs.js`
- [System Tools UI](https://github.com/zhangzhangooo/open-workbench/blob/main/static/mod-system.js): `static/mod-system.js`
- [Productivity Modules](https://github.com/zhangzhangooo/open-workbench/tree/main/static): `static`

### Local Service

- [HTTP API Server](https://github.com/zhangzhangooo/open-workbench/blob/main/server.py): `server.py`
- [File Index & Search](https://github.com/zhangzhangooo/open-workbench/blob/main/indexer.py): `indexer.py`
- [Document Reading](https://github.com/zhangzhangooo/open-workbench/blob/main/docsio.py): `docsio.py`
- [Document Generation](https://github.com/zhangzhangooo/open-workbench/blob/main/docswrite.py): `docswrite.py`
- [Integration Services](https://github.com/zhangzhangooo/open-workbench/blob/main/integrations.py): `integrations.py`
- [Email Client](https://github.com/zhangzhangooo/open-workbench/blob/main/mail.py): `mail.py`
- [Machine Status](https://github.com/zhangzhangooo/open-workbench/blob/main/sysinfo.py): `sysinfo.py`
- [ConPTY Terminal](https://github.com/zhangzhangooo/open-workbench/blob/main/conpty.py): `conpty.py`

### Local Data

- [Business Data Store](https://github.com/zhangzhangooo/open-workbench/blob/main/store.py): `store.py`

### External Systems

- **Ollama API**
- **OpenClaw**
- **IMAP / SMTP**
- [Push Connectors](https://github.com/zhangzhangooo/open-workbench/blob/main/integrations.py): `integrations.py`

### Other components

- **Workbench User**
- **Local Files**

## Connections

- Workbench User → Workbench Shell: uses
- Workbench Shell → HTTP API Server: calls API
- AI Chat → HTTP API Server: sends chat
- OpenClaw UI → HTTP API Server: submits tasks
- Dashboard → HTTP API Server: loads dashboard
- Document UI → HTTP API Server: requests documents
- System Tools UI → HTTP API Server: requests tools
- Productivity Modules → HTTP API Server: calls modules
- HTTP API Server → Workbench Shell: serves UI
- HTTP API Server → Business Data Store: reads and writes
- HTTP API Server → File Index & Search: searches files
- File Index & Search → Local Files: indexes files
- HTTP API Server → Document Reading: reads documents
- HTTP API Server → Document Generation: generates documents
- HTTP API Server → Integration Services: runs integrations
- HTTP API Server → Email Client: handles email
- HTTP API Server → Machine Status: gets status
- HTTP API Server → ConPTY Terminal: runs commands
- Integration Services → Ollama API: sends prompts
- Integration Services → OpenClaw: runs tasks
- Email Client → IMAP / SMTP: uses IMAP SMTP
- HTTP API Server → Push Connectors: dispatches pushes
- Integration Services → Business Data Store: queues write-backs
