# hamayl-ali/siem-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/hamayl-ali/siem-dashboard
- Repository: https://github.com/hamayl-ali/siem-dashboard

## Overview

SIEM Dashboard ingests submitted or host-shipped logs, normalizes and classifies them, correlates detections into alerts, persists events and alerts, and streams updates to a React dashboard. The product also provides JWT-based account access, alert management, analytics, and YAML playbook simulation. The graph combines documented capabilities with sampled calls; frontend-to-API and some unsampled subsystem links rely on README descriptions rather than inspected implementation.

Main entry points: [`siem-dashboard/backend/app/controllers/log_controller.py`](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/controllers/log_controller.py) (Log Processing), [`siem-dashboard/frontend/src/api/hooks`](https://github.com/hamayl-ali/siem-dashboard/tree/main/siem-dashboard/frontend/src/api/hooks) (API Data Hooks), [`siem-dashboard/backend/app/routes/scenario_routes.py`](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/routes/scenario_routes.py) (Scenario Routes), [`siem-dashboard/backend/app/routes/log_routes.py`](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/routes/log_routes.py) (Log API Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Ingestion and Detection"]
  node_logcontroller["Log Processing<br/>[log_controller.py]"]
  node_normalizer["Log Normalizer<br/>[normalizer.py]"]
  node_severity["Severity Classifier<br/>[severity.py]"]
  node_correlation["Correlation Engine<br/>[correlation.py]"]
  node_events[("Log Events<br/>[log_event.py]")]
  node_alerts[("Alerts<br/>[alert.py]")]
  node_redis["Redis Streams"]
end

subgraph group_backend["API and Identity"]
  node_logapi["Log API Routes<br/>[log_routes.py]"]
  node_streaming["SSE Streaming<br/>[streaming.py]"]
  node_alertapi["Alert API Routes<br/>[alert_routes.py]"]
  node_authapi["Authentication Routes<br/>[auth_routes.py]"]
  node_authcontroller["Identity Controller<br/>[auth_controller.py]"]
  node_users[("User Accounts<br/>[user.py]")]
  node_authcore["JWT and Passwords<br/>[auth.py]"]
end

subgraph group_simulation["Scenario Simulation"]
  node_scenarioapi["Scenario Routes<br/>[scenario_routes.py]"]
  node_playbooks["Playbook Definitions<br/>[playbook.py]"]
  node_runner["Scenario Runner<br/>[runner.py]"]
  node_runs[("Scenario Runs<br/>[scenario_run.py]")]
end

subgraph group_frontend["Dashboard UI"]
  node_web["React Dashboard"]
  node_frontendapi["API Data Hooks"]
  node_charts["Analytics Charts"]
end

node_operator(("Analyst / Admin"))
node_host["Host Log Shipper<br/>[log_shipper.py]"]
node_browser(("Dashboard User"))

node_operator -->|"submits logs"| node_logapi
node_host -.->|"ships events"| node_logapi
node_logapi -->|"dispatches ingestion"| node_logcontroller
node_logcontroller -->|"normalizes batch"| node_normalizer
node_logcontroller -->|"classifies events"| node_severity
node_logcontroller -->|"correlates events"| node_correlation
node_logcontroller -->|"saves events"| node_events
node_logcontroller -->|"saves alerts"| node_alerts
node_logcontroller -->|"publishes updates"| node_redis
node_alertapi -->|"streams alerts"| node_streaming
node_logapi -->|"streams events"| node_streaming
node_streaming -->|"reads stream"| node_redis
node_operator -->|"authenticates"| node_authapi
node_authapi -->|"dispatches auth"| node_authcontroller
node_authcontroller -->|"reads and saves"| node_users
node_authcontroller -->|"hashes and issues tokens"| node_authcore
node_operator -->|"starts simulation"| node_scenarioapi
node_scenarioapi -->|"loads playbooks"| node_playbooks
node_scenarioapi -->|"starts run"| node_runner
node_scenarioapi -->|"reads run status"| node_runs
node_runner -->|"records run"| node_runs
node_runner -->|"submits scenario logs"| node_logcontroller
node_browser -->|"uses dashboard"| node_web
node_web -.->|"requests data"| node_frontendapi
node_frontendapi -.->|"calls backend API"| node_logapi
node_frontendapi -.->|"calls backend API"| node_alertapi
node_frontendapi -.->|"calls backend API"| node_authapi
node_frontendapi -.->|"calls backend API"| node_scenarioapi
node_web -.->|"renders analytics"| node_charts

click node_host "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/scripts/log_shipper.py"
click node_logapi "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/routes/log_routes.py"
click node_logcontroller "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/controllers/log_controller.py"
click node_normalizer "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/engine/normalizer.py"
click node_severity "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/engine/severity.py"
click node_correlation "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/engine/correlation.py"
click node_events "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/models/log_event.py"
click node_alerts "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/models/alert.py"
click node_streaming "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/core/streaming.py"
click node_alertapi "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/routes/alert_routes.py"
click node_authapi "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/routes/auth_routes.py"
click node_authcontroller "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/controllers/auth_controller.py"
click node_users "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/models/user.py"
click node_authcore "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/core/auth.py"
click node_scenarioapi "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/routes/scenario_routes.py"
click node_playbooks "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/scenarios/playbook.py"
click node_runner "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/scenarios/runner.py"
click node_runs "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/models/scenario_run.py"
click node_web "https://github.com/hamayl-ali/siem-dashboard/tree/main/siem-dashboard/frontend/src/routes"
click node_frontendapi "https://github.com/hamayl-ali/siem-dashboard/tree/main/siem-dashboard/frontend/src/api/hooks"
click node_charts "https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/frontend/src/core/charts/SeverityBarChart.tsx"

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_logcontroller,node_normalizer,node_severity,node_correlation,node_events,node_alerts,node_redis,node_browser toneBlue
class node_logapi,node_streaming,node_alertapi,node_authapi,node_authcontroller,node_users,node_authcore toneAmber
class node_scenarioapi,node_playbooks,node_runner,node_runs toneMint
class node_web,node_frontendapi,node_charts toneRose
class node_operator toneIndigo
class node_host toneTeal
```

## Components

### Ingestion and Detection

- [Log Processing](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/controllers/log_controller.py): `siem-dashboard/backend/app/controllers/log_controller.py`
- [Log Normalizer](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/engine/normalizer.py): `siem-dashboard/backend/app/engine/normalizer.py`
- [Severity Classifier](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/engine/severity.py): `siem-dashboard/backend/app/engine/severity.py`
- [Correlation Engine](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/engine/correlation.py): `siem-dashboard/backend/app/engine/correlation.py`
- [Log Events](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/models/log_event.py): `siem-dashboard/backend/app/models/log_event.py`
- [Alerts](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/models/alert.py): `siem-dashboard/backend/app/models/alert.py`
- **Redis Streams**

### API and Identity

- [Log API Routes](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/routes/log_routes.py): `siem-dashboard/backend/app/routes/log_routes.py`
- [SSE Streaming](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/core/streaming.py): `siem-dashboard/backend/app/core/streaming.py`
- [Alert API Routes](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/routes/alert_routes.py): `siem-dashboard/backend/app/routes/alert_routes.py`
- [Authentication Routes](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/routes/auth_routes.py): `siem-dashboard/backend/app/routes/auth_routes.py`
- [Identity Controller](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/controllers/auth_controller.py): `siem-dashboard/backend/app/controllers/auth_controller.py`
- [User Accounts](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/models/user.py): `siem-dashboard/backend/app/models/user.py`
- [JWT and Passwords](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/core/auth.py): `siem-dashboard/backend/app/core/auth.py`

### Scenario Simulation

- [Scenario Routes](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/routes/scenario_routes.py): `siem-dashboard/backend/app/routes/scenario_routes.py`
- [Playbook Definitions](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/scenarios/playbook.py): `siem-dashboard/backend/app/scenarios/playbook.py`
- [Scenario Runner](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/scenarios/runner.py): `siem-dashboard/backend/app/scenarios/runner.py`
- [Scenario Runs](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/backend/app/models/scenario_run.py): `siem-dashboard/backend/app/models/scenario_run.py`

### Dashboard UI

- [React Dashboard](https://github.com/hamayl-ali/siem-dashboard/tree/main/siem-dashboard/frontend/src/routes): `siem-dashboard/frontend/src/routes`
- [API Data Hooks](https://github.com/hamayl-ali/siem-dashboard/tree/main/siem-dashboard/frontend/src/api/hooks): `siem-dashboard/frontend/src/api/hooks`
- [Analytics Charts](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/frontend/src/core/charts/SeverityBarChart.tsx): `siem-dashboard/frontend/src/core/charts/SeverityBarChart.tsx`

### Other components

- **Analyst / Admin**
- [Host Log Shipper](https://github.com/hamayl-ali/siem-dashboard/blob/main/siem-dashboard/scripts/log_shipper.py): `siem-dashboard/scripts/log_shipper.py`
- **Dashboard User**

## Connections

- Analyst / Admin → Log API Routes: submits logs (evidence: `siem-dashboard/backend/app/routes/log_routes.py`)
- Host Log Shipper → Log API Routes: ships events (evidence: `README.md`)
- Log API Routes → Log Processing: dispatches ingestion (evidence: `siem-dashboard/backend/app/routes/log_routes.py`)
- Log Processing → Log Normalizer: normalizes batch (evidence: `siem-dashboard/backend/app/controllers/log_controller.py`)
- Log Processing → Severity Classifier: classifies events (evidence: `siem-dashboard/backend/app/controllers/log_controller.py`)
- Log Processing → Correlation Engine: correlates events (evidence: `siem-dashboard/backend/app/controllers/log_controller.py`)
- Log Processing → Log Events: saves events (evidence: `siem-dashboard/backend/app/controllers/log_controller.py`)
- Log Processing → Alerts: saves alerts (evidence: `siem-dashboard/backend/app/controllers/log_controller.py`)
- Log Processing → Redis Streams: publishes updates (evidence: `siem-dashboard/backend/app/controllers/log_controller.py`)
- Alert API Routes → SSE Streaming: streams alerts (evidence: `siem-dashboard/backend/app/routes/alert_routes.py`)
- Log API Routes → SSE Streaming: streams events (evidence: `siem-dashboard/backend/app/routes/log_routes.py`)
- SSE Streaming → Redis Streams: reads stream (evidence: `siem-dashboard/backend/app/core/streaming.py`)
- Analyst / Admin → Authentication Routes: authenticates (evidence: `siem-dashboard/backend/app/routes/auth_routes.py`)
- Authentication Routes → Identity Controller: dispatches auth (evidence: `siem-dashboard/backend/app/routes/auth_routes.py`)
- Identity Controller → User Accounts: reads and saves (evidence: `siem-dashboard/backend/app/controllers/auth_controller.py`)
- Identity Controller → JWT and Passwords: hashes and issues tokens (evidence: `siem-dashboard/backend/app/controllers/auth_controller.py`)
- Analyst / Admin → Scenario Routes: starts simulation (evidence: `siem-dashboard/backend/app/routes/scenario_routes.py`)
- Scenario Routes → Playbook Definitions: loads playbooks (evidence: `siem-dashboard/backend/app/routes/scenario_routes.py`)
- Scenario Routes → Scenario Runner: starts run (evidence: `siem-dashboard/backend/app/routes/scenario_routes.py`)
- Scenario Routes → Scenario Runs: reads run status (evidence: `siem-dashboard/backend/app/routes/scenario_routes.py`)
- Scenario Runner → Scenario Runs: records run (evidence: `siem-dashboard/backend/app/scenarios/runner.py`)
- Scenario Runner → Log Processing: submits scenario logs (evidence: `siem-dashboard/backend/app/scenarios/runner.py`)
- Dashboard User → React Dashboard: uses dashboard (evidence: `README.md`)
- React Dashboard → API Data Hooks: requests data
- API Data Hooks → Log API Routes: calls backend API (evidence: `README.md`)
- API Data Hooks → Alert API Routes: calls backend API (evidence: `README.md`)
- API Data Hooks → Authentication Routes: calls backend API (evidence: `README.md`)
- API Data Hooks → Scenario Routes: calls backend API (evidence: `README.md`)
- React Dashboard → Analytics Charts: renders analytics
