# adhnanjeff/ai_dashboard architecture

> Architecture diagram of the GitHub repository adhnanjeff/ai_dashboard, 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/adhnanjeff/ai_dashboard
- Repository: https://github.com/adhnanjeff/ai_dashboard

## Overview

This repository is an agent-work orchestration product with a web dashboard. Users create sessions and workflows, route work to provider-backed agents, review approvals and results, and manage memory, checkpoints, and Git worktrees. The API server is the orchestration entry point; its sampled setup wires scheduling, provider management, memory, worktrees, and resume services. The graph preserves documented-in-code capability modules even where their implementation was not sampled; those relationships are omitted or marked unverified rather than inferred as call chains.

Main entry points: [`services/orchestrator/src/api/server.ts`](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/api/server.ts) (HTTP API), [`services/orchestrator/src/routing/scheduler.ts`](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/routing/scheduler.ts) (Run scheduler), [`services/orchestrator/src/workflows/engine.ts`](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/workflows/engine.ts) (Workflow engine), [`services/orchestrator/src/checkpoints/resume-service.ts`](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/checkpoints/resume-service.ts) (Resume service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_dashboard["Web dashboard<br/>[Overview.tsx]"]
  node_sessionui["Session views<br/>[SessionView.tsx]"]
  node_newsession["New session<br/>[NewSession.tsx]"]
  node_apiclient["API client<br/>[api.ts]"]
end

subgraph group_orchestration["Orchestration"]
  node_api["HTTP API<br/>[server.ts]"]
  node_scheduler["Run scheduler<br/>[scheduler.ts]"]
  node_router["Provider routing<br/>[router.ts]"]
  node_supervisor["Agent supervisor<br/>[supervisor.ts]"]
  node_providers["Provider accounts<br/>[accounts.ts]"]
  node_policy["Policy and approvals<br/>[policy-service.ts]"]
end

subgraph group_work["Work State"]
  node_store[("Persistent state<br/>[store.ts]")]
  node_checkpoints["Checkpoints"]
  node_resume["Resume service<br/>[resume-service.ts]"]
  node_worktrees["Git worktrees"]
end

subgraph group_extensions["Product Capabilities"]
  node_memory["Project memory<br/>[memory-service.ts]"]
  node_workflow["Workflow engine<br/>[engine.ts]"]
  node_indexer["Repository indexing<br/>[indexer.ts]"]
  node_factory["Factory snapshots<br/>[snapshot.ts]"]
end

node_user(("User"))
node_external{{"Agent provider"}}

node_user -->|"starts work"| node_newsession
node_user -->|"reviews work"| node_dashboard
node_newsession -->|"submits requests"| node_apiclient
node_sessionui -->|"loads session data"| node_apiclient
node_apiclient -.->|"HTTP requests"| node_api
node_api -->|"constructs scheduler"| node_scheduler
node_api -->|"constructs router"| node_router
node_api -->|"constructs provider service"| node_providers
node_api -->|"constructs resumer"| node_resume
node_api -->|"constructs memory service"| node_memory
node_api -->|"constructs worktree service"| node_worktrees
node_scheduler -->|"uses routing"| node_router
node_scheduler -->|"uses providers"| node_providers
node_scheduler -.->|"dispatches runs"| node_supervisor
node_supervisor -.->|"runs agent"| node_external
node_api -.->|"reads and writes"| node_store
node_resume -->|"schedules resume"| node_scheduler
node_resume -->|"resumes runs"| node_supervisor
node_resume -->|"checks checkpoints"| node_checkpoints
node_checkpoints -->|"stores checkpoint state"| node_store
node_checkpoints -.->|"includes memory"| node_memory
node_worktrees -->|"records worktrees"| node_store
node_workflow -->|"schedules steps"| node_scheduler
node_workflow -->|"runs steps"| node_supervisor
node_workflow -->|"uses worktrees"| node_worktrees
node_workflow -->|"uses memory"| node_memory
node_indexer -->|"indexes memory"| node_memory
node_indexer -->|"uses Git admin"| node_worktrees
node_api -.->|"enforces policy"| node_policy
node_api -.->|"serves snapshots"| node_factory

click node_dashboard "https://github.com/adhnanjeff/ai_dashboard/blob/main/apps/dashboard/components/Overview.tsx"
click node_sessionui "https://github.com/adhnanjeff/ai_dashboard/blob/main/apps/dashboard/components/SessionView.tsx"
click node_newsession "https://github.com/adhnanjeff/ai_dashboard/blob/main/apps/dashboard/components/NewSession.tsx"
click node_apiclient "https://github.com/adhnanjeff/ai_dashboard/blob/main/apps/dashboard/lib/api.ts"
click node_api "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/api/server.ts"
click node_scheduler "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/routing/scheduler.ts"
click node_router "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/routing/router.ts"
click node_supervisor "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/runtime/process-manager/supervisor.ts"
click node_providers "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/providers/accounts.ts"
click node_policy "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/policy/policy-service.ts"
click node_store "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/storage/store.ts"
click node_checkpoints "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/checkpoints/checkpoint-service.ts"
click node_resume "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/checkpoints/resume-service.ts"
click node_worktrees "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/worktrees/worktree-service.ts"
click node_memory "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/memory/memory-service.ts"
click node_workflow "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/workflows/engine.ts"
click node_indexer "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/indexing/indexer.ts"
click node_factory "https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/factory/snapshot.ts"

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_sessionui,node_newsession,node_apiclient,node_user toneBlue
class node_api,node_scheduler,node_router,node_supervisor,node_providers,node_policy toneAmber
class node_store,node_checkpoints,node_resume,node_worktrees toneMint
class node_memory,node_workflow,node_indexer,node_factory toneRose
class node_external toneIndigo
```

## Components

### Dashboard

- [Web dashboard](https://github.com/adhnanjeff/ai_dashboard/blob/main/apps/dashboard/components/Overview.tsx): `apps/dashboard/components/Overview.tsx`
- [Session views](https://github.com/adhnanjeff/ai_dashboard/blob/main/apps/dashboard/components/SessionView.tsx): `apps/dashboard/components/SessionView.tsx`
- [New session](https://github.com/adhnanjeff/ai_dashboard/blob/main/apps/dashboard/components/NewSession.tsx): `apps/dashboard/components/NewSession.tsx`
- [API client](https://github.com/adhnanjeff/ai_dashboard/blob/main/apps/dashboard/lib/api.ts): `apps/dashboard/lib/api.ts`

### Orchestration

- [HTTP API](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/api/server.ts): `services/orchestrator/src/api/server.ts`
- [Run scheduler](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/routing/scheduler.ts): `services/orchestrator/src/routing/scheduler.ts`
- [Provider routing](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/routing/router.ts): `services/orchestrator/src/routing/router.ts`
- [Agent supervisor](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/runtime/process-manager/supervisor.ts): `services/orchestrator/src/runtime/process-manager/supervisor.ts`
- [Provider accounts](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/providers/accounts.ts): `services/orchestrator/src/providers/accounts.ts`
- [Policy and approvals](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/policy/policy-service.ts): `services/orchestrator/src/policy/policy-service.ts`

### Work State

- [Persistent state](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/storage/store.ts): `services/orchestrator/src/storage/store.ts`
- [Checkpoints](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/checkpoints/checkpoint-service.ts): `services/orchestrator/src/checkpoints/checkpoint-service.ts`
- [Resume service](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/checkpoints/resume-service.ts): `services/orchestrator/src/checkpoints/resume-service.ts`
- [Git worktrees](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/worktrees/worktree-service.ts): `services/orchestrator/src/worktrees/worktree-service.ts`

### Product Capabilities

- [Project memory](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/memory/memory-service.ts): `services/orchestrator/src/memory/memory-service.ts`
- [Workflow engine](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/workflows/engine.ts): `services/orchestrator/src/workflows/engine.ts`
- [Repository indexing](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/indexing/indexer.ts): `services/orchestrator/src/indexing/indexer.ts`
- [Factory snapshots](https://github.com/adhnanjeff/ai_dashboard/blob/main/services/orchestrator/src/factory/snapshot.ts): `services/orchestrator/src/factory/snapshot.ts`

### Other components

- **User**
- **Agent provider**

## Connections

- User → New session: starts work (evidence: `apps/dashboard/components/NewSession.tsx`)
- User → Web dashboard: reviews work
- New session → API client: submits requests (evidence: `apps/dashboard/components/NewSession.tsx`)
- Session views → API client: loads session data (evidence: `apps/dashboard/components/SessionView.tsx`)
- API client → HTTP API: HTTP requests
- HTTP API → Run scheduler: constructs scheduler (evidence: `services/orchestrator/src/api/server.ts`)
- HTTP API → Provider routing: constructs router (evidence: `services/orchestrator/src/api/server.ts`)
- HTTP API → Provider accounts: constructs provider service (evidence: `services/orchestrator/src/api/server.ts`)
- HTTP API → Resume service: constructs resumer (evidence: `services/orchestrator/src/api/server.ts`)
- HTTP API → Project memory: constructs memory service (evidence: `services/orchestrator/src/api/server.ts`)
- HTTP API → Git worktrees: constructs worktree service (evidence: `services/orchestrator/src/api/server.ts`)
- Run scheduler → Provider routing: uses routing (evidence: `services/orchestrator/src/api/server.ts`)
- Run scheduler → Provider accounts: uses providers (evidence: `services/orchestrator/src/api/server.ts`)
- Run scheduler → Agent supervisor: dispatches runs (evidence: `services/orchestrator/src/routing/scheduler.ts`)
- Agent supervisor → Agent provider: runs agent
- HTTP API → Persistent state: reads and writes (evidence: `services/orchestrator/src/api/server.ts`)
- Resume service → Run scheduler: schedules resume (evidence: `services/orchestrator/src/checkpoints/resume-service.ts`)
- Resume service → Agent supervisor: resumes runs (evidence: `services/orchestrator/src/checkpoints/resume-service.ts`)
- Resume service → Checkpoints: checks checkpoints (evidence: `services/orchestrator/src/checkpoints/resume-service.ts`)
- Checkpoints → Persistent state: stores checkpoint state (evidence: `services/orchestrator/src/checkpoints/checkpoint-service.ts`)
- Checkpoints → Project memory: includes memory (evidence: `services/orchestrator/src/memory/memory-service.ts`)
- Git worktrees → Persistent state: records worktrees (evidence: `services/orchestrator/src/worktrees/worktree-service.ts`)
- Workflow engine → Run scheduler: schedules steps (evidence: `services/orchestrator/src/workflows/engine.ts`)
- Workflow engine → Agent supervisor: runs steps (evidence: `services/orchestrator/src/workflows/engine.ts`)
- Workflow engine → Git worktrees: uses worktrees (evidence: `services/orchestrator/src/workflows/engine.ts`)
- Workflow engine → Project memory: uses memory (evidence: `services/orchestrator/src/workflows/engine.ts`)
- Repository indexing → Project memory: indexes memory (evidence: `services/orchestrator/src/indexing/indexer.ts`)
- Repository indexing → Git worktrees: uses Git admin (evidence: `services/orchestrator/src/indexing/indexer.ts`)
- HTTP API → Policy and approvals: enforces policy (evidence: `services/orchestrator/src/api/server.ts`)
- HTTP API → Factory snapshots: serves snapshots (evidence: `services/orchestrator/src/api/server.ts`)
