# anil-matcha/open-dots architecture

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

- Interactive diagram: https://gitdiagram.com/anil-matcha/open-dots
- Repository: https://github.com/anil-matcha/open-dots

## Overview

Open Dots is a self-hosted AI workspace. Users configure personas and models, chat with streaming responses and image attachments, and can invoke governed workspace, connector, or computer actions; riskier actions pause for approval and are audited. The Next.js client uses the FastAPI API, which routes requests to persistence, inference, and action services. The README documents optional Docker and remote computer providers. Some routing and service implementations were not excerpted, so uncertain internal links are omitted; optional integrations are shown dashed where implementation wiring is not evidenced.

Main entry points: [`server/app/main.py`](https://github.com/anil-matcha/open-dots/blob/main/server/app/main.py) (FastAPI application), [`server/app/services/storage_service.py`](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/storage_service.py) (Workspace persistence), [`server/app/routers/chat.py`](https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/chat.py) (Chat endpoints), [`client/components/Dashboard.jsx`](https://github.com/anil-matcha/open-dots/blob/main/client/components/Dashboard.jsx) (Workspace dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Workspace client"]
  node_dashboard["Workspace dashboard<br/>[Dashboard.jsx]"]
  node_chat["Chat workspace<br/>[ChatWindow.jsx]"]
  node_messages["Message rendering<br/>[MessageItem.jsx]"]
  node_approval_ui["Approval prompts<br/>[ApprovalCard.jsx]"]
  node_computer_ui["Computer panel<br/>[ComputerPanel.jsx]"]
  node_marketplace["Persona marketplace<br/>[Marketplace.jsx]"]
  node_settings_ui["App settings"]
  node_model_picker["Model catalog UI<br/>[ModelPicker.jsx]"]
  node_client_api["API client<br/>[api.js]"]
end

subgraph group_api["HTTP API"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_chat_route["Chat endpoints<br/>[chat.py]"]
  node_bot_route["Persona endpoints<br/>[bots.py]"]
  node_model_route["Model endpoints<br/>[models.py]"]
  node_settings_route["Settings endpoints<br/>[settings.py]"]
  node_upload_route["Image upload<br/>[upload.py]"]
  node_approval_route["Approval endpoints<br/>[approvals.py]"]
  node_audit_route["Audit endpoints<br/>[audit.py]"]
  node_computer_route["Computer endpoints<br/>[computers.py]"]
  node_connector_route["Connector endpoints<br/>[connectors.py]"]
  node_auth["Local authentication<br/>[auth_service.py]"]
  node_contracts["API contracts<br/>[contracts.py]"]
end

subgraph group_services["Workspace services"]
  node_provider["Inference adapter"]
  node_storage["Workspace persistence<br/>[storage_service.py]"]
  node_database[("SQLite database<br/>[database.py]")]
  node_gateway["Action gateway<br/>[action_gateway.py]"]
  node_approval_broker["Approval broker<br/>[approval_broker.py]"]
  node_workspace["Confined workspace tools"]
  node_computer_actions["Computer actions"]
  node_computer_provider["Computer provider"]
  node_connector_actions["Connector actions"]
  node_composio["Composio adapter"]
end

subgraph group_integrations["External integrations"]
  node_inference_service{{"Inference API"}}
  node_composio_service{{"Composio service"}}
end

node_person(("Workspace user"))

node_person -->|"uses"| node_dashboard
node_dashboard -->|"shows"| node_chat
node_dashboard -->|"shows"| node_computer_ui
node_dashboard -->|"shows"| node_marketplace
node_dashboard -->|"shows"| node_settings_ui
node_chat -->|"renders"| node_messages
node_chat -->|"renders"| node_approval_ui
node_chat -->|"renders"| node_model_picker
node_chat -->|"calls"| node_client_api
node_computer_ui -->|"calls"| node_client_api
node_settings_ui -->|"calls"| node_client_api
node_settings_ui -->|"uses catalog"| node_model_picker
node_marketplace -->|"calls"| node_client_api
node_client_api -->|"HTTP requests"| node_api_app
node_api_app -->|"authenticates"| node_auth
node_api_app -->|"registers"| node_chat_route
node_api_app -->|"registers"| node_bot_route
node_api_app -->|"registers"| node_model_route
node_api_app -->|"registers"| node_settings_route
node_api_app -->|"registers"| node_upload_route
node_api_app -->|"registers"| node_approval_route
node_api_app -->|"registers"| node_audit_route
node_api_app -->|"registers"| node_computer_route
node_api_app -->|"registers"| node_connector_route
node_chat_route -->|"calls"| node_provider
node_chat_route -->|"reads and writes"| node_storage
node_chat_route -->|"dispatches actions"| node_gateway
node_chat_route -->|"calls"| node_connector_actions
node_chat_route -->|"calls"| node_workspace
node_bot_route -->|"reads and writes"| node_storage
node_settings_route -->|"reads and writes"| node_storage
node_approval_route -->|"calls"| node_approval_broker
node_audit_route -->|"reads"| node_storage
node_computer_route -->|"dispatches actions"| node_gateway
node_computer_route -->|"calls"| node_computer_provider
node_computer_route -->|"reads and writes"| node_storage
node_computer_route -->|"calls"| node_computer_actions
node_connector_route -->|"calls"| node_composio
node_connector_route -->|"reads and writes"| node_storage
node_storage -->|"persists to"| node_database
node_provider -->|"reads settings"| node_storage
node_provider -.->|"sends predictions"| node_inference_service
node_composio -.->|"calls tools"| node_composio_service
node_computer_provider -.->|"provides runtime"| node_computer_actions
node_contracts -->|"defines payloads"| node_chat_route

click node_dashboard "https://github.com/anil-matcha/open-dots/blob/main/client/components/Dashboard.jsx"
click node_chat "https://github.com/anil-matcha/open-dots/blob/main/client/components/ChatWindow.jsx"
click node_messages "https://github.com/anil-matcha/open-dots/blob/main/client/components/MessageItem.jsx"
click node_approval_ui "https://github.com/anil-matcha/open-dots/blob/main/client/components/ApprovalCard.jsx"
click node_computer_ui "https://github.com/anil-matcha/open-dots/blob/main/client/components/ComputerPanel.jsx"
click node_marketplace "https://github.com/anil-matcha/open-dots/blob/main/client/components/Marketplace.jsx"
click node_settings_ui "https://github.com/anil-matcha/open-dots/blob/main/client/components/AppSettingsDrawer.jsx"
click node_model_picker "https://github.com/anil-matcha/open-dots/blob/main/client/components/ModelPicker.jsx"
click node_client_api "https://github.com/anil-matcha/open-dots/blob/main/client/lib/api.js"
click node_api_app "https://github.com/anil-matcha/open-dots/blob/main/server/app/main.py"
click node_chat_route "https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/chat.py"
click node_bot_route "https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/bots.py"
click node_model_route "https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/models.py"
click node_settings_route "https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/settings.py"
click node_upload_route "https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/upload.py"
click node_approval_route "https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/approvals.py"
click node_audit_route "https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/audit.py"
click node_computer_route "https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/computers.py"
click node_connector_route "https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/connectors.py"
click node_auth "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/auth_service.py"
click node_contracts "https://github.com/anil-matcha/open-dots/blob/main/server/app/schemas/contracts.py"
click node_provider "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/provider_service.py"
click node_storage "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/storage_service.py"
click node_database "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/database.py"
click node_gateway "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/action_gateway.py"
click node_approval_broker "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/approval_broker.py"
click node_workspace "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/workspace_service.py"
click node_computer_actions "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/computer_actions.py"
click node_computer_provider "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/computer_provider.py"
click node_connector_actions "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/connector_actions.py"
click node_composio "https://github.com/anil-matcha/open-dots/blob/main/server/app/services/composio_service.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_dashboard,node_chat,node_messages,node_approval_ui,node_computer_ui,node_marketplace,node_settings_ui,node_model_picker,node_client_api,node_person toneBlue
class node_api_app,node_chat_route,node_bot_route,node_model_route,node_settings_route,node_upload_route,node_approval_route,node_audit_route,node_computer_route,node_connector_route,node_auth,node_contracts toneAmber
class node_provider,node_storage,node_database,node_gateway,node_approval_broker,node_workspace,node_computer_actions,node_computer_provider,node_connector_actions,node_composio toneMint
class node_inference_service,node_composio_service toneRose
```

## Components

### Workspace client

- [Workspace dashboard](https://github.com/anil-matcha/open-dots/blob/main/client/components/Dashboard.jsx): `client/components/Dashboard.jsx`
- [Chat workspace](https://github.com/anil-matcha/open-dots/blob/main/client/components/ChatWindow.jsx): `client/components/ChatWindow.jsx`
- [Message rendering](https://github.com/anil-matcha/open-dots/blob/main/client/components/MessageItem.jsx): `client/components/MessageItem.jsx`
- [Approval prompts](https://github.com/anil-matcha/open-dots/blob/main/client/components/ApprovalCard.jsx): `client/components/ApprovalCard.jsx`
- [Computer panel](https://github.com/anil-matcha/open-dots/blob/main/client/components/ComputerPanel.jsx): `client/components/ComputerPanel.jsx`
- [Persona marketplace](https://github.com/anil-matcha/open-dots/blob/main/client/components/Marketplace.jsx): `client/components/Marketplace.jsx`
- [App settings](https://github.com/anil-matcha/open-dots/blob/main/client/components/AppSettingsDrawer.jsx): `client/components/AppSettingsDrawer.jsx`
- [Model catalog UI](https://github.com/anil-matcha/open-dots/blob/main/client/components/ModelPicker.jsx): `client/components/ModelPicker.jsx`
- [API client](https://github.com/anil-matcha/open-dots/blob/main/client/lib/api.js): `client/lib/api.js`

### HTTP API

- [FastAPI application](https://github.com/anil-matcha/open-dots/blob/main/server/app/main.py): `server/app/main.py`
- [Chat endpoints](https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/chat.py): `server/app/routers/chat.py`
- [Persona endpoints](https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/bots.py): `server/app/routers/bots.py`
- [Model endpoints](https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/models.py): `server/app/routers/models.py`
- [Settings endpoints](https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/settings.py): `server/app/routers/settings.py`
- [Image upload](https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/upload.py): `server/app/routers/upload.py`
- [Approval endpoints](https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/approvals.py): `server/app/routers/approvals.py`
- [Audit endpoints](https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/audit.py): `server/app/routers/audit.py`
- [Computer endpoints](https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/computers.py): `server/app/routers/computers.py`
- [Connector endpoints](https://github.com/anil-matcha/open-dots/blob/main/server/app/routers/connectors.py): `server/app/routers/connectors.py`
- [Local authentication](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/auth_service.py): `server/app/services/auth_service.py`
- [API contracts](https://github.com/anil-matcha/open-dots/blob/main/server/app/schemas/contracts.py): `server/app/schemas/contracts.py`

### Workspace services

- [Inference adapter](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/provider_service.py): `server/app/services/provider_service.py`
- [Workspace persistence](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/storage_service.py): `server/app/services/storage_service.py`
- [SQLite database](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/database.py): `server/app/services/database.py`
- [Action gateway](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/action_gateway.py): `server/app/services/action_gateway.py`
- [Approval broker](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/approval_broker.py): `server/app/services/approval_broker.py`
- [Confined workspace tools](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/workspace_service.py): `server/app/services/workspace_service.py`
- [Computer actions](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/computer_actions.py): `server/app/services/computer_actions.py`
- [Computer provider](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/computer_provider.py): `server/app/services/computer_provider.py`
- [Connector actions](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/connector_actions.py): `server/app/services/connector_actions.py`
- [Composio adapter](https://github.com/anil-matcha/open-dots/blob/main/server/app/services/composio_service.py): `server/app/services/composio_service.py`

### External integrations

- **Inference API**
- **Composio service**

### Other components

- **Workspace user**

## Connections

- Workspace user → Workspace dashboard: uses (evidence: `README.md`)
- Workspace dashboard → Chat workspace: shows (evidence: `client/components/Dashboard.jsx`)
- Workspace dashboard → Computer panel: shows (evidence: `client/components/Dashboard.jsx`)
- Workspace dashboard → Persona marketplace: shows (evidence: `client/components/Dashboard.jsx`)
- Workspace dashboard → App settings: shows (evidence: `client/components/Dashboard.jsx`)
- Chat workspace → Message rendering: renders (evidence: `client/components/ChatWindow.jsx`)
- Chat workspace → Approval prompts: renders (evidence: `client/components/ChatWindow.jsx`)
- Chat workspace → Model catalog UI: renders (evidence: `client/components/ChatWindow.jsx`)
- Chat workspace → API client: calls (evidence: `client/components/ChatWindow.jsx`)
- Computer panel → API client: calls (evidence: `client/components/ComputerPanel.jsx`)
- App settings → API client: calls (evidence: `client/components/AppSettingsDrawer.jsx`)
- App settings → Model catalog UI: uses catalog (evidence: `client/components/AppSettingsDrawer.jsx`)
- Persona marketplace → API client: calls (evidence: `client/components/Marketplace.jsx`)
- API client → FastAPI application: HTTP requests (evidence: `README.md`)
- FastAPI application → Local authentication: authenticates (evidence: `server/app/main.py`)
- FastAPI application → Chat endpoints: registers (evidence: `server/app/main.py`)
- FastAPI application → Persona endpoints: registers (evidence: `server/app/main.py`)
- FastAPI application → Model endpoints: registers (evidence: `server/app/main.py`)
- FastAPI application → Settings endpoints: registers (evidence: `server/app/main.py`)
- FastAPI application → Image upload: registers (evidence: `server/app/main.py`)
- FastAPI application → Approval endpoints: registers (evidence: `server/app/main.py`)
- FastAPI application → Audit endpoints: registers (evidence: `server/app/main.py`)
- FastAPI application → Computer endpoints: registers (evidence: `server/app/main.py`)
- FastAPI application → Connector endpoints: registers (evidence: `server/app/main.py`)
- Chat endpoints → Inference adapter: calls (evidence: `server/app/routers/chat.py`)
- Chat endpoints → Workspace persistence: reads and writes (evidence: `server/app/routers/chat.py`)
- Chat endpoints → Action gateway: dispatches actions (evidence: `server/app/routers/chat.py`)
- Chat endpoints → Connector actions: calls (evidence: `server/app/routers/chat.py`)
- Chat endpoints → Confined workspace tools: calls (evidence: `server/app/routers/chat.py`)
- Persona endpoints → Workspace persistence: reads and writes (evidence: `server/app/routers/bots.py`)
- Settings endpoints → Workspace persistence: reads and writes (evidence: `server/app/routers/settings.py`)
- Approval endpoints → Approval broker: calls (evidence: `server/app/routers/approvals.py`)
- Audit endpoints → Workspace persistence: reads (evidence: `server/app/routers/audit.py`)
- Computer endpoints → Action gateway: dispatches actions (evidence: `server/app/routers/computers.py`)
- Computer endpoints → Computer provider: calls (evidence: `server/app/routers/computers.py`)
- Computer endpoints → Workspace persistence: reads and writes (evidence: `server/app/routers/computers.py`)
- Computer endpoints → Computer actions: calls (evidence: `server/app/routers/computers.py`)
- Connector endpoints → Composio adapter: calls (evidence: `server/app/routers/connectors.py`)
- Connector endpoints → Workspace persistence: reads and writes (evidence: `server/app/routers/connectors.py`)
- Workspace persistence → SQLite database: persists to (evidence: `server/app/services/storage_service.py`)
- Inference adapter → Workspace persistence: reads settings (evidence: `server/app/services/provider_service.py`)
- Inference adapter → Inference API: sends predictions (evidence: `README.md`)
- Composio adapter → Composio service: calls tools (evidence: `README.md`)
- Computer provider → Computer actions: provides runtime (evidence: `README.md`)
- API contracts → Chat endpoints: defines payloads (evidence: `server/app/routers/chat.py`)
