# cuneocode/ai-demo-studio architecture

> Architecture diagram of the GitHub repository cuneocode/ai-demo-studio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cuneocode/ai-demo-studio
- Repository: https://github.com/cuneocode/ai-demo-studio
- Video tour (about a minute): https://gitdiagram.com/cuneocode/ai-demo-studio/video

## Overview

AI Demo Studio is a multi-industry demo library and operator workspace. A presenter selects a library and use case, then runs it in Live or Emulated mode, explores its architecture, and reviews capacity planning. Shared operator capabilities configure models and integrations and manage demo services; run playback and timelines support demonstrations. The graph reflects documented capabilities and indexed or excerpted relationships; several UI and runtime details are unsampled, so their internal links are omitted.

Main entry points: [`services/wealth/research.py`](https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/research.py) (Research workflow), [`config/apps.ts`](https://github.com/cuneocode/ai-demo-studio/blob/main/config/apps.ts) (Industry libraries), [`app/run/useRun.ts`](https://github.com/cuneocode/ai-demo-studio/blob/main/app/run/useRun.ts) (Run coordination), [`app/studio/route.ts`](https://github.com/cuneocode/ai-demo-studio/blob/main/app/studio/route.ts) (Studio routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Libraries and navigation"]
  node_app_registry["Industry libraries<br/>[apps.ts]"]
  node_vertical_definitions["Library definitions"]
  node_demo_registry["Use-case registry<br/>[demos.ts]"]
  node_route_parser["Studio routing<br/>[route.ts]"]
end

subgraph group_experience["Demo experience"]
  node_demo_workspace["Use-case workspace"]
  node_architecture_explorer["Architecture explorer"]
  node_scene_navigation["Scene navigation<br/>[controller.ts]"]
  node_capacity_planning["Capacity planning"]
  node_emulated_run["Emulated playback"]
  node_emulated_transport["Emulated transport"]
  node_run_events["Run timeline events<br/>[events.ts]"]
  node_run_coordinator["Run coordination<br/>[useRun.ts]"]
  node_local_state[("Browser state<br/>[storage.ts]")]
end

subgraph group_operations["Operator controls"]
  node_operator_settings["Shared settings<br/>[StudioSettings.tsx]"]
  node_service_controls["Demo service controls"]
end

subgraph group_wealth["Wealth runtime"]
  node_wealth_api["Wealth API<br/>[server.py]"]
  node_wealth_research["Research workflow<br/>[research.py]"]
  node_wealth_agent["Research agent<br/>[research_agent.py]"]
  node_wealth_controls["Wealth controls<br/>[controls.py]"]
  node_wealth_evidence["Evidence handling<br/>[evidence.py]"]
  node_wealth_compliance["Compliance checks<br/>[compliance.py]"]
  node_wealth_models["Model integration<br/>[nim.py]"]
  node_wealth_runlog[("Run store<br/>[runlog.py]")]
end

node_presenter(("Presenter / operator"))

node_presenter -->|"selects library"| node_app_registry
node_app_registry -->|"loads definitions"| node_vertical_definitions
node_app_registry -->|"registers demos"| node_demo_registry
node_presenter -->|"opens workspace"| node_route_parser
node_route_parser -->|"resolves routes"| node_app_registry
node_route_parser -->|"checks demo IDs"| node_demo_registry
node_presenter -->|"runs use case"| node_demo_workspace
node_presenter -->|"opens architecture"| node_architecture_explorer
node_architecture_explorer -.->|"navigates scenes"| node_scene_navigation
node_presenter -->|"plans capacity"| node_capacity_planning
node_presenter -->|"plays capture"| node_emulated_run
node_emulated_run -->|"uses transport"| node_emulated_transport
node_run_coordinator -->|"uses events"| node_run_events
node_run_coordinator -->|"coordinates session"| node_emulated_run
node_run_coordinator -->|"reads and writes"| node_local_state
node_presenter -->|"configures services"| node_operator_settings
node_presenter -->|"starts demo stacks"| node_service_controls
node_wealth_api -->|"streams run timeline"| node_wealth_runlog
node_wealth_api -->|"invokes research"| node_wealth_research
node_wealth_research -->|"uses agent workflow"| node_wealth_agent
node_wealth_research -->|"checks controls"| node_wealth_controls
node_wealth_research -->|"builds evidence"| node_wealth_evidence
node_wealth_research -->|"checks compliance"| node_wealth_compliance
node_wealth_research -->|"uses model service"| node_wealth_models

click node_app_registry "https://github.com/cuneocode/ai-demo-studio/blob/main/config/apps.ts"
click node_vertical_definitions "https://github.com/cuneocode/ai-demo-studio/tree/main/verticals"
click node_demo_registry "https://github.com/cuneocode/ai-demo-studio/blob/main/config/demos.ts"
click node_route_parser "https://github.com/cuneocode/ai-demo-studio/blob/main/app/studio/route.ts"
click node_demo_workspace "https://github.com/cuneocode/ai-demo-studio/tree/main/app"
click node_architecture_explorer "https://github.com/cuneocode/ai-demo-studio/tree/main/app/map"
click node_scene_navigation "https://github.com/cuneocode/ai-demo-studio/blob/main/app/map/controller.ts"
click node_capacity_planning "https://github.com/cuneocode/ai-demo-studio/blob/main/app/CapacityPlanning.tsx"
click node_emulated_run "https://github.com/cuneocode/ai-demo-studio/blob/main/app/run/EmulatedSession.tsx"
click node_emulated_transport "https://github.com/cuneocode/ai-demo-studio/blob/main/app/run/emulated-transport.ts"
click node_run_events "https://github.com/cuneocode/ai-demo-studio/blob/main/app/run/events.ts"
click node_run_coordinator "https://github.com/cuneocode/ai-demo-studio/blob/main/app/run/useRun.ts"
click node_local_state "https://github.com/cuneocode/ai-demo-studio/blob/main/app/studio/storage.ts"
click node_operator_settings "https://github.com/cuneocode/ai-demo-studio/blob/main/app/StudioSettings.tsx"
click node_service_controls "https://github.com/cuneocode/ai-demo-studio/blob/main/app/OperatorWorkspace.tsx"
click node_wealth_api "https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/server.py"
click node_wealth_research "https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/research.py"
click node_wealth_agent "https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/research_agent.py"
click node_wealth_controls "https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/controls.py"
click node_wealth_evidence "https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/evidence.py"
click node_wealth_compliance "https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/compliance.py"
click node_wealth_models "https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/nim.py"
click node_wealth_runlog "https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/runlog.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_registry,node_vertical_definitions,node_demo_registry,node_route_parser toneBlue
class node_demo_workspace,node_architecture_explorer,node_scene_navigation,node_capacity_planning,node_emulated_run,node_emulated_transport,node_run_events,node_run_coordinator,node_local_state toneAmber
class node_operator_settings,node_service_controls toneMint
class node_wealth_api,node_wealth_research,node_wealth_agent,node_wealth_controls,node_wealth_evidence,node_wealth_compliance,node_wealth_models,node_wealth_runlog toneRose
class node_presenter toneIndigo
```

## Components

### Libraries and navigation

- [Industry libraries](https://github.com/cuneocode/ai-demo-studio/blob/main/config/apps.ts): `config/apps.ts`
- [Library definitions](https://github.com/cuneocode/ai-demo-studio/tree/main/verticals): `verticals`
- [Use-case registry](https://github.com/cuneocode/ai-demo-studio/blob/main/config/demos.ts): `config/demos.ts`
- [Studio routing](https://github.com/cuneocode/ai-demo-studio/blob/main/app/studio/route.ts): `app/studio/route.ts`

### Demo experience

- [Use-case workspace](https://github.com/cuneocode/ai-demo-studio/tree/main/app): `app`
- [Architecture explorer](https://github.com/cuneocode/ai-demo-studio/tree/main/app/map): `app/map`
- [Scene navigation](https://github.com/cuneocode/ai-demo-studio/blob/main/app/map/controller.ts): `app/map/controller.ts`
- [Capacity planning](https://github.com/cuneocode/ai-demo-studio/blob/main/app/CapacityPlanning.tsx): `app/CapacityPlanning.tsx`
- [Emulated playback](https://github.com/cuneocode/ai-demo-studio/blob/main/app/run/EmulatedSession.tsx): `app/run/EmulatedSession.tsx`
- [Emulated transport](https://github.com/cuneocode/ai-demo-studio/blob/main/app/run/emulated-transport.ts): `app/run/emulated-transport.ts`
- [Run timeline events](https://github.com/cuneocode/ai-demo-studio/blob/main/app/run/events.ts): `app/run/events.ts`
- [Run coordination](https://github.com/cuneocode/ai-demo-studio/blob/main/app/run/useRun.ts): `app/run/useRun.ts`
- [Browser state](https://github.com/cuneocode/ai-demo-studio/blob/main/app/studio/storage.ts): `app/studio/storage.ts`

### Operator controls

- [Shared settings](https://github.com/cuneocode/ai-demo-studio/blob/main/app/StudioSettings.tsx): `app/StudioSettings.tsx`
- [Demo service controls](https://github.com/cuneocode/ai-demo-studio/blob/main/app/OperatorWorkspace.tsx): `app/OperatorWorkspace.tsx`

### Wealth runtime

- [Wealth API](https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/server.py): `services/wealth/server.py`
- [Research workflow](https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/research.py): `services/wealth/research.py`
- [Research agent](https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/research_agent.py): `services/wealth/research_agent.py`
- [Wealth controls](https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/controls.py): `services/wealth/controls.py`
- [Evidence handling](https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/evidence.py): `services/wealth/evidence.py`
- [Compliance checks](https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/compliance.py): `services/wealth/compliance.py`
- [Model integration](https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/nim.py): `services/wealth/nim.py`
- [Run store](https://github.com/cuneocode/ai-demo-studio/blob/main/services/wealth/runlog.py): `services/wealth/runlog.py`

### Other components

- **Presenter / operator**

## Connections

- Presenter / operator → Industry libraries: selects library (evidence: `README.md`)
- Industry libraries → Library definitions: loads definitions (evidence: `config/apps.ts`)
- Industry libraries → Use-case registry: registers demos (evidence: `config/apps.ts`)
- Presenter / operator → Studio routing: opens workspace (evidence: `README.md`)
- Studio routing → Industry libraries: resolves routes (evidence: `app/studio/route.ts`)
- Studio routing → Use-case registry: checks demo IDs (evidence: `app/studio/route.ts`)
- Presenter / operator → Use-case workspace: runs use case (evidence: `README.md`)
- Presenter / operator → Architecture explorer: opens architecture (evidence: `README.md`)
- Architecture explorer → Scene navigation: navigates scenes (evidence: `app/map/controller.ts`)
- Presenter / operator → Capacity planning: plans capacity (evidence: `README.md`)
- Presenter / operator → Emulated playback: plays capture (evidence: `README.md`)
- Emulated playback → Emulated transport: uses transport (evidence: `app/run/EmulatedSession.tsx`)
- Run coordination → Run timeline events: uses events (evidence: `app/run/useRun.ts`)
- Run coordination → Emulated playback: coordinates session (evidence: `app/run/useRun.ts`)
- Run coordination → Browser state: reads and writes (evidence: `app/run/useRun.ts`)
- Presenter / operator → Shared settings: configures services (evidence: `README.md`)
- Presenter / operator → Demo service controls: starts demo stacks (evidence: `README.md`)
- Wealth API → Run store: streams run timeline (evidence: `services/wealth/server.py`)
- Wealth API → Research workflow: invokes research (evidence: `services/wealth/server.py`)
- Research workflow → Research agent: uses agent workflow (evidence: `services/wealth/research.py`)
- Research workflow → Wealth controls: checks controls (evidence: `services/wealth/research.py`)
- Research workflow → Evidence handling: builds evidence (evidence: `services/wealth/research.py`)
- Research workflow → Compliance checks: checks compliance (evidence: `services/wealth/research.py`)
- Research workflow → Model integration: uses model service (evidence: `services/wealth/research.py`)
