# ishu-26/sentinel-ai--cyber-defense-platform architecture

> Architecture diagram of the GitHub repository ishu-26/sentinel-ai--cyber-defense-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ishu-26/sentinel-ai--cyber-defense-platform
- Repository: https://github.com/ishu-26/sentinel-ai--cyber-defense-platform

## Overview

Sentinel AI is a SOC platform where analysts submit URLs, network flows, files, or folders through a React dashboard; FastAPI routes these to detection services, then presents scored, explainable alerts for investigation. The README documents phishing, network IDS, ML malware, YARA scanning, unified risk, alert dashboards, and a RAG Security Copilot. Relationships among sampled API routes and services are supported by the SOURCE INDEX; links for documented but unsampled capabilities cite the README. The graph does not imply unshown calls between sibling detection services.

Main entry points: [`backend/app/main.py`](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/main.py) (FastAPI application), [`backend/app/services/alerts_service.py`](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/services/alerts_service.py) (Unified alert feed), [`backend/app/api/malware.py`](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/malware.py) (Malware and YARA endpoints), [`backend/app/api/phishing.py`](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/phishing.py) (Phishing endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["SOC dashboard"]
  node_app["Dashboard routes<br/>[App.tsx]"]
  node_analysis_pages["Analysis pages"]
  node_alert_pages["Alert views"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_detection["Threat detection"]
  node_phishing_api["Phishing endpoint<br/>[phishing.py]"]
  node_phishing_detection["Phishing analysis"]
  node_network_api["Network endpoint<br/>[network.py]"]
  node_network_detection["Network IDS"]
  node_malware_api["Malware and YARA endpoints<br/>[malware.py]"]
  node_ml_malware["ML malware scanner"]
  node_yara_scan["YARA folder scanner"]
end

subgraph group_risk["Risk and alerts"]
  node_risk_engine["Unified risk engine<br/>[engine.py]"]
  node_alert_api["Alert endpoints<br/>[alerts.py]"]
  node_alerts["Unified alert feed<br/>[alerts_service.py]"]
end

subgraph group_copilot["Security Copilot"]
  node_copilot_api["Copilot endpoint<br/>[copilot.py]"]
  node_copilot_agent["RAG agent<br/>[agent.py]"]
  node_qdrant_manager["Knowledge retrieval<br/>[qdrant_manager.py]"]
  node_qdrant[("Qdrant vector store")]
end

subgraph group_runtime["Backend runtime"]
  node_api_runtime["FastAPI application<br/>[main.py]"]
  node_supabase[("Supabase<br/>[supabase_client.py]")]
end

node_analyst(("Security analyst"))

node_analyst -->|"uses dashboard"| node_app
node_app -->|"routes to"| node_analysis_pages
node_app -->|"routes to"| node_alert_pages
node_analysis_pages -->|"requests analysis"| node_api_client
node_alert_pages -->|"requests alerts"| node_api_client
node_api_client -->|"sends REST requests"| node_api_runtime
node_api_runtime -->|"registers route"| node_phishing_api
node_api_runtime -->|"registers route"| node_network_api
node_api_runtime -->|"registers route"| node_malware_api
node_api_runtime -->|"registers route"| node_alert_api
node_api_runtime -->|"registers route"| node_copilot_api
node_phishing_api -->|"uses predictor"| node_phishing_detection
node_network_api -->|"uses predictor"| node_network_detection
node_malware_api -->|"uses scanner"| node_ml_malware
node_malware_api -->|"starts folder scans"| node_yara_scan
node_phishing_api -->|"evaluates risk"| node_risk_engine
node_network_api -->|"evaluates risk"| node_risk_engine
node_malware_api -->|"evaluates risk"| node_risk_engine
node_phishing_api -->|"records detections"| node_alerts
node_network_api -->|"records detections"| node_alerts
node_malware_api -->|"records detections"| node_alerts
node_alert_api -->|"reads alert feed"| node_alerts
node_alerts -->|"reads and writes"| node_supabase
node_copilot_api -->|"delegates queries"| node_copilot_agent
node_copilot_agent -->|"retrieves context"| node_qdrant_manager
node_qdrant_manager -->|"searches vectors"| node_qdrant
node_qdrant_manager -->|"stores embeddings"| node_qdrant
node_risk_engine -.->|"supplies scored findings"| node_alerts
node_yara_scan -.->|"persists scan results"| node_supabase

click node_app "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/frontend/src/App.tsx"
click node_analysis_pages "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/frontend/src/pages"
click node_alert_pages "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/frontend/src/pages"
click node_api_client "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/frontend/src/services/api.ts"
click node_api_runtime "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/main.py"
click node_phishing_api "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/phishing.py"
click node_phishing_detection "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/backend/app/services/phishing"
click node_network_api "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/network.py"
click node_network_detection "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/backend/app/services/network"
click node_malware_api "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/malware.py"
click node_ml_malware "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/backend/app/services/malware"
click node_yara_scan "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/backend/app/services/yara_scanner"
click node_risk_engine "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/services/risk_engine/engine.py"
click node_alert_api "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/alerts.py"
click node_alerts "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/services/alerts_service.py"
click node_supabase "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/db/supabase_client.py"
click node_copilot_api "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/copilot.py"
click node_copilot_agent "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/services/copilot/agent.py"
click node_qdrant_manager "https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/services/copilot/qdrant_manager.py"

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_analysis_pages,node_alert_pages,node_api_client toneBlue
class node_phishing_api,node_phishing_detection,node_network_api,node_network_detection,node_malware_api,node_ml_malware,node_yara_scan toneAmber
class node_risk_engine,node_alert_api,node_alerts toneMint
class node_copilot_api,node_copilot_agent,node_qdrant_manager,node_qdrant toneRose
class node_api_runtime,node_supabase,node_analyst toneIndigo
```

## Components

### SOC dashboard

- [Dashboard routes](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Analysis pages](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/frontend/src/pages): `frontend/src/pages`
- [Alert views](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/frontend/src/pages): `frontend/src/pages`
- [API client](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### Threat detection

- [Phishing endpoint](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/phishing.py): `backend/app/api/phishing.py`
- [Phishing analysis](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/backend/app/services/phishing): `backend/app/services/phishing`
- [Network endpoint](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/network.py): `backend/app/api/network.py`
- [Network IDS](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/backend/app/services/network): `backend/app/services/network`
- [Malware and YARA endpoints](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/malware.py): `backend/app/api/malware.py`
- [ML malware scanner](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/backend/app/services/malware): `backend/app/services/malware`
- [YARA folder scanner](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/tree/main/backend/app/services/yara_scanner): `backend/app/services/yara_scanner`

### Risk and alerts

- [Unified risk engine](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/services/risk_engine/engine.py): `backend/app/services/risk_engine/engine.py`
- [Alert endpoints](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/alerts.py): `backend/app/api/alerts.py`
- [Unified alert feed](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/services/alerts_service.py): `backend/app/services/alerts_service.py`

### Security Copilot

- [Copilot endpoint](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/api/copilot.py): `backend/app/api/copilot.py`
- [RAG agent](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/services/copilot/agent.py): `backend/app/services/copilot/agent.py`
- [Knowledge retrieval](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/services/copilot/qdrant_manager.py): `backend/app/services/copilot/qdrant_manager.py`
- **Qdrant vector store**

### Backend runtime

- [FastAPI application](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/main.py): `backend/app/main.py`
- [Supabase](https://github.com/ishu-26/sentinel-ai--cyber-defense-platform/blob/main/backend/app/db/supabase_client.py): `backend/app/db/supabase_client.py`

### Other components

- **Security analyst**

## Connections

- Security analyst → Dashboard routes: uses dashboard
- Dashboard routes → Analysis pages: routes to (evidence: `frontend/src/App.tsx`)
- Dashboard routes → Alert views: routes to (evidence: `frontend/src/App.tsx`)
- Analysis pages → API client: requests analysis (evidence: `frontend/src/pages/MalwareAnalysis.tsx`)
- Alert views → API client: requests alerts (evidence: `frontend/src/pages/LiveAlerts.tsx`)
- API client → FastAPI application: sends REST requests
- FastAPI application → Phishing endpoint: registers route (evidence: `backend/app/main.py`)
- FastAPI application → Network endpoint: registers route (evidence: `backend/app/main.py`)
- FastAPI application → Malware and YARA endpoints: registers route (evidence: `backend/app/main.py`)
- FastAPI application → Alert endpoints: registers route (evidence: `backend/app/main.py`)
- FastAPI application → Copilot endpoint: registers route (evidence: `backend/app/main.py`)
- Phishing endpoint → Phishing analysis: uses predictor (evidence: `backend/app/api/phishing.py`)
- Network endpoint → Network IDS: uses predictor (evidence: `backend/app/api/network.py`)
- Malware and YARA endpoints → ML malware scanner: uses scanner (evidence: `backend/app/api/malware.py`)
- Malware and YARA endpoints → YARA folder scanner: starts folder scans (evidence: `backend/app/api/malware.py`)
- Phishing endpoint → Unified risk engine: evaluates risk (evidence: `backend/app/api/phishing.py`)
- Network endpoint → Unified risk engine: evaluates risk (evidence: `backend/app/api/network.py`)
- Malware and YARA endpoints → Unified risk engine: evaluates risk (evidence: `backend/app/api/malware.py`)
- Phishing endpoint → Unified alert feed: records detections (evidence: `backend/app/api/phishing.py`)
- Network endpoint → Unified alert feed: records detections (evidence: `backend/app/api/network.py`)
- Malware and YARA endpoints → Unified alert feed: records detections (evidence: `backend/app/api/malware.py`)
- Alert endpoints → Unified alert feed: reads alert feed (evidence: `backend/app/api/alerts.py`)
- Unified alert feed → Supabase: reads and writes (evidence: `backend/app/services/alerts_service.py`)
- Copilot endpoint → RAG agent: delegates queries (evidence: `backend/app/api/copilot.py`)
- RAG agent → Knowledge retrieval: retrieves context (evidence: `backend/app/api/copilot.py`)
- Knowledge retrieval → Qdrant vector store: searches vectors (evidence: `backend/app/services/copilot/qdrant_manager.py`)
- Knowledge retrieval → Qdrant vector store: stores embeddings (evidence: `backend/app/services/copilot/qdrant_manager.py`)
- Unified risk engine → Unified alert feed: supplies scored findings
- YARA folder scanner → Supabase: persists scan results
