# sprut1088/observability-studio architecture

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

- Interactive diagram: https://gitdiagram.com/sprut1088/observability-studio
- Repository: https://github.com/sprut1088/observability-studio

## Overview

1. This repo is a multi-accelerator observability platform, not a single app. The system centers on a FastAPI backend plus a React “Hub” UI that routes users into five module workflows: ObsCrawl, ObservaScore, RCA Agent, RED Panel Intelligence, and Observability Gap Map.

2. The top-level architecture is layered:
   - UI for operator interaction and module selection
   - Backend API for validation, orchestration, and artifact access
   - Accelerator packages for domain-specific analysis
   - Shared core utilities for cross-cutting platform concerns
   - Runtime artifact storage for generated outputs

3. The frontend is a Vite/React app under `ui/src`. It acts as a launcher and workflow shell rather than doing heavy analysis itself. It opens module-specific modals, calls backend APIs through `ui/src/api.js`, and renders the Hub tile inventory and global connectivity views.

4. The backend in `backend/app` is the main orchestration boundary. Routes define HTTP contracts, services coordinate work, schemas/models structure request and response data, and the backend also handles runtime folder creation, export/download endpoints, and feature-flag enforcement.

5. The accelerator packages under `accelerators/` hold the actual domain logic:
   - `obscrawl` for crawl/export behavior
   - `observascore` for observability maturity scoring, rules, adapters, insights, and report generation
   - `rca-agent` for incident correlation and root-cause analysis
   These are the “engine rooms” of the platform and are kept separate from HTTP concerns.

6. ObservaScore is the clearest example of the internal pipeline. It uses a common observability model with tool-specific adapters under `accelerators/observascore/adapters` to normalize data from external observability products such as Prometheus, Grafana, Loki, Jaeger, Alertmanager, Tempo, Elasticsearch, Datadog, Dynatrace, AppDynamics, Splunk, and OTel Collector. That normalized data then feeds scoring rules, insights, and report generation.

7. The Observability Gap Map accelerator has a two-part analysis model: coverage scoring and signal-connectivity analysis. Coverage evaluates service-level readiness across metrics, logs, traces, dashboards, alerts, and RED readiness; connectivity separately checks debugging paths like metrics-to-logs and dashboards-to-traces, producing deterministic scores and MTTR-risk classification.

8. The RCA Agent is a separate subsystem under `accelerators/rca-agent` with its own config, templates, tests, and source modules. It combines signal collection, cascade detection, correlation, and optional LLM formatting, and it also exposes a webhook listener for inbound incident/event data.

9. Feature flags are a platform boundary, not just a UI toggle. They are configured in `studio_platform/config/feature_flags.yaml` and enforced in backend middleware so a module can be hidden in the Hub and blocked at the API layer at the same time.

10. Generated outputs are a first-class part of the architecture. Most workflows produce runtime artifacts under per-run folders, typically HTML for preview, JSON for structured output, and XLSX for exports. The backend exposes download and preview endpoints to serve these artifacts after execution.

11. Configuration is split between static repo config and runtime-per-execution config. Tool connection details are supplied through UI payloads, transformed by backend services such as the config builder, and written into run-scoped runtime files. This keeps source-tool credentials and environment details out of the accelerator code paths.

12. `shared_core/` holds cross-accelerator primitives such as the accelerator registry, feature-flag support, connector abstractions, storage, models, and scoring helpers. This is the main shared boundary that prevents duplicated platform logic across modules.

13. There is also a compatibility layer for older workflows. The README shows legacy endpoints alongside newer v1 routes, which suggests the backend supports both streamlined Hub-driven flows and older API contracts during migration.

14. In diagram terms, the key data flow is: user action in the React Hub -> FastAPI route -> backend service orchestration -> accelerator or adapter logic -> artifact generation -> runtime download/preview. External observability tools sit at the far edge and are accessed in read-only mode through adapters and connectors.

