# plotly/dash architecture

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

- Interactive diagram: https://gitdiagram.com/plotly/dash
- Repository: https://github.com/plotly/dash

## Overview

Dash is a Python framework for building reactive data applications: users interact with browser components, the renderer requests the app layout and callback dependencies, and Python callbacks produce updated component properties. The runtime also supports background and streaming callbacks, multiple server backends, shared storage, and MCP task/resource integrations. The graph follows documented and indexed relationships; several subsystems are represented at directory level because their implementation files were not sampled, so uncertain connections are omitted.

Main entry points: [`dash/_callback.py`](https://github.com/plotly/dash/blob/dev/dash/_callback.py) (Callbacks), [`dash/backends`](https://github.com/plotly/dash/tree/dev/dash/backends) (Server backends), [`dash/dash.py`](https://github.com/plotly/dash/blob/dev/dash/dash.py) (Dash app), [`dash/dash-renderer/src/APIController.react.js`](https://github.com/plotly/dash/blob/dev/dash/dash-renderer/src/APIController.react.js) (Dash renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Runtime"]
  node_app["Dash app<br/>[dash.py]"]
  node_server["Server backends"]
  node_base_server["Server base<br/>[base_server.py]"]
  node_websocket["WebSocket backend<br/>[ws.py]"]
  node_validation["Validation<br/>[_validate.py]"]
  node_utils["Runtime utilities<br/>[_utils.py]"]
  node_getapp["App lookup<br/>[_get_app.py]"]
  node_exceptions["Dash exceptions<br/>[exceptions.py]"]
  node_dependenciespy["Component dependencies<br/>[dependencies.py]"]
end

subgraph group_callback["Callback Execution"]
  node_callback["Callbacks<br/>[_callback.py]"]
  node_context["Callback context"]
  node_background["Background jobs"]
  node_shared[("Shared storage")]
  node_streaming["Streaming callbacks<br/>[_streaming.py]"]
  node_streamhub["Stream hub<br/>[_stream_hub.py]"]
  node_grouping["Callback grouping<br/>[_grouping.py]"]
  node_signing["Callback signing"]
end

subgraph group_browser["Browser Runtime"]
  node_renderer["Dash renderer"]
  node_dependencies["Dependency matching<br/>[dependencies.js]"]
  node_streamclient["Stream client<br/>[streamClient.ts]"]
end

subgraph group_components["UI Components"]
  node_corecomponents["Core components"]
  node_datatable["Data table<br/>[DataTable.js]"]
  node_htmlcomponents["HTML components"]
  node_componentplugins["Component plugins"]
end

subgraph group_integrations["Extensions"]
  node_mcp["MCP tasks<br/>[tasks.py]"]
end

node_user(("App user"))

node_user -->|"interacts with"| node_corecomponents
node_user -.->|"interacts with"| node_datatable
node_corecomponents -.->|"updates app"| node_renderer
node_renderer -->|"matches dependencies"| node_dependencies
node_renderer -->|"requests layout"| node_app
node_app -->|"configures backend"| node_server
node_server -->|"uses base"| node_base_server
node_server -->|"uses WebSocket"| node_websocket
node_server -->|"routes streams"| node_streaming
node_server -->|"uses hub"| node_streamhub
node_app -->|"registers callbacks"| node_callback
node_callback -->|"validates dependencies"| node_dependenciespy
node_callback -->|"sets callback context"| node_context
node_callback -->|"uses grouping"| node_grouping
node_callback -->|"uses utilities"| node_utils
node_callback -->|"validates callbacks"| node_validation
node_callback -->|"uses signing"| node_signing
node_callback -->|"gets active app"| node_getapp
node_callback -->|"raises errors"| node_exceptions
node_callback -->|"dispatches jobs"| node_background
node_callback -->|"dispatches streams"| node_streaming
node_background -->|"uses cache"| node_shared
node_streamclient -.->|"requests streams"| node_streaming
node_mcp -->|"reads callback results"| node_callback
node_app -->|"validates app"| node_validation

click node_app "https://github.com/plotly/dash/blob/dev/dash/dash.py"
click node_server "https://github.com/plotly/dash/tree/dev/dash/backends"
click node_base_server "https://github.com/plotly/dash/blob/dev/dash/backends/base_server.py"
click node_websocket "https://github.com/plotly/dash/blob/dev/dash/backends/ws.py"
click node_callback "https://github.com/plotly/dash/blob/dev/dash/_callback.py"
click node_context "https://github.com/plotly/dash/blob/dev/dash/_callback_context.py"
click node_background "https://github.com/plotly/dash/tree/dev/dash/background_callback/managers"
click node_shared "https://github.com/plotly/dash/tree/dev/dash/_shared_storage"
click node_streaming "https://github.com/plotly/dash/blob/dev/dash/_streaming.py"
click node_streamhub "https://github.com/plotly/dash/blob/dev/dash/_stream_hub.py"
click node_renderer "https://github.com/plotly/dash/blob/dev/dash/dash-renderer/src/APIController.react.js"
click node_dependencies "https://github.com/plotly/dash/blob/dev/dash/dash-renderer/src/actions/dependencies.js"
click node_streamclient "https://github.com/plotly/dash/blob/dev/dash/dash-renderer/src/utils/streamClient.ts"
click node_corecomponents "https://github.com/plotly/dash/tree/dev/components/dash-core-components/src/components"
click node_datatable "https://github.com/plotly/dash/blob/dev/components/dash-table/src/dash-table/dash/DataTable.js"
click node_htmlcomponents "https://github.com/plotly/dash/tree/dev/components/dash-html-components"
click node_componentplugins "https://github.com/plotly/dash/tree/dev/%40plotly/dash-component-plugins/src"
click node_mcp "https://github.com/plotly/dash/blob/dev/dash/mcp/tasks/tasks.py"
click node_validation "https://github.com/plotly/dash/blob/dev/dash/_validate.py"
click node_grouping "https://github.com/plotly/dash/blob/dev/dash/_grouping.py"
click node_utils "https://github.com/plotly/dash/blob/dev/dash/_utils.py"
click node_signing "https://github.com/plotly/dash/blob/dev/dash/_callback_signing.py"
click node_getapp "https://github.com/plotly/dash/blob/dev/dash/_get_app.py"
click node_exceptions "https://github.com/plotly/dash/blob/dev/dash/exceptions.py"
click node_dependenciespy "https://github.com/plotly/dash/blob/dev/dash/dependencies.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_app,node_server,node_base_server,node_websocket,node_validation,node_utils,node_getapp,node_exceptions,node_dependenciespy,node_user toneBlue
class node_callback,node_context,node_background,node_shared,node_streaming,node_streamhub,node_grouping,node_signing toneAmber
class node_renderer,node_dependencies,node_streamclient toneMint
class node_corecomponents,node_datatable,node_htmlcomponents,node_componentplugins toneRose
class node_mcp toneIndigo
```

## Components

### App Runtime

- [Dash app](https://github.com/plotly/dash/blob/dev/dash/dash.py): `dash/dash.py`
- [Server backends](https://github.com/plotly/dash/tree/dev/dash/backends): `dash/backends`
- [Server base](https://github.com/plotly/dash/blob/dev/dash/backends/base_server.py): `dash/backends/base_server.py`
- [WebSocket backend](https://github.com/plotly/dash/blob/dev/dash/backends/ws.py): `dash/backends/ws.py`
- [Validation](https://github.com/plotly/dash/blob/dev/dash/_validate.py): `dash/_validate.py`
- [Runtime utilities](https://github.com/plotly/dash/blob/dev/dash/_utils.py): `dash/_utils.py`
- [App lookup](https://github.com/plotly/dash/blob/dev/dash/_get_app.py): `dash/_get_app.py`
- [Dash exceptions](https://github.com/plotly/dash/blob/dev/dash/exceptions.py): `dash/exceptions.py`
- [Component dependencies](https://github.com/plotly/dash/blob/dev/dash/dependencies.py): `dash/dependencies.py`

### Callback Execution

- [Callbacks](https://github.com/plotly/dash/blob/dev/dash/_callback.py): `dash/_callback.py`
- [Callback context](https://github.com/plotly/dash/blob/dev/dash/_callback_context.py): `dash/_callback_context.py`
- [Background jobs](https://github.com/plotly/dash/tree/dev/dash/background_callback/managers): `dash/background_callback/managers`
- [Shared storage](https://github.com/plotly/dash/tree/dev/dash/_shared_storage): `dash/_shared_storage`
- [Streaming callbacks](https://github.com/plotly/dash/blob/dev/dash/_streaming.py): `dash/_streaming.py`
- [Stream hub](https://github.com/plotly/dash/blob/dev/dash/_stream_hub.py): `dash/_stream_hub.py`
- [Callback grouping](https://github.com/plotly/dash/blob/dev/dash/_grouping.py): `dash/_grouping.py`
- [Callback signing](https://github.com/plotly/dash/blob/dev/dash/_callback_signing.py): `dash/_callback_signing.py`

### Browser Runtime

- [Dash renderer](https://github.com/plotly/dash/blob/dev/dash/dash-renderer/src/APIController.react.js): `dash/dash-renderer/src/APIController.react.js`
- [Dependency matching](https://github.com/plotly/dash/blob/dev/dash/dash-renderer/src/actions/dependencies.js): `dash/dash-renderer/src/actions/dependencies.js`
- [Stream client](https://github.com/plotly/dash/blob/dev/dash/dash-renderer/src/utils/streamClient.ts): `dash/dash-renderer/src/utils/streamClient.ts`

### UI Components

- [Core components](https://github.com/plotly/dash/tree/dev/components/dash-core-components/src/components): `components/dash-core-components/src/components`
- [Data table](https://github.com/plotly/dash/blob/dev/components/dash-table/src/dash-table/dash/DataTable.js): `components/dash-table/src/dash-table/dash/DataTable.js`
- [HTML components](https://github.com/plotly/dash/tree/dev/components/dash-html-components): `components/dash-html-components`
- [Component plugins](https://github.com/plotly/dash/tree/dev/%40plotly/dash-component-plugins/src): `@plotly/dash-component-plugins/src`

### Extensions

- [MCP tasks](https://github.com/plotly/dash/blob/dev/dash/mcp/tasks/tasks.py): `dash/mcp/tasks/tasks.py`

### Other components

- **App user**

## Connections

- App user → Core components: interacts with (evidence: `README.md`)
- App user → Data table: interacts with
- Core components → Dash renderer: updates app
- Dash renderer → Dependency matching: matches dependencies (evidence: `dash/dash-renderer/src/APIController.react.js`)
- Dash renderer → Dash app: requests layout (evidence: `dash/dash-renderer/src/APIController.react.js`)
- Dash app → Server backends: configures backend (evidence: `dash/dash.py`)
- Server backends → Server base: uses base (evidence: `dash/backends/_fastapi.py`)
- Server backends → WebSocket backend: uses WebSocket (evidence: `dash/backends/_fastapi.py`)
- Server backends → Streaming callbacks: routes streams (evidence: `dash/backends/_fastapi.py`)
- Server backends → Stream hub: uses hub (evidence: `dash/backends/_fastapi.py`)
- Dash app → Callbacks: registers callbacks (evidence: `dash/dash.py`)
- Callbacks → Component dependencies: validates dependencies (evidence: `dash/_callback.py`)
- Callbacks → Callback context: sets callback context (evidence: `dash/_callback.py`)
- Callbacks → Callback grouping: uses grouping (evidence: `dash/_callback.py`)
- Callbacks → Runtime utilities: uses utilities (evidence: `dash/_callback.py`)
- Callbacks → Validation: validates callbacks (evidence: `dash/_callback.py`)
- Callbacks → Callback signing: uses signing (evidence: `dash/_callback.py`)
- Callbacks → App lookup: gets active app (evidence: `dash/_callback.py`)
- Callbacks → Dash exceptions: raises errors (evidence: `dash/_callback.py`)
- Callbacks → Background jobs: dispatches jobs (evidence: `dash/_callback.py`)
- Callbacks → Streaming callbacks: dispatches streams (evidence: `dash/_callback.py`)
- Background jobs → Shared storage: uses cache (evidence: `dash/background_callback/managers/diskcache_manager.py`)
- Stream client → Streaming callbacks: requests streams
- MCP tasks → Callbacks: reads callback results (evidence: `dash/mcp/tasks/tasks.py`)
- Dash app → Validation: validates app (evidence: `dash/backends/_fastapi.py`)
