# databricks-solutions/databricks-apps-cookbook architecture

> Architecture diagram of the GitHub repository databricks-solutions/databricks-apps-cookbook, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/databricks-solutions/databricks-apps-cookbook
- Repository: https://github.com/databricks-solutions/databricks-apps-cookbook

## Overview

The Databricks Apps Cookbook is a collection of Python app recipes and runnable examples for Dash, Streamlit, Reflex, and FastAPI, plus a local MCP server that exposes recipe and skill lookup to coding agents. The user-facing path is to browse or run a framework sample, then use a recipe to access Databricks capabilities such as data, AI, identity, and jobs. Reflex and FastAPI wiring is supported by sampled source; broader recipe coverage and service relationships are documented in the README, not verified in every implementation.

Main entry points: [`reflex/app/pages`](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/reflex/app/pages) (Reflex recipes), [`dash`](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/dash) (Dash app), [`streamlit`](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/streamlit) (Streamlit app), [`fastapi/app.py`](https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/fastapi/app.py) (FastAPI application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["App Examples"]
  node_dash["Dash app"]
  node_streamlit["Streamlit app"]
  node_reflex["Reflex app"]
  node_reflex_pages["Reflex recipes"]
  node_reflex_layout["Shared page layout<br/>[page_layout.py]"]
  node_reflex_tabs["Recipe tabs"]
end

subgraph group_capabilities["Recipe Capabilities"]
  node_tables_volumes["Tables and volumes"]
  node_compute_jobs["Compute and workflows"]
  node_ai_genai["AI and Genie"]
  node_identity_connections["Identity and connections"]
end

subgraph group_api["FastAPI Example"]
  node_fastapi_app["FastAPI application<br/>[app.py]"]
  node_fastapi_routes["Versioned API routes"]
  node_lakebase_config["Lakebase database config<br/>[database.py]"]
  node_error_handlers["Error handlers<br/>[handlers.py]"]
end

subgraph group_agent_tools["Agent Recipe Tools"]
  node_cookbook_mcp["Recipe MCP server<br/>[server.py]"]
  node_recipe_catalog["Recipe and skill catalog<br/>[catalog.py]"]
end

node_developer(("App developer"))
node_databricks{{"Databricks workspace"}}
node_database[("Lakebase database")]
node_coding_agent(("Coding agent"))

node_developer -->|"uses recipes"| node_dash
node_developer -->|"uses recipes"| node_streamlit
node_developer -->|"uses recipes"| node_reflex
node_developer -->|"uses recipes"| node_fastapi_app
node_dash -->|"offers examples"| node_tables_volumes
node_streamlit -->|"offers examples"| node_tables_volumes
node_dash -->|"offers examples"| node_compute_jobs
node_streamlit -->|"offers examples"| node_ai_genai
node_reflex -->|"registers pages"| node_reflex_pages
node_reflex_pages -->|"uses layout"| node_reflex_layout
node_reflex_pages -->|"uses template"| node_reflex_tabs
node_reflex_pages -->|"includes recipes"| node_ai_genai
node_reflex_pages -->|"includes recipes"| node_identity_connections
node_dash -.->|"accesses platform"| node_databricks
node_streamlit -.->|"accesses platform"| node_databricks
node_reflex -.->|"accesses platform"| node_databricks
node_fastapi_app -->|"includes router"| node_fastapi_routes
node_fastapi_app -->|"initializes database"| node_lakebase_config
node_fastapi_app -->|"registers handlers"| node_error_handlers
node_fastapi_routes -.->|"serves database APIs"| node_database
node_lakebase_config -->|"gets credentials"| node_databricks
node_lakebase_config -->|"connects to"| node_database
node_coding_agent -->|"requests recipes"| node_cookbook_mcp
node_cookbook_mcp -->|"calls catalog"| node_recipe_catalog

click node_dash "https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/dash"
click node_streamlit "https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/streamlit"
click node_reflex "https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/reflex/app"
click node_reflex_pages "https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/reflex/app/pages"
click node_reflex_layout "https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/reflex/app/components/page_layout.py"
click node_reflex_tabs "https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/reflex/app/components/tabbed_page_template.py"
click node_tables_volumes "https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/streamlit/views"
click node_compute_jobs "https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/dash/pages"
click node_ai_genai "https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/reflex/app/pages"
click node_identity_connections "https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/reflex/app/pages"
click node_fastapi_app "https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/fastapi/app.py"
click node_fastapi_routes "https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/fastapi/routes/v1"
click node_lakebase_config "https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/fastapi/config/database.py"
click node_error_handlers "https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/fastapi/errors/handlers.py"
click node_cookbook_mcp "https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/mcp-server/server.py"
click node_recipe_catalog "https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/mcp-server/catalog.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_dash,node_streamlit,node_reflex,node_reflex_pages,node_reflex_layout,node_reflex_tabs toneBlue
class node_tables_volumes,node_compute_jobs,node_ai_genai,node_identity_connections,node_database toneAmber
class node_fastapi_app,node_fastapi_routes,node_lakebase_config,node_error_handlers toneMint
class node_cookbook_mcp,node_recipe_catalog toneRose
class node_developer,node_databricks,node_coding_agent toneIndigo
```

## Components

### App Examples

- [Dash app](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/dash): `dash`
- [Streamlit app](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/streamlit): `streamlit`
- [Reflex app](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/reflex/app): `reflex/app`
- [Reflex recipes](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/reflex/app/pages): `reflex/app/pages`
- [Shared page layout](https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/reflex/app/components/page_layout.py): `reflex/app/components/page_layout.py`
- [Recipe tabs](https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/reflex/app/components/tabbed_page_template.py): `reflex/app/components/tabbed_page_template.py`

### Recipe Capabilities

- [Tables and volumes](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/streamlit/views): `streamlit/views`
- [Compute and workflows](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/dash/pages): `dash/pages`
- [AI and Genie](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/reflex/app/pages): `reflex/app/pages`
- [Identity and connections](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/reflex/app/pages): `reflex/app/pages`

### FastAPI Example

- [FastAPI application](https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/fastapi/app.py): `fastapi/app.py`
- [Versioned API routes](https://github.com/databricks-solutions/databricks-apps-cookbook/tree/main/fastapi/routes/v1): `fastapi/routes/v1`
- [Lakebase database config](https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/fastapi/config/database.py): `fastapi/config/database.py`
- [Error handlers](https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/fastapi/errors/handlers.py): `fastapi/errors/handlers.py`

### Agent Recipe Tools

- [Recipe MCP server](https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/mcp-server/server.py): `mcp-server/server.py`
- [Recipe and skill catalog](https://github.com/databricks-solutions/databricks-apps-cookbook/blob/main/mcp-server/catalog.py): `mcp-server/catalog.py`

### Other components

- **App developer**
- **Databricks workspace**
- **Lakebase database**
- **Coding agent**

## Connections

- App developer → Dash app: uses recipes
- App developer → Streamlit app: uses recipes
- App developer → Reflex app: uses recipes
- App developer → FastAPI application: uses recipes
- Dash app → Tables and volumes: offers examples
- Streamlit app → Tables and volumes: offers examples
- Dash app → Compute and workflows: offers examples
- Streamlit app → AI and Genie: offers examples
- Reflex app → Reflex recipes: registers pages (evidence: `reflex/app/app.py`)
- Reflex recipes → Shared page layout: uses layout (evidence: `reflex/app/pages/oltp_database.py`)
- Reflex recipes → Recipe tabs: uses template (evidence: `reflex/app/pages/oltp_database.py`)
- Reflex recipes → AI and Genie: includes recipes
- Reflex recipes → Identity and connections: includes recipes
- Dash app → Databricks workspace: accesses platform
- Streamlit app → Databricks workspace: accesses platform
- Reflex app → Databricks workspace: accesses platform
- FastAPI application → Versioned API routes: includes router (evidence: `fastapi/app.py`)
- FastAPI application → Lakebase database config: initializes database (evidence: `fastapi/app.py`)
- FastAPI application → Error handlers: registers handlers (evidence: `fastapi/app.py`)
- Versioned API routes → Lakebase database: serves database APIs
- Lakebase database config → Databricks workspace: gets credentials (evidence: `fastapi/config/database.py`)
- Lakebase database config → Lakebase database: connects to (evidence: `fastapi/config/database.py`)
- Coding agent → Recipe MCP server: requests recipes
- Recipe MCP server → Recipe and skill catalog: calls catalog (evidence: `mcp-server/server.py`)
