# drumilbhati/damascus architecture

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

- Interactive diagram: https://gitdiagram.com/drumilbhati/damascus
- Repository: https://github.com/drumilbhati/damascus

## Overview

DAMASCUS is a resilience and capacity-testing control platform with a web dashboard. Users can create and run experiments against a separately operated target mesh; the manager coordinates load generation and telemetry observation, then analyzes capacity and produces a report. The repository also contains dependency analysis, telemetry-source and observability components, and an autorun feature. The sampled manager code supports its orchestration links; the README identifies the separately operated target and observability services. Several API and feature implementations were not sampled, so their runtime connections are not inferred.

Main entry points: [`internal/experiment/manager.go`](https://github.com/drumilbhati/damascus/blob/main/internal/experiment/manager.go) (Experiment Manager), [`web/src/router/index.tsx`](https://github.com/drumilbhati/damascus/blob/main/web/src/router/index.tsx) (App Router), [`internal/watcher/watcher.go`](https://github.com/drumilbhati/damascus/blob/main/internal/watcher/watcher.go) (Telemetry Watcher), [`internal/stress/engine.go`](https://github.com/drumilbhati/damascus/blob/main/internal/stress/engine.go) (Load Generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Experiment Control"]
  node_api_routes["REST API Routes<br/>[routes.go]"]
  node_api_handlers["API Handlers<br/>[handler.go]"]
  node_experiment_manager["Experiment Manager<br/>[manager.go]"]
  node_stress_engine["Load Generator<br/>[engine.go]"]
  node_experiment_store[("Experiment Storage<br/>[postgres.go]")]
end

subgraph group_analysis["Analysis and Safety"]
  node_watcher["Telemetry Watcher<br/>[watcher.go]"]
  node_safety["Safety Controller<br/>[controller.go]"]
  node_capacity["Capacity Analyzer<br/>[analyzer.go]"]
  node_dependency_analysis["Dependency Analysis<br/>[analyser.go]"]
  node_reporting["Report Generator<br/>[generator.go]"]
end

subgraph group_web["Dashboard"]
  node_dashboard["Dashboard Pages<br/>[DashboardPage.tsx]"]
  node_experiment_ui["Experiment Views"]
  node_autorun_ui["Autorun View<br/>[AutoRunPage.tsx]"]
  node_dependencies_ui["Dependency View"]
  node_graph_view["Dependency Graph"]
  node_reports_ui["Report View<br/>[ReportsPage.tsx]"]
  node_router["App Router<br/>[index.tsx]"]
  node_app["Web App<br/>[App.tsx]"]
  node_api_client["API Client<br/>[client.ts]"]
end

subgraph group_integrations["External Systems"]
  node_target_mesh["Target Services"]
  node_prometheus["Prometheus"]
  node_jaeger["Jaeger"]
end

node_user(("Platform User"))

node_user -->|"uses"| node_dashboard
node_app -->|"renders routes"| node_router
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_experiment_ui
node_router -->|"routes to"| node_autorun_ui
node_router -->|"routes to"| node_dependencies_ui
node_router -->|"routes to"| node_reports_ui
node_dependencies_ui -.->|"displays graph"| node_graph_view
node_experiment_manager -->|"builds graph"| node_dependency_analysis
node_experiment_manager -->|"starts load"| node_stress_engine
node_experiment_manager -->|"starts watcher"| node_watcher
node_experiment_manager -->|"analyzes observations"| node_capacity
node_experiment_manager -->|"generates report"| node_reporting
node_experiment_manager -->|"reads and writes"| node_experiment_store
node_stress_engine -.->|"sends load"| node_target_mesh
node_watcher -.->|"queries metrics"| node_prometheus
node_watcher -.->|"reads traces"| node_jaeger

click node_dashboard "https://github.com/drumilbhati/damascus/blob/main/web/src/pages/DashboardPage.tsx"
click node_experiment_ui "https://github.com/drumilbhati/damascus/blob/main/web/src/pages/ExperimentsPage.tsx"
click node_autorun_ui "https://github.com/drumilbhati/damascus/blob/main/web/src/pages/AutoRunPage.tsx"
click node_dependencies_ui "https://github.com/drumilbhati/damascus/blob/main/web/src/pages/DependenciesPage.tsx"
click node_graph_view "https://github.com/drumilbhati/damascus/blob/main/web/src/components/DependencyGraph.tsx"
click node_reports_ui "https://github.com/drumilbhati/damascus/blob/main/web/src/pages/ReportsPage.tsx"
click node_router "https://github.com/drumilbhati/damascus/blob/main/web/src/router/index.tsx"
click node_app "https://github.com/drumilbhati/damascus/blob/main/web/src/App.tsx"
click node_api_client "https://github.com/drumilbhati/damascus/blob/main/web/src/api/client.ts"
click node_api_routes "https://github.com/drumilbhati/damascus/blob/main/internal/api/routes.go"
click node_api_handlers "https://github.com/drumilbhati/damascus/blob/main/internal/api/handler.go"
click node_experiment_manager "https://github.com/drumilbhati/damascus/blob/main/internal/experiment/manager.go"
click node_stress_engine "https://github.com/drumilbhati/damascus/blob/main/internal/stress/engine.go"
click node_watcher "https://github.com/drumilbhati/damascus/blob/main/internal/watcher/watcher.go"
click node_safety "https://github.com/drumilbhati/damascus/blob/main/internal/safety/controller.go"
click node_capacity "https://github.com/drumilbhati/damascus/blob/main/internal/capacity/analyzer.go"
click node_dependency_analysis "https://github.com/drumilbhati/damascus/blob/main/internal/graph/analyser.go"
click node_reporting "https://github.com/drumilbhati/damascus/blob/main/internal/report/generator.go"
click node_experiment_store "https://github.com/drumilbhati/damascus/blob/main/internal/storage/postgres.go"

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_api_routes,node_api_handlers,node_experiment_manager,node_stress_engine,node_experiment_store,node_user toneBlue
class node_watcher,node_safety,node_capacity,node_dependency_analysis,node_reporting toneAmber
class node_dashboard,node_experiment_ui,node_autorun_ui,node_dependencies_ui,node_graph_view,node_reports_ui,node_router,node_app,node_api_client toneMint
class node_target_mesh,node_prometheus,node_jaeger toneRose
```

## Components

### Experiment Control

- [REST API Routes](https://github.com/drumilbhati/damascus/blob/main/internal/api/routes.go): `internal/api/routes.go`
- [API Handlers](https://github.com/drumilbhati/damascus/blob/main/internal/api/handler.go): `internal/api/handler.go`
- [Experiment Manager](https://github.com/drumilbhati/damascus/blob/main/internal/experiment/manager.go): `internal/experiment/manager.go`
- [Load Generator](https://github.com/drumilbhati/damascus/blob/main/internal/stress/engine.go): `internal/stress/engine.go`
- [Experiment Storage](https://github.com/drumilbhati/damascus/blob/main/internal/storage/postgres.go): `internal/storage/postgres.go`

### Analysis and Safety

- [Telemetry Watcher](https://github.com/drumilbhati/damascus/blob/main/internal/watcher/watcher.go): `internal/watcher/watcher.go`
- [Safety Controller](https://github.com/drumilbhati/damascus/blob/main/internal/safety/controller.go): `internal/safety/controller.go`
- [Capacity Analyzer](https://github.com/drumilbhati/damascus/blob/main/internal/capacity/analyzer.go): `internal/capacity/analyzer.go`
- [Dependency Analysis](https://github.com/drumilbhati/damascus/blob/main/internal/graph/analyser.go): `internal/graph/analyser.go`
- [Report Generator](https://github.com/drumilbhati/damascus/blob/main/internal/report/generator.go): `internal/report/generator.go`

### Dashboard

- [Dashboard Pages](https://github.com/drumilbhati/damascus/blob/main/web/src/pages/DashboardPage.tsx): `web/src/pages/DashboardPage.tsx`
- [Experiment Views](https://github.com/drumilbhati/damascus/blob/main/web/src/pages/ExperimentsPage.tsx): `web/src/pages/ExperimentsPage.tsx`
- [Autorun View](https://github.com/drumilbhati/damascus/blob/main/web/src/pages/AutoRunPage.tsx): `web/src/pages/AutoRunPage.tsx`
- [Dependency View](https://github.com/drumilbhati/damascus/blob/main/web/src/pages/DependenciesPage.tsx): `web/src/pages/DependenciesPage.tsx`
- [Dependency Graph](https://github.com/drumilbhati/damascus/blob/main/web/src/components/DependencyGraph.tsx): `web/src/components/DependencyGraph.tsx`
- [Report View](https://github.com/drumilbhati/damascus/blob/main/web/src/pages/ReportsPage.tsx): `web/src/pages/ReportsPage.tsx`
- [App Router](https://github.com/drumilbhati/damascus/blob/main/web/src/router/index.tsx): `web/src/router/index.tsx`
- [Web App](https://github.com/drumilbhati/damascus/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [API Client](https://github.com/drumilbhati/damascus/blob/main/web/src/api/client.ts): `web/src/api/client.ts`

### External Systems

- **Target Services**
- **Prometheus**
- **Jaeger**

### Other components

- **Platform User**

## Connections

- Platform User → Dashboard Pages: uses
- Web App → App Router: renders routes (evidence: `web/src/App.tsx`)
- App Router → Dashboard Pages: routes to (evidence: `web/src/router/index.tsx`)
- App Router → Experiment Views: routes to (evidence: `web/src/router/index.tsx`)
- App Router → Autorun View: routes to (evidence: `web/src/router/index.tsx`)
- App Router → Dependency View: routes to (evidence: `web/src/router/index.tsx`)
- App Router → Report View: routes to (evidence: `web/src/router/index.tsx`)
- Dependency View → Dependency Graph: displays graph
- Experiment Manager → Dependency Analysis: builds graph (evidence: `internal/experiment/manager.go`)
- Experiment Manager → Load Generator: starts load (evidence: `internal/experiment/manager.go`)
- Experiment Manager → Telemetry Watcher: starts watcher (evidence: `internal/experiment/manager.go`)
- Experiment Manager → Capacity Analyzer: analyzes observations (evidence: `internal/experiment/manager.go`)
- Experiment Manager → Report Generator: generates report (evidence: `internal/experiment/manager.go`)
- Experiment Manager → Experiment Storage: reads and writes (evidence: `internal/experiment/manager.go`)
- Load Generator → Target Services: sends load
- Telemetry Watcher → Prometheus: queries metrics
- Telemetry Watcher → Jaeger: reads traces
