# databricks-solutions/data-intelligence-for-smarter-community architecture

> Architecture diagram of the GitHub repository databricks-solutions/data-intelligence-for-smarter-community, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/databricks-solutions/data-intelligence-for-smarter-community
- Repository: https://github.com/databricks-solutions/data-intelligence-for-smarter-community

## Overview

This repository is a Databricks hands-on accelerator for turning synthetic telco/IoT telemetry and UBC geodata into smart-community analytics and a campus-map app. The documented workflow moves through Bronze generation, Silver cleanup, Gold serving tables, AI/BI dashboards, Genie Q&A, and app deployment. The reference app serves map and telemetry data and can ask Genie questions. Notebook-to-notebook links follow the README’s stated lab order; app internals are shown only where excerpts or the source index support them.

Main entry points: [`workshop/Includes/reference_code/app/app.py`](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/app.py) (FastAPI app), [`workshop/02 - Hands On - Clean & Transform.py`](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/02%20-%20Hands%20On%20-%20Clean%20%26%20Transform.py) (Clean to Silver), [`workshop/Includes/reference_code/app/server/sql.py`](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/sql.py) (SQL execution), [`workshop/00 - Course Overview.py`](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/00%20-%20Course%20Overview.py) (Course overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workshop["Workshop workflow"]
  node_overview["Course overview"]
  node_setup["Workspace setup"]
  node_profile["Profile data"]
  node_clean["Clean to Silver"]
  node_deploy["Deploy app"]
end

subgraph group_data["Data preparation"]
  node_generate["Generate Bronze"]
  node_bronze[("Bronze tables")]
  node_geodata["UBC geodata"]
  node_silver[("Silver tables")]
  node_gold[("Gold serving tables")]
end

subgraph group_analytics["Analytics and Q&amp;A"]
  node_dashboard["AI/BI dashboard"]
  node_genie_setup["Genie space setup"]
end

subgraph group_application["Reference app"]
  node_app["FastAPI app<br/>[app.py]"]
  node_datasets["Dataset queries<br/>[datasets.py]"]
  node_geometry["Map geometry<br/>[geometry.py]"]
  node_genie_client["Genie client<br/>[genie.py]"]
  node_sql["SQL execution<br/>[sql.py]"]
  node_config["App configuration<br/>[config.py]"]
  node_campus_map["Campus map app"]
end

subgraph group_platform["Databricks services"]
  node_unity_catalog[("Unity Catalog")]
  node_warehouse[("SQL warehouse")]
  node_genie_service["Genie service"]
end

node_learner(("Workshop user"))
node_workspace_user(("Workspace user"))

node_learner -->|"starts course"| node_overview
node_overview -->|"provisions workspace"| node_setup
node_setup -->|"invokes generation"| node_generate
node_generate -->|"writes tables"| node_bronze
node_overview -->|"begins labs"| node_profile
node_profile -->|"profiles data"| node_bronze
node_profile -->|"continues to"| node_clean
node_clean -->|"loads geodata"| node_geodata
node_clean -->|"reads raw tables"| node_bronze
node_clean -->|"writes cleaned tables"| node_silver
node_clean -->|"continues to"| node_dashboard
node_dashboard -->|"continues to"| node_gold
node_gold -->|"continues to"| node_genie_setup
node_genie_setup -->|"provides Genie ID"| node_deploy
node_deploy -->|"deploys reference app"| node_app
node_deploy -->|"publishes app"| node_campus_map
node_campus_map -->|"serves map and Q&amp;A"| node_workspace_user
node_app -->|"routes data requests"| node_datasets
node_app -->|"gets map polygons"| node_geometry
node_app -->|"forwards questions"| node_genie_client
node_datasets -->|"runs queries"| node_sql
node_geometry -->|"reads table properties"| node_sql
node_sql -->|"gets connection settings"| node_config
node_genie_client -->|"gets workspace settings"| node_config
node_sql -->|"executes SQL"| node_warehouse
node_warehouse -.->|"queries tables"| node_unity_catalog
node_genie_client -->|"calls conversations API"| node_genie_service
node_app -->|"uses app data"| node_silver
node_app -.->|"asks Genie"| node_genie_service

click node_overview "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/00%20-%20Course%20Overview.py"
click node_setup "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/Classroom-Setup-Common.py"
click node_profile "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/01%20-%20Hands%20On%20-%20Explore%20%26%20Profile%20the%20Data.py"
click node_generate "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/smart_campus_generators.py"
click node_clean "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/02%20-%20Hands%20On%20-%20Clean%20%26%20Transform.py"
click node_geodata "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/tree/main/workshop/Includes/geojson"
click node_dashboard "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/03%20-%20Hands%20On%20-%20Visualize%20with%20AI-BI.py"
click node_gold "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/04%20-%20Hands%20On%20-%20Build%20Serving%20Tables.py"
click node_genie_setup "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/05%20-%20Hands%20On%20-%20Create%20a%20Genie%20Space.py"
click node_deploy "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/06%20-%20Hands%20On%20-%20Deploy%20the%20App.py"
click node_app "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/app.py"
click node_datasets "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/datasets.py"
click node_geometry "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/geometry.py"
click node_genie_client "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/genie.py"
click node_sql "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/sql.py"
click node_config "https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/config.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_overview,node_setup,node_profile,node_clean,node_deploy,node_learner,node_workspace_user toneBlue
class node_generate,node_bronze,node_geodata,node_silver,node_gold toneAmber
class node_dashboard,node_genie_setup toneMint
class node_app,node_datasets,node_geometry,node_genie_client,node_sql,node_config,node_campus_map toneRose
class node_unity_catalog,node_warehouse,node_genie_service toneIndigo
```

## Components

### Workshop workflow

- [Course overview](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/00%20-%20Course%20Overview.py): `workshop/00 - Course Overview.py`
- [Workspace setup](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/Classroom-Setup-Common.py): `workshop/Includes/Classroom-Setup-Common.py`
- [Profile data](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/01%20-%20Hands%20On%20-%20Explore%20%26%20Profile%20the%20Data.py): `workshop/01 - Hands On - Explore & Profile the Data.py`
- [Clean to Silver](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/02%20-%20Hands%20On%20-%20Clean%20%26%20Transform.py): `workshop/02 - Hands On - Clean & Transform.py`
- [Deploy app](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/06%20-%20Hands%20On%20-%20Deploy%20the%20App.py): `workshop/06 - Hands On - Deploy the App.py`

### Data preparation

- [Generate Bronze](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/smart_campus_generators.py): `workshop/Includes/smart_campus_generators.py`
- **Bronze tables**
- [UBC geodata](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/tree/main/workshop/Includes/geojson): `workshop/Includes/geojson`
- **Silver tables**
- [Gold serving tables](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/04%20-%20Hands%20On%20-%20Build%20Serving%20Tables.py): `workshop/04 - Hands On - Build Serving Tables.py`

### Analytics and Q&A

- [AI/BI dashboard](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/03%20-%20Hands%20On%20-%20Visualize%20with%20AI-BI.py): `workshop/03 - Hands On - Visualize with AI-BI.py`
- [Genie space setup](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/05%20-%20Hands%20On%20-%20Create%20a%20Genie%20Space.py): `workshop/05 - Hands On - Create a Genie Space.py`

### Reference app

- [FastAPI app](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/app.py): `workshop/Includes/reference_code/app/app.py`
- [Dataset queries](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/datasets.py): `workshop/Includes/reference_code/app/server/datasets.py`
- [Map geometry](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/geometry.py): `workshop/Includes/reference_code/app/server/geometry.py`
- [Genie client](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/genie.py): `workshop/Includes/reference_code/app/server/genie.py`
- [SQL execution](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/sql.py): `workshop/Includes/reference_code/app/server/sql.py`
- [App configuration](https://github.com/databricks-solutions/data-intelligence-for-smarter-community/blob/main/workshop/Includes/reference_code/app/server/config.py): `workshop/Includes/reference_code/app/server/config.py`
- **Campus map app**

### Databricks services

- **Unity Catalog**
- **SQL warehouse**
- **Genie service**

### Other components

- **Workshop user**
- **Workspace user**

## Connections

- Workshop user → Course overview: starts course (evidence: `README.md`)
- Course overview → Workspace setup: provisions workspace (evidence: `README.md`)
- Workspace setup → Generate Bronze: invokes generation (evidence: `workshop/Includes/Classroom-Setup-Common.py`)
- Generate Bronze → Bronze tables: writes tables (evidence: `workshop/Includes/smart_campus_generators.py`)
- Course overview → Profile data: begins labs (evidence: `README.md`)
- Profile data → Bronze tables: profiles data (evidence: `README.md`)
- Profile data → Clean to Silver: continues to (evidence: `README.md`)
- Clean to Silver → UBC geodata: loads geodata (evidence: `workshop/02 - Hands On - Clean & Transform.py`)
- Clean to Silver → Bronze tables: reads raw tables (evidence: `workshop/02 - Hands On - Clean & Transform.py`)
- Clean to Silver → Silver tables: writes cleaned tables (evidence: `workshop/02 - Hands On - Clean & Transform.py`)
- Clean to Silver → AI/BI dashboard: continues to (evidence: `README.md`)
- AI/BI dashboard → Gold serving tables: continues to (evidence: `README.md`)
- Gold serving tables → Genie space setup: continues to (evidence: `README.md`)
- Genie space setup → Deploy app: provides Genie ID (evidence: `README.md`)
- Deploy app → FastAPI app: deploys reference app (evidence: `workshop/06 - Hands On - Deploy the App.py`)
- Deploy app → Campus map app: publishes app (evidence: `README.md`)
- Campus map app → Workspace user: serves map and Q&A (evidence: `README.md`)
- FastAPI app → Dataset queries: routes data requests (evidence: `workshop/Includes/reference_code/app/app.py`)
- FastAPI app → Map geometry: gets map polygons (evidence: `workshop/Includes/reference_code/app/app.py`)
- FastAPI app → Genie client: forwards questions (evidence: `workshop/Includes/reference_code/app/app.py`)
- Dataset queries → SQL execution: runs queries (evidence: `workshop/Includes/reference_code/app/server/datasets.py`)
- Map geometry → SQL execution: reads table properties (evidence: `workshop/Includes/reference_code/app/server/geometry.py`)
- SQL execution → App configuration: gets connection settings (evidence: `workshop/Includes/reference_code/app/server/sql.py`)
- Genie client → App configuration: gets workspace settings (evidence: `workshop/Includes/reference_code/app/server/genie.py`)
- SQL execution → SQL warehouse: executes SQL (evidence: `workshop/Includes/reference_code/app/server/sql.py`)
- SQL warehouse → Unity Catalog: queries tables
- Genie client → Genie service: calls conversations API (evidence: `workshop/Includes/reference_code/app/server/genie.py`)
- FastAPI app → Silver tables: uses app data (evidence: `README.md`)
- FastAPI app → Genie service: asks Genie
