# mukesh-2710/skypulse-91-full-stack-triage-system architecture

> Architecture diagram of the GitHub repository mukesh-2710/skypulse-91-full-stack-triage-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mukesh-2710/skypulse-91-full-stack-triage-system
- Repository: https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system

## Overview

SkyPulse 91 ingests product, infrastructure, and observability alerts, then turns eligible events into correlated, scored, explainable incidents with audit and replay records. Operators use the React console to run triage, browse ranked incidents, inspect score details, and fetch audit trails. The README documents the full pipeline and optional MongoDB mode; edges below are limited to relationships shown in excerpts or explicitly documented there, including HTTP links described by the README.

Main entry points: [`backend/controllers/triageController.js`](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/controllers/triageController.js) (Triage controller), [`backend/server.js`](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/server.js) (Backend API), [`backend/services/store.js`](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/store.js) (Store abstraction), [`backend/controllers/ingestionController.js`](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/controllers/ingestionController.js) (Ingestion handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Event ingestion"]
  node_simulators["Stream simulators"]
  node_api["Backend API<br/>[server.js]"]
  node_validation["Event validation<br/>[validateEvent.js]"]
  node_ingestion["Ingestion handler"]
  node_normalization["Event normalization"]
  node_deduplication["Event deduplication"]
end

subgraph group_triage["Incident triage"]
  node_triage["Triage controller"]
  node_correlation["Event correlation"]
  node_features["Feature extraction<br/>[featureService.js]"]
  node_ranking["Priority ranking<br/>[rankingService.js]"]
  node_explanation["Incident explanation"]
  node_incidentservice["Incident operations<br/>[incidentService.js]"]
end

subgraph group_persistence["Persistence and history"]
  node_store["Store abstraction<br/>[store.js]"]
  node_records[("Event and incident records<br/>[Incident.js]")]
  node_history[("Audit and decisions<br/>[AuditLog.js]")]
  node_db[("MongoDB connection<br/>[db.js]")]
end

subgraph group_operator["Operator console"]
  node_console["Triage console<br/>[App.jsx]"]
  node_api_client["Frontend API client<br/>[api.js]"]
  node_incident_card["Incident details<br/>[IncidentCard.jsx]"]
  node_score_view["Score breakdown<br/>[ScoreBreakdown.jsx]"]
  node_audit_view["Audit trail view<br/>[AuditTrail.jsx]"]
end

subgraph group_ml["Anomaly scoring"]
  node_mlclient["ML scoring client<br/>[mlService.js]"]
  node_mlservice["Isolation Forest<br/>[main.py]"]
end

node_sources(("Event sources"))
node_operator(("Operator"))

node_sources -->|"submit events"| node_api
node_simulators -->|"post events"| node_api
node_api -->|"validates"| node_validation
node_api -->|"routes ingestion"| node_ingestion
node_ingestion -->|"normalizes"| node_normalization
node_ingestion -->|"deduplicates"| node_deduplication
node_ingestion -->|"reads and saves"| node_store
node_api -->|"routes triage"| node_triage
node_triage -->|"loads events"| node_store
node_triage -->|"correlates events"| node_correlation
node_triage -->|"extracts features"| node_features
node_triage -->|"requests score"| node_mlclient
node_mlclient -->|"posts features"| node_mlservice
node_triage -->|"ranks incident"| node_ranking
node_triage -->|"generates rationale"| node_explanation
node_triage -->|"persists incident"| node_incidentservice
node_triage -->|"records decisions"| node_store
node_incidentservice -->|"uses store"| node_store
node_store -->|"reads and writes"| node_records
node_store -->|"reads and writes"| node_history
node_api -->|"connects in Mongo mode"| node_db
node_console -->|"fetches and runs"| node_api_client
node_api_client -->|"calls REST API"| node_api
node_operator -->|"operates"| node_console
node_console -->|"renders incidents"| node_incident_card
node_incident_card -->|"renders breakdown"| node_score_view
node_incident_card -->|"renders audit"| node_audit_view
node_incident_card -->|"fetches audit"| node_api_client

click node_simulators "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/tree/main/simulators"
click node_api "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/server.js"
click node_validation "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/middleware/validateEvent.js"
click node_ingestion "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/controllers/ingestionController.js"
click node_normalization "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/normalizationService.js"
click node_deduplication "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/deduplicationService.js"
click node_triage "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/controllers/triageController.js"
click node_correlation "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/correlationService.js"
click node_features "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/featureService.js"
click node_mlclient "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/mlService.js"
click node_mlservice "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/ml-service/main.py"
click node_ranking "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/rankingService.js"
click node_explanation "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/explanationService.js"
click node_incidentservice "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/incidentService.js"
click node_store "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/store.js"
click node_records "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/models/Incident.js"
click node_history "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/models/AuditLog.js"
click node_db "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/config/db.js"
click node_console "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/frontend/src/api.js"
click node_incident_card "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/frontend/src/components/IncidentCard.jsx"
click node_score_view "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/frontend/src/components/ScoreBreakdown.jsx"
click node_audit_view "https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/frontend/src/components/AuditTrail.jsx"

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_simulators,node_api,node_validation,node_ingestion,node_normalization,node_deduplication toneBlue
class node_triage,node_correlation,node_features,node_ranking,node_explanation,node_incidentservice toneAmber
class node_store,node_records,node_history,node_db toneMint
class node_console,node_api_client,node_incident_card,node_score_view,node_audit_view toneRose
class node_mlclient,node_mlservice,node_sources,node_operator toneIndigo
```

## Components

### Event ingestion

- [Stream simulators](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/tree/main/simulators): `simulators`
- [Backend API](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/server.js): `backend/server.js`
- [Event validation](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/middleware/validateEvent.js): `backend/middleware/validateEvent.js`
- [Ingestion handler](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/controllers/ingestionController.js): `backend/controllers/ingestionController.js`
- [Event normalization](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/normalizationService.js): `backend/services/normalizationService.js`
- [Event deduplication](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/deduplicationService.js): `backend/services/deduplicationService.js`

### Incident triage

- [Triage controller](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/controllers/triageController.js): `backend/controllers/triageController.js`
- [Event correlation](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/correlationService.js): `backend/services/correlationService.js`
- [Feature extraction](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/featureService.js): `backend/services/featureService.js`
- [Priority ranking](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/rankingService.js): `backend/services/rankingService.js`
- [Incident explanation](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/explanationService.js): `backend/services/explanationService.js`
- [Incident operations](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/incidentService.js): `backend/services/incidentService.js`

### Persistence and history

- [Store abstraction](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/store.js): `backend/services/store.js`
- [Event and incident records](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/models/Incident.js): `backend/models/Incident.js`
- [Audit and decisions](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/models/AuditLog.js): `backend/models/AuditLog.js`
- [MongoDB connection](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/config/db.js): `backend/config/db.js`

### Operator console

- [Triage console](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Frontend API client](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Incident details](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/frontend/src/components/IncidentCard.jsx): `frontend/src/components/IncidentCard.jsx`
- [Score breakdown](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/frontend/src/components/ScoreBreakdown.jsx): `frontend/src/components/ScoreBreakdown.jsx`
- [Audit trail view](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/frontend/src/components/AuditTrail.jsx): `frontend/src/components/AuditTrail.jsx`

### Anomaly scoring

- [ML scoring client](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/backend/services/mlService.js): `backend/services/mlService.js`
- [Isolation Forest](https://github.com/mukesh-2710/skypulse-91-full-stack-triage-system/blob/main/ml-service/main.py): `ml-service/main.py`

### Other components

- **Event sources**
- **Operator**

## Connections

- Event sources → Backend API: submit events (evidence: `README.md`)
- Stream simulators → Backend API: post events (evidence: `README.md`)
- Backend API → Event validation: validates (evidence: `backend/server.js`)
- Backend API → Ingestion handler: routes ingestion (evidence: `backend/server.js`)
- Ingestion handler → Event normalization: normalizes (evidence: `backend/controllers/ingestionController.js`)
- Ingestion handler → Event deduplication: deduplicates (evidence: `backend/controllers/ingestionController.js`)
- Ingestion handler → Store abstraction: reads and saves (evidence: `backend/controllers/ingestionController.js`)
- Backend API → Triage controller: routes triage (evidence: `backend/server.js`)
- Triage controller → Store abstraction: loads events (evidence: `backend/controllers/triageController.js`)
- Triage controller → Event correlation: correlates events (evidence: `backend/controllers/triageController.js`)
- Triage controller → Feature extraction: extracts features (evidence: `backend/controllers/triageController.js`)
- Triage controller → ML scoring client: requests score (evidence: `backend/controllers/triageController.js`)
- ML scoring client → Isolation Forest: posts features (evidence: `backend/services/mlService.js`)
- Triage controller → Priority ranking: ranks incident (evidence: `backend/controllers/triageController.js`)
- Triage controller → Incident explanation: generates rationale (evidence: `backend/controllers/triageController.js`)
- Triage controller → Incident operations: persists incident (evidence: `backend/controllers/triageController.js`)
- Triage controller → Store abstraction: records decisions (evidence: `backend/controllers/triageController.js`)
- Incident operations → Store abstraction: uses store (evidence: `backend/services/incidentService.js`)
- Store abstraction → Event and incident records: reads and writes (evidence: `backend/services/store.js`)
- Store abstraction → Audit and decisions: reads and writes (evidence: `backend/services/store.js`)
- Backend API → MongoDB connection: connects in Mongo mode (evidence: `backend/server.js`)
- Triage console → Frontend API client: fetches and runs (evidence: `frontend/src/App.jsx`)
- Frontend API client → Backend API: calls REST API (evidence: `README.md`)
- Operator → Triage console: operates (evidence: `README.md`)
- Triage console → Incident details: renders incidents (evidence: `frontend/src/App.jsx`)
- Incident details → Score breakdown: renders breakdown (evidence: `frontend/src/components/IncidentCard.jsx`)
- Incident details → Audit trail view: renders audit (evidence: `frontend/src/components/IncidentCard.jsx`)
- Incident details → Frontend API client: fetches audit (evidence: `frontend/src/components/IncidentCard.jsx`)