Main entry points: [`backend/app/services`](https://github.com/sprut1088/observability-studio/tree/main/backend/app/services) (Services), [`exports`](https://github.com/sprut1088/observability-studio/tree/main/exports) (Run artifacts), [`backend/app/routes`](https://github.com/sprut1088/observability-studio/tree/main/backend/app/routes) (Routes), [`accelerators/observascore`](https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore) (ObservaScore)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["UI"]
  node_ui_hub["Hub<br/>React launcher<br/>[HubPage.jsx]"]
  node_ui_api["API client<br/>UI bridge<br/>[api.js]"]
  node_ui_modals["Module modals<br/>workflow UI"]
  node_ui_connectivity["Connectivity view<br/>UI view"]
end

subgraph group_backend["Backend API"]
  node_api_main["FastAPI app<br/>HTTP boundary<br/>[main.py]"]
  node_api_routes["Routes<br/>HTTP contracts"]
  node_api_services["Services<br/>orchestration"]
  node_api_models["Models<br/>data contracts"]
  node_ff_middleware["Feature flags<br/>policy gate<br/>[feature_flags.yaml]"]
  node_artifact_routes["Artifacts API<br/>download/preview<br/>[download.py]"]
end

subgraph group_accelerators["Accelerators"]
  node_crawl_engine["ObsCrawl<br/>crawl engine<br/>[service.py]"]
  node_score_pipeline["ObservaScore<br/>scoring pipeline"]
  node_score_adapters["Adapters<br/>normalization layer"]
  node_score_rules["Rules engine<br/>rule packs"]
  node_gap_map["Gap Map<br/>analysis model"]
  node_red_intel["RED Intelligence<br/>analysis model"]
  node_rca_agent["RCA Agent<br/>incident engine<br/>[rca_agent.py]"]
end

subgraph group_shared["Shared Core"]
  node_shared_core["Shared core<br/>platform primitives"]
end

subgraph group_runtime["Runtime Artifacts"]
  node_runtime_store[("Run artifacts<br/>runtime storage")]
end

node_external_tools(("External tools<br/>observability sources"))

node_ui_hub -->|"requests"| node_ui_api
node_ui_hub -->|"opens"| node_ui_modals
node_ui_hub -->|"shows"| node_ui_connectivity
node_ui_api -->|"calls"| node_api_routes
node_api_main -->|"mounts"| node_api_routes
node_api_routes -->|"delegates"| node_api_services
node_api_services -->|"uses"| node_api_models
node_api_services -->|"depends on"| node_shared_core
node_ff_middleware -->|"gates"| node_api_routes
node_ff_middleware -->|"filters"| node_ui_hub
node_api_services -->|"orchestrates"| node_crawl_engine
node_api_services -->|"orchestrates"| node_score_pipeline
node_api_services -->|"runs"| node_gap_map
node_api_services -->|"runs"| node_red_intel
node_api_services -->|"runs"| node_rca_agent
node_score_pipeline -->|"normalizes"| node_score_adapters
node_score_pipeline -->|"scores"| node_score_rules
node_score_pipeline -->|"reads"| node_external_tools
node_gap_map -->|"writes"| node_runtime_store
node_red_intel -->|"writes"| node_runtime_store
node_rca_agent -->|"writes"| node_runtime_store
node_crawl_engine -->|"writes"| node_runtime_store
node_api_routes -->|"serves"| node_runtime_store
node_shared_core -->|"persists via"| node_runtime_store

click node_ui_hub "https://github.com/sprut1088/observability-studio/blob/main/ui/src/components/HubPage.jsx"
click node_ui_api "https://github.com/sprut1088/observability-studio/blob/main/ui/src/api.js"
click node_ui_modals "https://github.com/sprut1088/observability-studio/tree/main/ui/src/components"
click node_ui_connectivity "https://github.com/sprut1088/observability-studio/blob/main/ui/src/components/GlobalToolConnectivity.jsx"
click node_api_main "https://github.com/sprut1088/observability-studio/blob/main/backend/app/main.py"
click node_api_routes "https://github.com/sprut1088/observability-studio/tree/main/backend/app/routes"
click node_api_services "https://github.com/sprut1088/observability-studio/tree/main/backend/app/services"
click node_api_models "https://github.com/sprut1088/observability-studio/tree/main/backend/app/models"
click node_ff_middleware "https://github.com/sprut1088/observability-studio/blob/main/studio_platform/config/feature_flags.yaml"
click node_artifact_routes "https://github.com/sprut1088/observability-studio/blob/main/backend/app/routes/download.py"
click node_crawl_engine "https://github.com/sprut1088/observability-studio/blob/main/accelerators/obscrawl/service.py"
click node_score_pipeline "https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore"
click node_score_adapters "https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore/adapters"
click node_score_rules "https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore/rules"
click node_gap_map "https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore/insights/observability_gap_map"
click node_red_intel "https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore/insights/red_panel_intelligence"
click node_rca_agent "https://github.com/sprut1088/observability-studio/blob/main/accelerators/rca-agent/src/rca_agent.py"
click node_shared_core "https://github.com/sprut1088/observability-studio/tree/main/shared_core"
click node_runtime_store "https://github.com/sprut1088/observability-studio/tree/main/exports"

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_ui_hub,node_ui_api,node_ui_modals,node_ui_connectivity toneBlue
class node_api_main,node_api_routes,node_api_services,node_api_models,node_ff_middleware,node_artifact_routes toneAmber
class node_crawl_engine,node_score_pipeline,node_score_adapters,node_score_rules,node_gap_map,node_red_intel,node_rca_agent toneMint
class node_shared_core toneRose
class node_runtime_store toneIndigo
class node_external_tools toneNeutral
```

## Components

### UI

React hub and workflow shell

- [Hub](https://github.com/sprut1088/observability-studio/blob/main/ui/src/components/HubPage.jsx): React launcher · Main operator shell for module selection and global views · `ui/src/components/HubPage.jsx`
- [API client](https://github.com/sprut1088/observability-studio/blob/main/ui/src/api.js): UI bridge · Frontend request layer for backend calls · `ui/src/api.js`
- [Module modals](https://github.com/sprut1088/observability-studio/tree/main/ui/src/components): workflow UI · Crawl, score, RCA, red intelligence, and gap map entry points · `ui/src/components`
- [Connectivity view](https://github.com/sprut1088/observability-studio/blob/main/ui/src/components/GlobalToolConnectivity.jsx): UI view · Global tool connectivity and module inventory display · `ui/src/components/GlobalToolConnectivity.jsx`

### Backend API

FastAPI orchestration and artifact access

- [FastAPI app](https://github.com/sprut1088/observability-studio/blob/main/backend/app/main.py): HTTP boundary · Primary backend entrypoint and route assembly · `backend/app/main.py`
- [Routes](https://github.com/sprut1088/observability-studio/tree/main/backend/app/routes): HTTP contracts · REST endpoints for assess, export, download, feature flags, and module APIs · `backend/app/routes`
- [Services](https://github.com/sprut1088/observability-studio/tree/main/backend/app/services): orchestration · Backend coordination for validation, config building, scoring, crawl, RCA, and exports · `backend/app/services`
- [Models](https://github.com/sprut1088/observability-studio/tree/main/backend/app/models): data contracts · Backend request and response structures · `backend/app/models`
- [Feature flags](https://github.com/sprut1088/observability-studio/blob/main/studio_platform/config/feature_flags.yaml): policy gate · Module visibility and API enforcement boundary · `studio_platform/config/feature_flags.yaml`
- [Artifacts API](https://github.com/sprut1088/observability-studio/blob/main/backend/app/routes/download.py): download/preview · Endpoints for previews, downloads, and exported outputs · `backend/app/routes/download.py`

### Accelerators

Domain analysis engines

- [ObsCrawl](https://github.com/sprut1088/observability-studio/blob/main/accelerators/obscrawl/service.py): crawl engine · Crawl and export workflow for collecting tool data · `accelerators/obscrawl/service.py`
- [ObservaScore](https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore): scoring pipeline · Observability maturity scoring and report generation · `accelerators/observascore`
- [Adapters](https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore/adapters): normalization layer · Connectors for Prometheus, Grafana, Loki, Jaeger, Alertmanager, Tempo, Elasticsearch, Datadog, Dynatrace, AppDynamics, Splunk, and OTel Collector · `accelerators/observascore/adapters`
- [Rules engine](https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore/rules): rule packs · Domain checks and pack-based scoring logic · `accelerators/observascore/rules`
- [Gap Map](https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore/insights/observability_gap_map): analysis model · Coverage scoring plus signal-connectivity analysis with MTTR risk · `accelerators/observascore/insights/observability_gap_map`
- [RED Intelligence](https://github.com/sprut1088/observability-studio/tree/main/accelerators/observascore/insights/red_panel_intelligence): analysis model · RED-focused signal analysis and reporting · `accelerators/observascore/insights/red_panel_intelligence`
- [RCA Agent](https://github.com/sprut1088/observability-studio/blob/main/accelerators/rca-agent/src/rca_agent.py): incident engine · Signal collection, cascade detection, correlation, and optional LLM formatting · `accelerators/rca-agent/src/rca_agent.py`

### Shared Core

Cross-cutting platform primitives

- [Shared core](https://github.com/sprut1088/observability-studio/tree/main/shared_core): platform primitives · Registry, connectors, storage, feature flags, models, and scoring helpers · `shared_core`

### Runtime Artifacts

Generated outputs and export files

- [Run artifacts](https://github.com/sprut1088/observability-studio/tree/main/exports): runtime storage · Per-run HTML, JSON, and XLSX outputs · `exports`

### Other components

- **External tools**: observability sources · Read-only source systems accessed through adapters and connectors

## Connections

- Hub → API client: requests · User actions are translated into backend calls
- Hub → Module modals: opens · Hub launches module-specific workflows
- Hub → Connectivity view: shows · Renders global inventory and connectivity views
- API client → Routes: calls · Frontend talks to backend HTTP contracts
- FastAPI app → Routes: mounts · Application wires route modules
- Routes → Services: delegates · Routes hand off to orchestration services
- Services → Models: uses · Services validate and shape payloads
- Services → Shared core: depends on · Backend reuses shared registries, connectors, and helpers
- Feature flags → Routes: gates · Feature flags block or expose module endpoints
- Feature flags → Hub: filters · Hub module visibility follows the same flag policy
- Services → ObsCrawl: orchestrates · Backend triggers crawl workflows
- Services → ObservaScore: orchestrates · Backend triggers observability scoring workflows
- Services → Gap Map: runs · Gap map analysis is invoked through backend services
- Services → RED Intelligence: runs · Red intelligence analysis is invoked through backend services
- Services → RCA Agent: runs · RCA workflow is coordinated by backend services
- ObservaScore → Adapters: normalizes · Adapters convert external observability data into a common model
- ObservaScore → Rules engine: scores · Rules and packs compute maturity findings
- ObservaScore → External tools: reads · Connectors fetch source data from observability products
- Gap Map → Run artifacts: writes · Produces structured coverage and connectivity artifacts
- RED Intelligence → Run artifacts: writes · Produces report artifacts for download and preview
- RCA Agent → Run artifacts: writes · Generates RCA summaries and templates
- ObsCrawl → Run artifacts: writes · Stores crawl outputs and exports
- Routes → Run artifacts: serves · Download and preview endpoints expose generated artifacts
- Shared core → Run artifacts: persists via · Shared storage abstractions back run-scoped outputs
