# dougmaitelli/dockdash architecture

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

- Interactive diagram: https://gitdiagram.com/dougmaitelli/dockdash
- Repository: https://github.com/dougmaitelli/dockdash

## Overview

DockDash is a self-hosted dashboard for discovering and managing services and monitoring container updates, health, and resources. The principal workflow is to view or discover services, inspect their status and available updates, and manage them from the dashboard. The graph includes the client, API routes, persistence, monitoring, and container-runtime layers, plus documented discovery and management capabilities. Several feature paths are based on README descriptions because their implementation excerpts were not provided; those connections are marked unverified where needed.

Main entry points: [`src/server/routes/services.ts`](https://github.com/dougmaitelli/dockdash/blob/master/src/server/routes/services.ts) (Service routes), [`src/server/services/containerRuntime/containerRuntimeService.ts`](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/containerRuntime/containerRuntimeService.ts) (Container runtime dispatch), [`src/server/db/serviceRepository.ts`](https://github.com/dougmaitelli/dockdash/blob/master/src/server/db/serviceRepository.ts) (Service repository), [`src/server/services/updateCheckerService.ts`](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/updateCheckerService.ts) (Version update checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Dashboard client"]
  node_app["Web application<br/>[App.tsx]"]
  node_service_ui["Service management<br/>[Services.tsx]"]
  node_service_drawer["Service details<br/>[ServiceDrawer.tsx]"]
  node_health_graph["Health history view"]
  node_topology["Topology canvas"]
  node_api_client["Client API<br/>[api.ts]"]
end

subgraph group_server["API and services"]
  node_server["HTTP server<br/>[index.ts]"]
  node_service_routes["Service routes<br/>[services.ts]"]
  node_container_routes["Container controls<br/>[container.ts]"]
  node_runtime_service["Container runtime dispatch"]
  node_docker_runtime["Docker runtime<br/>[dockerRuntime.ts]"]
  node_kube_runtime["Kubernetes runtime"]
end

subgraph group_monitoring["Monitoring and updates"]
  node_health_service["Health checks"]
  node_resource_service["Resource monitoring"]
  node_updates["Version update checks"]
  node_registry["Image registries<br/>[registryClient.ts]"]
  node_changelog["Release changelogs"]
  node_notifications["Notifications"]
end

subgraph group_discovery["Discovery and topology"]
  node_discovery_routes["Discovery routes<br/>[discovery.ts]"]
  node_scanner["Network scanner<br/>[networkScanner.ts]"]
  node_docker_discovery["Docker discovery<br/>[dockerRuntime.ts]"]
end

subgraph group_storage["Persistent state"]
  node_service_repo["Service repository"]
  node_history_repo["History repository"]
  node_database[("SQLite database<br/>[connection.ts]")]
end

node_user(("Operator"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_service_ui
node_service_ui -->|"opens"| node_service_drawer
node_service_drawer -->|"renders"| node_health_graph
node_user -->|"arranges services"| node_topology
node_service_ui -.->|"requests data"| node_api_client
node_server -.->|"routes requests"| node_service_routes
node_service_routes -->|"reads and writes"| node_service_repo
node_service_routes -->|"adds source names"| node_runtime_service
node_service_repo -->|"persists services"| node_database
node_history_repo -->|"persists history"| node_database
node_health_service -->|"records health"| node_history_repo
node_health_service -->|"checks services"| node_service_repo
node_resource_service -->|"records resources"| node_history_repo
node_resource_service -->|"collects metrics"| node_runtime_service
node_runtime_service -->|"dispatches to"| node_docker_runtime
node_runtime_service -->|"dispatches to"| node_kube_runtime
node_container_routes -.->|"controls containers"| node_runtime_service
node_service_routes -->|"checks health"| node_health_service
node_service_routes -->|"gets metrics"| node_resource_service
node_updates -->|"checks tags"| node_registry
node_updates -->|"sends updates"| node_notifications
node_updates -->|"fetches notes"| node_changelog
node_user -->|"starts discovery"| node_discovery_routes
node_discovery_routes -.->|"scans networks"| node_scanner
node_discovery_routes -.->|"scans Docker hosts"| node_docker_discovery
node_docker_discovery -.->|"imports services"| node_service_repo

click node_app "https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/App.tsx"
click node_service_ui "https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/pages/Services.tsx"
click node_service_drawer "https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/components/modals/ServiceDrawer.tsx"
click node_health_graph "https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/components/HealthHistoryGraph.tsx"
click node_topology "https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/components/dashboard/DashboardCanvas.tsx"
click node_api_client "https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/services/api.ts"
click node_server "https://github.com/dougmaitelli/dockdash/blob/master/src/server/index.ts"
click node_service_routes "https://github.com/dougmaitelli/dockdash/blob/master/src/server/routes/services.ts"
click node_discovery_routes "https://github.com/dougmaitelli/dockdash/blob/master/src/server/routes/discovery.ts"
click node_container_routes "https://github.com/dougmaitelli/dockdash/blob/master/src/server/routes/container.ts"
click node_service_repo "https://github.com/dougmaitelli/dockdash/blob/master/src/server/db/serviceRepository.ts"
click node_history_repo "https://github.com/dougmaitelli/dockdash/blob/master/src/server/db/historyRepository.ts"
click node_database "https://github.com/dougmaitelli/dockdash/blob/master/src/server/db/connection.ts"
click node_health_service "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/healthCheckService.ts"
click node_resource_service "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/resourceStatsService.ts"
click node_runtime_service "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/containerRuntime/containerRuntimeService.ts"
click node_docker_runtime "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/containerRuntime/dockerRuntime.ts"
click node_kube_runtime "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/containerRuntime/kubernetesRuntime.ts"
click node_updates "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/updateCheckerService.ts"
click node_registry "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/registryClient.ts"
click node_changelog "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/changelogService.ts"
click node_notifications "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/notificationService.ts"
click node_scanner "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/networkScanner.ts"
click node_docker_discovery "https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/containerRuntime/dockerRuntime.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_app,node_service_ui,node_service_drawer,node_health_graph,node_topology,node_api_client toneBlue
class node_server,node_service_routes,node_container_routes,node_runtime_service,node_docker_runtime,node_kube_runtime toneAmber
class node_health_service,node_resource_service,node_updates,node_registry,node_changelog,node_notifications toneMint
class node_discovery_routes,node_scanner,node_docker_discovery toneRose
class node_service_repo,node_history_repo,node_database,node_user toneIndigo
```

## Components

### Dashboard client

- [Web application](https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/App.tsx): `src/client/src/App.tsx`
- [Service management](https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/pages/Services.tsx): `src/client/src/pages/Services.tsx`
- [Service details](https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/components/modals/ServiceDrawer.tsx): `src/client/src/components/modals/ServiceDrawer.tsx`
- [Health history view](https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/components/HealthHistoryGraph.tsx): `src/client/src/components/HealthHistoryGraph.tsx`
- [Topology canvas](https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/components/dashboard/DashboardCanvas.tsx): `src/client/src/components/dashboard/DashboardCanvas.tsx`
- [Client API](https://github.com/dougmaitelli/dockdash/blob/master/src/client/src/services/api.ts): `src/client/src/services/api.ts`

### API and services

- [HTTP server](https://github.com/dougmaitelli/dockdash/blob/master/src/server/index.ts): `src/server/index.ts`
- [Service routes](https://github.com/dougmaitelli/dockdash/blob/master/src/server/routes/services.ts): `src/server/routes/services.ts`
- [Container controls](https://github.com/dougmaitelli/dockdash/blob/master/src/server/routes/container.ts): `src/server/routes/container.ts`
- [Container runtime dispatch](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/containerRuntime/containerRuntimeService.ts): `src/server/services/containerRuntime/containerRuntimeService.ts`
- [Docker runtime](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/containerRuntime/dockerRuntime.ts): `src/server/services/containerRuntime/dockerRuntime.ts`
- [Kubernetes runtime](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/containerRuntime/kubernetesRuntime.ts): `src/server/services/containerRuntime/kubernetesRuntime.ts`

### Monitoring and updates

- [Health checks](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/healthCheckService.ts): `src/server/services/healthCheckService.ts`
- [Resource monitoring](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/resourceStatsService.ts): `src/server/services/resourceStatsService.ts`
- [Version update checks](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/updateCheckerService.ts): `src/server/services/updateCheckerService.ts`
- [Image registries](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/registryClient.ts): `src/server/services/registryClient.ts`
- [Release changelogs](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/changelogService.ts): `src/server/services/changelogService.ts`
- [Notifications](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/notificationService.ts): `src/server/services/notificationService.ts`

### Discovery and topology

- [Discovery routes](https://github.com/dougmaitelli/dockdash/blob/master/src/server/routes/discovery.ts): `src/server/routes/discovery.ts`
- [Network scanner](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/networkScanner.ts): `src/server/services/networkScanner.ts`
- [Docker discovery](https://github.com/dougmaitelli/dockdash/blob/master/src/server/services/containerRuntime/dockerRuntime.ts): `src/server/services/containerRuntime/dockerRuntime.ts`

### Persistent state

- [Service repository](https://github.com/dougmaitelli/dockdash/blob/master/src/server/db/serviceRepository.ts): `src/server/db/serviceRepository.ts`
- [History repository](https://github.com/dougmaitelli/dockdash/blob/master/src/server/db/historyRepository.ts): `src/server/db/historyRepository.ts`
- [SQLite database](https://github.com/dougmaitelli/dockdash/blob/master/src/server/db/connection.ts): `src/server/db/connection.ts`

### Other components

- **Operator**

## Connections

- Operator → Web application: uses (evidence: `README.md`)
- Web application → Service management: routes to (evidence: `src/client/src/App.tsx`)
- Service management → Service details: opens (evidence: `src/client/src/pages/Services.tsx`)
- Service details → Health history view: renders
- Operator → Topology canvas: arranges services (evidence: `README.md`)
- Service management → Client API: requests data
- HTTP server → Service routes: routes requests (evidence: `src/server/index.ts`)
- Service routes → Service repository: reads and writes (evidence: `src/server/routes/services.ts`)
- Service routes → Container runtime dispatch: adds source names (evidence: `src/server/routes/services.ts`)
- Service repository → SQLite database: persists services (evidence: `src/server/db/serviceRepository.ts`)
- History repository → SQLite database: persists history (evidence: `src/server/db/historyRepository.ts`)
- Health checks → History repository: records health (evidence: `src/server/services/healthCheckService.ts`)
- Health checks → Service repository: checks services (evidence: `src/server/services/healthCheckService.ts`)
- Resource monitoring → History repository: records resources (evidence: `src/server/services/resourceStatsService.ts`)
- Resource monitoring → Container runtime dispatch: collects metrics (evidence: `src/server/services/resourceStatsService.ts`)
- Container runtime dispatch → Docker runtime: dispatches to (evidence: `src/server/services/containerRuntime/containerRuntimeService.ts`)
- Container runtime dispatch → Kubernetes runtime: dispatches to (evidence: `src/server/services/containerRuntime/containerRuntimeService.ts`)
- Container controls → Container runtime dispatch: controls containers
- Service routes → Health checks: checks health (evidence: `src/server/routes/services.ts`)
- Service routes → Resource monitoring: gets metrics (evidence: `src/server/routes/services.ts`)
- Version update checks → Image registries: checks tags (evidence: `README.md`)
- Version update checks → Notifications: sends updates (evidence: `README.md`)
- Version update checks → Release changelogs: fetches notes (evidence: `README.md`)
- Operator → Discovery routes: starts discovery (evidence: `README.md`)
- Discovery routes → Network scanner: scans networks
- Discovery routes → Docker discovery: scans Docker hosts
- Docker discovery → Service repository: imports services
