# nabaghan-opsec/coroot architecture

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

- Interactive diagram: https://gitdiagram.com/nabaghan-opsec/coroot
- Repository: https://github.com/nabaghan-opsec/coroot

## Overview

Coroot is an observability platform that collects telemetry and turns it into application maps, health assessments, traces, logs, profiles, deployment insights, and cost views. The main workflow runs from telemetry ingestion through application modeling and analysis to API-backed exploration in the web UI. The README documents several product capabilities whose implementation was not sampled; those branches are represented at their known source paths, with unverified connections dashed. The graph is based on the tree, README, and supplied excerpts; unsampled modules were not inspected.

Main entry points: [`api/api.go`](https://github.com/nabaghan-opsec/coroot/blob/main/api/api.go) (HTTP API), [`stats/stats.go`](https://github.com/nabaghan-opsec/coroot/blob/main/stats/stats.go) (Health aggregation), [`model/application.go`](https://github.com/nabaghan-opsec/coroot/blob/main/model/application.go) (Domain model), [`constructor/queries.go`](https://github.com/nabaghan-opsec/coroot/blob/main/constructor/queries.go) (Application modeling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Collection and storage"]
  node_collector["Telemetry ingestion<br/>[collector.go]"]
  node_prom["Metrics clients<br/>[client.go]"]
  node_clickhouse[("Analytics store<br/>[clickhouse.go]")]
  node_cache[("Query cache<br/>[cache.go]")]
  node_db[("Project database<br/>[db.go]")]
end

subgraph group_analysis["Application analysis"]
  node_constructor["Application modeling<br/>[queries.go]"]
  node_model["Domain model<br/>[application.go]"]
  node_auditor["Inspections<br/>[auditor.go]"]
  node_stats["Health aggregation<br/>[stats.go]"]
end

subgraph group_product["Product features"]
  node_application_views["Application map<br/>[application.go]"]
  node_logs["Log exploration<br/>[logs.go]"]
  node_tracing["Distributed tracing<br/>[tracing.go]"]
  node_profiling["Profiling<br/>[profiling.go]"]
  node_deployments["Deployment tracking<br/>[deployments.go]"]
  node_incidents["Incident notifications<br/>[incidents.go]"]
  node_pricing["Cost monitoring<br/>[manager.go]"]
end

subgraph group_access["User interface and access"]
  node_frontend["Web UI<br/>[App.vue]"]
  node_api["HTTP API<br/>[api.go]"]
end

node_operator(("Operator"))

node_operator -->|"explores insights"| node_frontend
node_frontend -.->|"requests data"| node_api
node_collector -.->|"stores telemetry"| node_clickhouse
node_prom -->|"queries metrics"| node_clickhouse
node_constructor -->|"builds applications"| node_model
node_auditor -->|"audits applications"| node_model
node_stats -->|"uses modeling"| node_constructor
node_stats -->|"uses inspections"| node_auditor
node_stats -->|"uses pricing"| node_pricing
node_stats -->|"uses cache"| node_cache
node_api -.->|"serves views"| node_application_views
node_application_views -->|"renders map"| node_model
node_api -.->|"serves logs"| node_logs
node_api -.->|"serves traces"| node_tracing
node_api -.->|"serves profiles"| node_profiling
node_deployments -.->|"tracks rollouts"| node_db
node_incidents -.->|"sends alerts"| node_operator
node_pricing -->|"prices resources"| node_model
node_api -.->|"reads project data"| node_db

click node_frontend "https://github.com/nabaghan-opsec/coroot/blob/main/front/src/App.vue"
click node_api "https://github.com/nabaghan-opsec/coroot/blob/main/api/api.go"
click node_collector "https://github.com/nabaghan-opsec/coroot/blob/main/collector/collector.go"
click node_prom "https://github.com/nabaghan-opsec/coroot/blob/main/prom/client.go"
click node_clickhouse "https://github.com/nabaghan-opsec/coroot/blob/main/clickhouse/clickhouse.go"
click node_cache "https://github.com/nabaghan-opsec/coroot/blob/main/cache/cache.go"
click node_constructor "https://github.com/nabaghan-opsec/coroot/blob/main/constructor/queries.go"
click node_model "https://github.com/nabaghan-opsec/coroot/blob/main/model/application.go"
click node_auditor "https://github.com/nabaghan-opsec/coroot/blob/main/auditor/auditor.go"
click node_stats "https://github.com/nabaghan-opsec/coroot/blob/main/stats/stats.go"
click node_application_views "https://github.com/nabaghan-opsec/coroot/blob/main/api/views/application/application.go"
click node_logs "https://github.com/nabaghan-opsec/coroot/blob/main/api/views/logs/logs.go"
click node_tracing "https://github.com/nabaghan-opsec/coroot/blob/main/api/views/tracing/tracing.go"
click node_profiling "https://github.com/nabaghan-opsec/coroot/blob/main/api/views/profiling/profiling.go"
click node_deployments "https://github.com/nabaghan-opsec/coroot/blob/main/watchers/deployments.go"
click node_incidents "https://github.com/nabaghan-opsec/coroot/blob/main/notifications/incidents.go"
click node_pricing "https://github.com/nabaghan-opsec/coroot/blob/main/cloud-pricing/manager.go"
click node_db "https://github.com/nabaghan-opsec/coroot/blob/main/db/db.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_collector,node_prom,node_clickhouse,node_cache,node_db toneBlue
class node_constructor,node_model,node_auditor,node_stats toneAmber
class node_application_views,node_logs,node_tracing,node_profiling,node_deployments,node_incidents,node_pricing toneMint
class node_frontend,node_api toneRose
class node_operator toneIndigo
```

## Components

### Collection and storage

- [Telemetry ingestion](https://github.com/nabaghan-opsec/coroot/blob/main/collector/collector.go): `collector/collector.go`
- [Metrics clients](https://github.com/nabaghan-opsec/coroot/blob/main/prom/client.go): `prom/client.go`
- [Analytics store](https://github.com/nabaghan-opsec/coroot/blob/main/clickhouse/clickhouse.go): `clickhouse/clickhouse.go`
- [Query cache](https://github.com/nabaghan-opsec/coroot/blob/main/cache/cache.go): `cache/cache.go`
- [Project database](https://github.com/nabaghan-opsec/coroot/blob/main/db/db.go): `db/db.go`

### Application analysis

- [Application modeling](https://github.com/nabaghan-opsec/coroot/blob/main/constructor/queries.go): `constructor/queries.go`
- [Domain model](https://github.com/nabaghan-opsec/coroot/blob/main/model/application.go): `model/application.go`
- [Inspections](https://github.com/nabaghan-opsec/coroot/blob/main/auditor/auditor.go): `auditor/auditor.go`
- [Health aggregation](https://github.com/nabaghan-opsec/coroot/blob/main/stats/stats.go): `stats/stats.go`

### Product features

- [Application map](https://github.com/nabaghan-opsec/coroot/blob/main/api/views/application/application.go): `api/views/application/application.go`
- [Log exploration](https://github.com/nabaghan-opsec/coroot/blob/main/api/views/logs/logs.go): `api/views/logs/logs.go`
- [Distributed tracing](https://github.com/nabaghan-opsec/coroot/blob/main/api/views/tracing/tracing.go): `api/views/tracing/tracing.go`
- [Profiling](https://github.com/nabaghan-opsec/coroot/blob/main/api/views/profiling/profiling.go): `api/views/profiling/profiling.go`
- [Deployment tracking](https://github.com/nabaghan-opsec/coroot/blob/main/watchers/deployments.go): `watchers/deployments.go`
- [Incident notifications](https://github.com/nabaghan-opsec/coroot/blob/main/notifications/incidents.go): `notifications/incidents.go`
- [Cost monitoring](https://github.com/nabaghan-opsec/coroot/blob/main/cloud-pricing/manager.go): `cloud-pricing/manager.go`

### User interface and access

- [Web UI](https://github.com/nabaghan-opsec/coroot/blob/main/front/src/App.vue): `front/src/App.vue`
- [HTTP API](https://github.com/nabaghan-opsec/coroot/blob/main/api/api.go): `api/api.go`

### Other components

- **Operator**

## Connections

- Operator → Web UI: explores insights
- Web UI → HTTP API: requests data
- Telemetry ingestion → Analytics store: stores telemetry
- Metrics clients → Analytics store: queries metrics (evidence: `prom/client.go`)
- Application modeling → Domain model: builds applications (evidence: `constructor/queries.go`)
- Inspections → Domain model: audits applications
- Health aggregation → Application modeling: uses modeling (evidence: `stats/stats.go`)
- Health aggregation → Inspections: uses inspections (evidence: `stats/stats.go`)
- Health aggregation → Cost monitoring: uses pricing (evidence: `stats/stats.go`)
- Health aggregation → Query cache: uses cache (evidence: `stats/stats.go`)
- HTTP API → Application map: serves views
- Application map → Domain model: renders map (evidence: `api/views/application/application.go`)
- HTTP API → Log exploration: serves logs
- HTTP API → Distributed tracing: serves traces
- HTTP API → Profiling: serves profiles
- Deployment tracking → Project database: tracks rollouts
- Incident notifications → Operator: sends alerts
- Cost monitoring → Domain model: prices resources (evidence: `cloud-pricing/manager.go`)
- HTTP API → Project database: reads project data
