# vaibhav2824/platformpulse architecture

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

- Interactive diagram: https://gitdiagram.com/vaibhav2824/platformpulse
- Repository: https://github.com/vaibhav2824/platformpulse

## Overview

PlatformPulse is a laptop-scale data-platform incident-response copilot. An operator injects a failure; Airflow runs the affected Spark job, observability detects it, and an incident is opened. The Slack app finds incidents, invokes the agent, and posts a diagnosis with evidence and a runbook; people can acknowledge or resolve incidents and ask support questions. The MCP server supplies live platform and runbook context, while Grafana displays health and customer-experience metrics. Several infrastructure connections are documented in the README rather than shown in sampled implementation files.

Main entry points: [`pulse/mcp_server.py`](https://github.com/vaibhav2824/platformpulse/blob/main/pulse/mcp_server.py) (MCP Tools), [`incident_service/app.py`](https://github.com/vaibhav2824/platformpulse/blob/main/incident_service/app.py) (Incident Service), [`airflow/dags/platform_dags.py`](https://github.com/vaibhav2824/platformpulse/blob/main/airflow/dags/platform_dags.py) (Airflow DAGs), [`pulse/agent.py`](https://github.com/vaibhav2824/platformpulse/blob/main/pulse/agent.py) (Triage Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Data Platform"]
  node_chaos["Chaos Injector<br/>[chaos.py]"]
  node_airflow["Airflow DAGs<br/>[platform_dags.py]"]
  node_spark["Spark Jobs<br/>[spark_job.py]"]
  node_metadata[("Airflow Metadata")]
  node_trino["Trino SQL"]
end

subgraph group_observability["Observability"]
  node_statsd["StatsD Exporter"]
  node_prometheus["Prometheus Rules"]
  node_alertmanager["Alertmanager<br/>[alertmanager.yml]"]
  node_grafana["Grafana Dashboard"]
end

subgraph group_incidents["Incident Management"]
  node_incident_api["Incident Service<br/>[app.py]"]
  node_incident_db[("Incident Store<br/>[app.py]")]
end

subgraph group_copilot["AI Copilot"]
  node_slack_app["Slack App<br/>[slack_app.py]"]
  node_agent["Triage Agent<br/>[agent.py]"]
  node_mcp["MCP Tools<br/>[mcp_server.py]"]
  node_runbooks["Runbook Search"]
end

node_operator(("Operator"))
node_groq["Groq LLM"]
node_slack(("Slack"))
node_airflow_api["Airflow API"]
node_prom_api["Prometheus API"]

node_operator -->|"injects failure"| node_chaos
node_chaos -->|"triggers DAG"| node_airflow
node_airflow -->|"runs job"| node_spark
node_airflow -->|"exports metrics"| node_statsd
node_airflow -->|"stores metadata"| node_metadata
node_trino -->|"queries metadata"| node_metadata
node_statsd -->|"exports metrics"| node_prometheus
node_prometheus -->|"dispatches alerts"| node_alertmanager
node_prometheus -->|"feeds dashboards"| node_grafana
node_alertmanager -->|"posts webhook"| node_incident_api
node_incident_api -->|"reads and writes"| node_incident_db
node_incident_api -->|"exposes metrics"| node_prometheus
node_slack_app -->|"polls and updates"| node_incident_api
node_slack_app -->|"requests triage"| node_agent
node_agent -->|"loads and updates"| node_incident_api
node_agent -->|"calls tools"| node_mcp
node_agent -->|"requests completion"| node_groq
node_mcp -->|"queries DAGs and logs"| node_airflow_api
node_mcp -->|"queries metrics"| node_prom_api
node_mcp -->|"reads incidents"| node_incident_api
node_mcp -->|"runs read-only SQL"| node_trino
node_mcp -->|"searches locally"| node_runbooks
node_slack_app -->|"posts responses"| node_slack

click node_chaos "https://github.com/vaibhav2824/platformpulse/blob/main/chaos.py"
click node_airflow "https://github.com/vaibhav2824/platformpulse/blob/main/airflow/dags/platform_dags.py"
click node_spark "https://github.com/vaibhav2824/platformpulse/blob/main/airflow/jobs/spark_job.py"
click node_trino "https://github.com/vaibhav2824/platformpulse/tree/main/trino"
click node_prometheus "https://github.com/vaibhav2824/platformpulse/tree/main/observability"
click node_alertmanager "https://github.com/vaibhav2824/platformpulse/blob/main/observability/alertmanager.yml"
click node_grafana "https://github.com/vaibhav2824/platformpulse/blob/main/grafana/dashboards/customer_experience.json"
click node_incident_api "https://github.com/vaibhav2824/platformpulse/blob/main/incident_service/app.py"
click node_incident_db "https://github.com/vaibhav2824/platformpulse/blob/main/incident_service/app.py"
click node_slack_app "https://github.com/vaibhav2824/platformpulse/blob/main/pulse/slack_app.py"
click node_agent "https://github.com/vaibhav2824/platformpulse/blob/main/pulse/agent.py"
click node_mcp "https://github.com/vaibhav2824/platformpulse/blob/main/pulse/mcp_server.py"
click node_runbooks "https://github.com/vaibhav2824/platformpulse/tree/main/pulse/runbooks"

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_chaos,node_airflow,node_spark,node_metadata,node_trino toneBlue
class node_statsd,node_prometheus,node_alertmanager,node_grafana toneAmber
class node_incident_api,node_incident_db,node_airflow_api,node_prom_api toneMint
class node_slack_app,node_agent,node_mcp,node_runbooks toneRose
class node_operator,node_groq,node_slack toneIndigo
```

## Components

### Data Platform

- [Chaos Injector](https://github.com/vaibhav2824/platformpulse/blob/main/chaos.py): `chaos.py`
- [Airflow DAGs](https://github.com/vaibhav2824/platformpulse/blob/main/airflow/dags/platform_dags.py): `airflow/dags/platform_dags.py`
- [Spark Jobs](https://github.com/vaibhav2824/platformpulse/blob/main/airflow/jobs/spark_job.py): `airflow/jobs/spark_job.py`
- **Airflow Metadata**
- [Trino SQL](https://github.com/vaibhav2824/platformpulse/tree/main/trino): `trino`

### Observability

- **StatsD Exporter**
- [Prometheus Rules](https://github.com/vaibhav2824/platformpulse/tree/main/observability): `observability`
- [Alertmanager](https://github.com/vaibhav2824/platformpulse/blob/main/observability/alertmanager.yml): `observability/alertmanager.yml`
- [Grafana Dashboard](https://github.com/vaibhav2824/platformpulse/blob/main/grafana/dashboards/customer_experience.json): `grafana/dashboards/customer_experience.json`

### Incident Management

- [Incident Service](https://github.com/vaibhav2824/platformpulse/blob/main/incident_service/app.py): `incident_service/app.py`
- [Incident Store](https://github.com/vaibhav2824/platformpulse/blob/main/incident_service/app.py): `incident_service/app.py`

### AI Copilot

- [Slack App](https://github.com/vaibhav2824/platformpulse/blob/main/pulse/slack_app.py): `pulse/slack_app.py`
- [Triage Agent](https://github.com/vaibhav2824/platformpulse/blob/main/pulse/agent.py): `pulse/agent.py`
- [MCP Tools](https://github.com/vaibhav2824/platformpulse/blob/main/pulse/mcp_server.py): `pulse/mcp_server.py`
- [Runbook Search](https://github.com/vaibhav2824/platformpulse/tree/main/pulse/runbooks): `pulse/runbooks`

### Other components

- **Operator**
- **Groq LLM**
- **Slack**
- **Airflow API**
- **Prometheus API**

## Connections

- Operator → Chaos Injector: injects failure (evidence: `README.md`)
- Chaos Injector → Airflow DAGs: triggers DAG (evidence: `chaos.py`)
- Airflow DAGs → Spark Jobs: runs job (evidence: `airflow/dags/platform_dags.py`)
- Airflow DAGs → StatsD Exporter: exports metrics (evidence: `README.md`)
- Airflow DAGs → Airflow Metadata: stores metadata (evidence: `README.md`)
- Trino SQL → Airflow Metadata: queries metadata (evidence: `README.md`)
- StatsD Exporter → Prometheus Rules: exports metrics (evidence: `README.md`)
- Prometheus Rules → Alertmanager: dispatches alerts (evidence: `README.md`)
- Prometheus Rules → Grafana Dashboard: feeds dashboards (evidence: `README.md`)
- Alertmanager → Incident Service: posts webhook (evidence: `README.md`)
- Incident Service → Incident Store: reads and writes (evidence: `incident_service/app.py`)
- Incident Service → Prometheus Rules: exposes metrics (evidence: `README.md`)
- Slack App → Incident Service: polls and updates (evidence: `pulse/slack_app.py`)
- Slack App → Triage Agent: requests triage (evidence: `pulse/slack_app.py`)
- Triage Agent → Incident Service: loads and updates (evidence: `pulse/agent.py`)
- Triage Agent → MCP Tools: calls tools (evidence: `pulse/agent.py`)
- Triage Agent → Groq LLM: requests completion (evidence: `README.md`)
- MCP Tools → Airflow API: queries DAGs and logs (evidence: `pulse/mcp_server.py`)
- MCP Tools → Prometheus API: queries metrics (evidence: `pulse/mcp_server.py`)
- MCP Tools → Incident Service: reads incidents (evidence: `pulse/mcp_server.py`)
- MCP Tools → Trino SQL: runs read-only SQL (evidence: `pulse/mcp_server.py`)
- MCP Tools → Runbook Search: searches locally (evidence: `pulse/mcp_server.py`)
- Slack App → Slack: posts responses (evidence: `README.md`)
