# noor-hassan-b/cyber-arena architecture

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

- Interactive diagram: https://gitdiagram.com/noor-hassan-b/cyber-arena
- Repository: https://github.com/noor-hassan-b/cyber-arena

## Overview

Cyber Arena combines a React SOC dashboard, PHP/Node APIs, and a MySQL-backed threat-hunting workflow with a local in-memory fallback. Analysts ingest or explore telemetry, inspect correlations and attack paths, and use AI summaries, detection authoring, HITL review, and reporting. The repository also includes ThreatLens, a separate FastAPI cyber range with a React interface. Several subsystem links are supported by README documentation rather than sampled implementation excerpts; those links are cited to the README.

Main entry points: [`frontend-react/src/services/api.js`](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/services/api.js) (Unified API Engine), [`backend-php/server.js`](https://github.com/noor-hassan-b/cyber-arena/blob/main/backend-php/server.js) (Node Operations API), [`hackathone-arsenal/app/frontend/src/pages/Dashboard.jsx`](https://github.com/noor-hassan-b/cyber-arena/blob/main/hackathone-arsenal/app/frontend/src/pages/Dashboard.jsx) (ThreatLens Dashboard), [`frontend-react/src/App.jsx`](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/App.jsx) (Dashboard Shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_soc["SOC Dashboard"]
  node_app["Dashboard Shell<br/>[App.jsx]"]
  node_api["Unified API Engine<br/>[api.js]"]
end

subgraph group_analysis["Threat Analysis"]
  node_scenarios["Attack Scenarios<br/>[attackScenarios.js]"]
  node_discover["Telemetry Search<br/>[KibanaDiscover.jsx]"]
  node_timeline["Event Timeline<br/>[TimelineView.jsx]"]
  node_attackpath["Attack Path Graph"]
  node_packets["Packet Simulator"]
  node_mitre["MITRE Matrix"]
  node_mitrecatalog["MITRE Catalog<br/>[mitreMatrix.js]"]
  node_ai["Threat Copilot"]
  node_evidence["Evidence Review<br/>[EvidenceDrawer.jsx]"]
end

subgraph group_operations["Response Operations"]
  node_ingest["Telemetry Ingestion<br/>[IngestionPanel.jsx]"]
  node_detections["Detection Studio"]
  node_hitl["HITL Gating"]
  node_audit["Audit Ledger"]
  node_vault["Evidence Vault<br/>[EvidenceVault.jsx]"]
  node_report["Forensic Reports<br/>[ReportModal.jsx]"]
end

subgraph group_backend["Platform Services"]
  node_phpapi["PHP REST API<br/>[attack_path.php]"]
  node_nodeapi["Node Operations API<br/>[server.js]"]
  node_db[("MySQL Store<br/>[db.php]")]
end

subgraph group_arsenal["ThreatLens Range"]
  node_arsenalui["ThreatLens Dashboard<br/>[Dashboard.jsx]"]
  node_arsenalapi["FastAPI ML Engine<br/>[server.py]"]
  node_kaliconsole["Kali Console<br/>[KaliConsole.jsx]"]
  node_arsenalclient["Range API Client<br/>[api.js]"]
end

node_analyst(("SOC Analyst"))

node_analyst -->|"uses"| node_app
node_app -->|"uses"| node_api
node_api -->|"loads fallback data"| node_scenarios
node_analyst -->|"submits events"| node_ingest
node_ingest -->|"ingests event"| node_api
node_api -->|"requests REST data"| node_phpapi
node_phpapi -->|"queries events"| node_db
node_api -.->|"supplies telemetry"| node_discover
node_api -->|"supplies graph"| node_attackpath
node_attackpath -->|"offers simulation"| node_packets
node_api -->|"supplies techniques"| node_mitre
node_mitre -->|"uses catalog"| node_mitrecatalog
node_api -->|"provides assistance"| node_ai
node_ai -->|"links citations"| node_evidence
node_analyst -->|"authors rules"| node_detections
node_detections -->|"deploys rules"| node_nodeapi
node_analyst -->|"reviews actions"| node_hitl
node_hitl -->|"submits decisions"| node_nodeapi
node_nodeapi -->|"records decisions"| node_audit
node_nodeapi -->|"stores evidence"| node_vault
node_api -->|"provides report data"| node_report
node_analyst -->|"uses range"| node_arsenalui
node_arsenalui -.->|"calls API client"| node_arsenalclient
node_arsenalclient -->|"HTTP and WebSocket"| node_arsenalapi
node_arsenalui -.->|"uses console"| node_kaliconsole

click node_app "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/App.jsx"
click node_api "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/services/api.js"
click node_scenarios "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/constants/attackScenarios.js"
click node_ingest "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/IngestionPanel.jsx"
click node_discover "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/KibanaDiscover.jsx"
click node_timeline "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/TimelineView.jsx"
click node_attackpath "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/AttackPathGraph.jsx"
click node_packets "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/PacketTracerSimulator.jsx"
click node_mitre "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/MitreMatrixView.jsx"
click node_mitrecatalog "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/constants/mitreMatrix.js"
click node_ai "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/AIAssistantPanel.jsx"
click node_evidence "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/EvidenceDrawer.jsx"
click node_detections "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/DetectionStudio.jsx"
click node_hitl "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/HitlGatingPanel.jsx"
click node_audit "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/AuditLedgerView.jsx"
click node_vault "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/EvidenceVault.jsx"
click node_report "https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/ReportModal.jsx"
click node_phpapi "https://github.com/noor-hassan-b/cyber-arena/blob/main/backend-php/api/attack_path.php"
click node_nodeapi "https://github.com/noor-hassan-b/cyber-arena/blob/main/backend-php/server.js"
click node_db "https://github.com/noor-hassan-b/cyber-arena/blob/main/backend-php/config/db.php"
click node_arsenalui "https://github.com/noor-hassan-b/cyber-arena/blob/main/hackathone-arsenal/app/frontend/src/pages/Dashboard.jsx"
click node_arsenalapi "https://github.com/noor-hassan-b/cyber-arena/blob/main/hackathone-arsenal/app/backend/server.py"
click node_kaliconsole "https://github.com/noor-hassan-b/cyber-arena/blob/main/hackathone-arsenal/app/frontend/src/components/KaliConsole.jsx"
click node_arsenalclient "https://github.com/noor-hassan-b/cyber-arena/blob/main/hackathone-arsenal/app/frontend/src/lib/api.js"

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_app,node_api toneBlue
class node_scenarios,node_discover,node_timeline,node_attackpath,node_packets,node_mitre,node_mitrecatalog,node_ai,node_evidence toneAmber
class node_ingest,node_detections,node_hitl,node_audit,node_vault,node_report toneMint
class node_phpapi,node_nodeapi,node_db toneRose
class node_arsenalui,node_arsenalapi,node_kaliconsole,node_arsenalclient,node_analyst toneIndigo
```

## Components

### SOC Dashboard

- [Dashboard Shell](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/App.jsx): `frontend-react/src/App.jsx`
- [Unified API Engine](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/services/api.js): `frontend-react/src/services/api.js`

### Threat Analysis

- [Attack Scenarios](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/constants/attackScenarios.js): `frontend-react/src/constants/attackScenarios.js`
- [Telemetry Search](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/KibanaDiscover.jsx): `frontend-react/src/components/KibanaDiscover.jsx`
- [Event Timeline](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/TimelineView.jsx): `frontend-react/src/components/TimelineView.jsx`
- [Attack Path Graph](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/AttackPathGraph.jsx): `frontend-react/src/components/AttackPathGraph.jsx`
- [Packet Simulator](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/PacketTracerSimulator.jsx): `frontend-react/src/components/PacketTracerSimulator.jsx`
- [MITRE Matrix](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/MitreMatrixView.jsx): `frontend-react/src/components/MitreMatrixView.jsx`
- [MITRE Catalog](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/constants/mitreMatrix.js): `frontend-react/src/constants/mitreMatrix.js`
- [Threat Copilot](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/AIAssistantPanel.jsx): `frontend-react/src/components/AIAssistantPanel.jsx`
- [Evidence Review](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/EvidenceDrawer.jsx): `frontend-react/src/components/EvidenceDrawer.jsx`

### Response Operations

- [Telemetry Ingestion](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/IngestionPanel.jsx): `frontend-react/src/components/IngestionPanel.jsx`
- [Detection Studio](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/DetectionStudio.jsx): `frontend-react/src/components/DetectionStudio.jsx`
- [HITL Gating](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/HitlGatingPanel.jsx): `frontend-react/src/components/HitlGatingPanel.jsx`
- [Audit Ledger](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/AuditLedgerView.jsx): `frontend-react/src/components/AuditLedgerView.jsx`
- [Evidence Vault](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/EvidenceVault.jsx): `frontend-react/src/components/EvidenceVault.jsx`
- [Forensic Reports](https://github.com/noor-hassan-b/cyber-arena/blob/main/frontend-react/src/components/ReportModal.jsx): `frontend-react/src/components/ReportModal.jsx`

### Platform Services

- [PHP REST API](https://github.com/noor-hassan-b/cyber-arena/blob/main/backend-php/api/attack_path.php): `backend-php/api/attack_path.php`
- [Node Operations API](https://github.com/noor-hassan-b/cyber-arena/blob/main/backend-php/server.js): `backend-php/server.js`
- [MySQL Store](https://github.com/noor-hassan-b/cyber-arena/blob/main/backend-php/config/db.php): `backend-php/config/db.php`

### ThreatLens Range

- [ThreatLens Dashboard](https://github.com/noor-hassan-b/cyber-arena/blob/main/hackathone-arsenal/app/frontend/src/pages/Dashboard.jsx): `hackathone-arsenal/app/frontend/src/pages/Dashboard.jsx`
- [FastAPI ML Engine](https://github.com/noor-hassan-b/cyber-arena/blob/main/hackathone-arsenal/app/backend/server.py): `hackathone-arsenal/app/backend/server.py`
- [Kali Console](https://github.com/noor-hassan-b/cyber-arena/blob/main/hackathone-arsenal/app/frontend/src/components/KaliConsole.jsx): `hackathone-arsenal/app/frontend/src/components/KaliConsole.jsx`
- [Range API Client](https://github.com/noor-hassan-b/cyber-arena/blob/main/hackathone-arsenal/app/frontend/src/lib/api.js): `hackathone-arsenal/app/frontend/src/lib/api.js`

### Other components

- **SOC Analyst**

## Connections

- SOC Analyst → Dashboard Shell: uses
- Dashboard Shell → Unified API Engine: uses (evidence: `frontend-react/src/App.jsx`)
- Unified API Engine → Attack Scenarios: loads fallback data (evidence: `frontend-react/src/services/api.js`)
- SOC Analyst → Telemetry Ingestion: submits events
- Telemetry Ingestion → Unified API Engine: ingests event (evidence: `frontend-react/src/components/IngestionPanel.jsx`)
- Unified API Engine → PHP REST API: requests REST data
- PHP REST API → MySQL Store: queries events (evidence: `backend-php/api/attack_path.php`)
- Unified API Engine → Telemetry Search: supplies telemetry
- Unified API Engine → Attack Path Graph: supplies graph
- Attack Path Graph → Packet Simulator: offers simulation (evidence: `frontend-react/src/components/AttackPathGraph.jsx`)
- Unified API Engine → MITRE Matrix: supplies techniques
- MITRE Matrix → MITRE Catalog: uses catalog (evidence: `frontend-react/src/components/MitreMatrixView.jsx`)
- Unified API Engine → Threat Copilot: provides assistance
- Threat Copilot → Evidence Review: links citations
- SOC Analyst → Detection Studio: authors rules
- Detection Studio → Node Operations API: deploys rules
- SOC Analyst → HITL Gating: reviews actions
- HITL Gating → Node Operations API: submits decisions
- Node Operations API → Audit Ledger: records decisions
- Node Operations API → Evidence Vault: stores evidence
- Unified API Engine → Forensic Reports: provides report data (evidence: `frontend-react/src/components/ReportModal.jsx`)
- SOC Analyst → ThreatLens Dashboard: uses range
- ThreatLens Dashboard → Range API Client: calls API client
- Range API Client → FastAPI ML Engine: HTTP and WebSocket
- ThreatLens Dashboard → Kali Console: uses console
