# akashmsd16/ai-cyber-defense-center architecture

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

- Interactive diagram: https://gitdiagram.com/akashmsd16/ai-cyber-defense-center
- Repository: https://github.com/akashmsd16/ai-cyber-defense-center

## Overview

AI Cyber Defense Center: collectors or lab scenarios supply telemetry that the backend analyzes into alerts and incidents, assigns explainable risk, correlates entities in a knowledge graph, and supports audited defensive response. Analysts use the web console to inspect incidents and approve or roll back actions. The graph retains README-documented capabilities whose implementation was not sampled; those links cite the README, and unsampled route wiring is not asserted beyond that documentation.

Main entry points: [`frontend/src/App.tsx`](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/App.tsx) (SOC Web Console), [`frontend/src/services/api.ts`](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/services/api.ts) (API Client), [`backend/app/api/routes`](https://github.com/akashmsd16/ai-cyber-defense-center/tree/main/backend/app/api/routes) (FastAPI Routes), [`backend/app/agents`](https://github.com/akashmsd16/ai-cyber-defense-center/tree/main/backend/app/agents) (Specialized Agents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Telemetry Collection"]
  node_windows["Windows Collector<br/>[agent.py]"]
  node_simulator["Lab Simulator<br/>[simulator.py]"]
end

subgraph group_analysis["Detection and Investigation"]
  node_orchestrator["Agent Orchestrator"]
  node_agents["Specialized Agents"]
  node_agentbase["Agent Base<br/>[base_agent.py]"]
  node_rules["Detection Rules<br/>[rule_engine.py]"]
  node_malware["Malware Analyzer"]
  node_anomaly["Behavior Anomaly Model"]
  node_risk["Risk Scoring<br/>[risk_engine.py]"]
  node_knowledge["Knowledge Graph<br/>[graph_engine.py]"]
end

subgraph group_backend["SOC Backend"]
  node_api["FastAPI Routes"]
  node_models["SOC Data Models<br/>[models.py]"]
  node_database[("Relational Database<br/>[database.py]")]
end

subgraph group_response["Response and Audit"]
  node_response["Response Controller"]
  node_audit["Audit Service<br/>[audit_service.py]"]
end

subgraph group_console["Analyst Console"]
  node_frontend["SOC Web Console<br/>[App.tsx]"]
  node_auth["Authentication Context<br/>[AuthContext.tsx]"]
  node_api_client["API Client<br/>[api.ts]"]
  node_incidents["Incident Triage<br/>[IncidentsPage.tsx]"]
  node_graphpage["Graph Explorer"]
  node_dashboard["SOC Dashboard<br/>[DashboardPage.tsx]"]
  node_threatintel["Threat Intelligence"]
  node_responsepage["Response Center<br/>[ResponsePage.tsx]"]
  node_auditpage["Audit Logs<br/>[AuditLogsPage.tsx]"]
end

node_analyst(("SOC Analyst"))

node_windows -->|"submits telemetry"| node_api
node_simulator -->|"produces test events"| node_api
node_api -->|"dispatches analysis"| node_orchestrator
node_orchestrator -->|"runs agents"| node_agents
node_agents -->|"inherits common behavior"| node_agentbase
node_agents -->|"evaluates signatures"| node_rules
node_agents -->|"analyzes files"| node_malware
node_agents -->|"scores behavior"| node_anomaly
node_orchestrator -->|"calculates risk"| node_risk
node_orchestrator -->|"correlates entities"| node_knowledge
node_api -->|"persists SOC records"| node_models
node_models -->|"uses ORM base"| node_database
node_api -->|"executes approved actions"| node_response
node_response -->|"records actions"| node_audit
node_analyst -->|"uses console"| node_frontend
node_frontend -->|"provides authentication"| node_auth
node_auth -->|"requests profile"| node_api_client
node_frontend -->|"routes to triage"| node_incidents
node_frontend -->|"routes to graph"| node_graphpage
node_frontend -->|"routes to dashboard"| node_dashboard
node_frontend -->|"routes to intelligence"| node_threatintel
node_frontend -->|"routes to response"| node_responsepage
node_frontend -->|"routes to audit"| node_auditpage
node_incidents -->|"requests incidents"| node_api_client
node_graphpage -->|"requests graph data"| node_api_client
node_dashboard -->|"requests dashboard data"| node_api_client
node_threatintel -->|"requests indicators"| node_api_client
node_responsepage -->|"requests response actions"| node_api_client
node_auditpage -->|"requests audit records"| node_api_client
node_api_client -->|"calls backend API"| node_api
node_incidents -->|"initiates mitigation"| node_responsepage
node_incidents -->|"displays risk breakdown"| node_risk

click node_windows "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/collectors/windows/agent.py"
click node_simulator "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/collectors/lab/simulator.py"
click node_api "https://github.com/akashmsd16/ai-cyber-defense-center/tree/main/backend/app/api/routes"
click node_orchestrator "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/agents/agent_orchestrator.py"
click node_agents "https://github.com/akashmsd16/ai-cyber-defense-center/tree/main/backend/app/agents"
click node_agentbase "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/agents/base_agent.py"
click node_rules "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/detection/rule_engine.py"
click node_malware "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/detection/malware_analyzer.py"
click node_anomaly "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/ml/anomaly_detector.py"
click node_risk "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/services/risk_engine.py"
click node_knowledge "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/knowledge_graph/graph_engine.py"
click node_models "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/models/models.py"
click node_database "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/core/database.py"
click node_response "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/response/response_controller.py"
click node_audit "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/services/audit_service.py"
click node_frontend "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/App.tsx"
click node_auth "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/context/AuthContext.tsx"
click node_api_client "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/services/api.ts"
click node_incidents "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/IncidentsPage.tsx"
click node_graphpage "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/KnowledgeGraphPage.tsx"
click node_dashboard "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/DashboardPage.tsx"
click node_threatintel "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/ThreatIntelPage.tsx"
click node_responsepage "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/ResponsePage.tsx"
click node_auditpage "https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/AuditLogsPage.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_windows,node_simulator toneBlue
class node_orchestrator,node_agents,node_agentbase,node_rules,node_malware,node_anomaly,node_risk,node_knowledge toneAmber
class node_api,node_models,node_database toneMint
class node_response,node_audit toneRose
class node_frontend,node_auth,node_api_client,node_incidents,node_graphpage,node_dashboard,node_threatintel,node_responsepage,node_auditpage,node_analyst toneIndigo
```

## Components

### Telemetry Collection

- [Windows Collector](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/collectors/windows/agent.py): `collectors/windows/agent.py`
- [Lab Simulator](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/collectors/lab/simulator.py): `collectors/lab/simulator.py`

### Detection and Investigation

- [Agent Orchestrator](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/agents/agent_orchestrator.py): `backend/app/agents/agent_orchestrator.py`
- [Specialized Agents](https://github.com/akashmsd16/ai-cyber-defense-center/tree/main/backend/app/agents): `backend/app/agents`
- [Agent Base](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/agents/base_agent.py): `backend/app/agents/base_agent.py`
- [Detection Rules](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/detection/rule_engine.py): `backend/app/detection/rule_engine.py`
- [Malware Analyzer](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/detection/malware_analyzer.py): `backend/app/detection/malware_analyzer.py`
- [Behavior Anomaly Model](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/ml/anomaly_detector.py): `backend/app/ml/anomaly_detector.py`
- [Risk Scoring](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/services/risk_engine.py): `backend/app/services/risk_engine.py`
- [Knowledge Graph](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/knowledge_graph/graph_engine.py): `backend/app/knowledge_graph/graph_engine.py`

### SOC Backend

- [FastAPI Routes](https://github.com/akashmsd16/ai-cyber-defense-center/tree/main/backend/app/api/routes): `backend/app/api/routes`
- [SOC Data Models](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/models/models.py): `backend/app/models/models.py`
- [Relational Database](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/core/database.py): `backend/app/core/database.py`

### Response and Audit

- [Response Controller](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/response/response_controller.py): `backend/app/response/response_controller.py`
- [Audit Service](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/backend/app/services/audit_service.py): `backend/app/services/audit_service.py`

### Analyst Console

- [SOC Web Console](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Authentication Context](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [API Client](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [Incident Triage](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/IncidentsPage.tsx): `frontend/src/pages/IncidentsPage.tsx`
- [Graph Explorer](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/KnowledgeGraphPage.tsx): `frontend/src/pages/KnowledgeGraphPage.tsx`
- [SOC Dashboard](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/DashboardPage.tsx): `frontend/src/pages/DashboardPage.tsx`
- [Threat Intelligence](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/ThreatIntelPage.tsx): `frontend/src/pages/ThreatIntelPage.tsx`
- [Response Center](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/ResponsePage.tsx): `frontend/src/pages/ResponsePage.tsx`
- [Audit Logs](https://github.com/akashmsd16/ai-cyber-defense-center/blob/main/frontend/src/pages/AuditLogsPage.tsx): `frontend/src/pages/AuditLogsPage.tsx`

### Other components

- **SOC Analyst**

## Connections

- Windows Collector → FastAPI Routes: submits telemetry (evidence: `README.md`)
- Lab Simulator → FastAPI Routes: produces test events (evidence: `README.md`)
- FastAPI Routes → Agent Orchestrator: dispatches analysis (evidence: `README.md`)
- Agent Orchestrator → Specialized Agents: runs agents (evidence: `backend/app/agents/agent_orchestrator.py`)
- Specialized Agents → Agent Base: inherits common behavior (evidence: `backend/app/agents/behavior_agent.py`)
- Specialized Agents → Detection Rules: evaluates signatures (evidence: `backend/app/agents/threat_detection_agent.py`)
- Specialized Agents → Malware Analyzer: analyzes files (evidence: `backend/app/agents/malware_agent.py`)
- Specialized Agents → Behavior Anomaly Model: scores behavior (evidence: `backend/app/agents/behavior_agent.py`)
- Agent Orchestrator → Risk Scoring: calculates risk (evidence: `backend/app/agents/agent_orchestrator.py`)
- Agent Orchestrator → Knowledge Graph: correlates entities (evidence: `README.md`)
- FastAPI Routes → SOC Data Models: persists SOC records (evidence: `README.md`)
- SOC Data Models → Relational Database: uses ORM base (evidence: `backend/app/models/models.py`)
- FastAPI Routes → Response Controller: executes approved actions (evidence: `README.md`)
- Response Controller → Audit Service: records actions (evidence: `README.md`)
- SOC Analyst → SOC Web Console: uses console (evidence: `README.md`)
- SOC Web Console → Authentication Context: provides authentication (evidence: `frontend/src/App.tsx`)
- Authentication Context → API Client: requests profile (evidence: `frontend/src/context/AuthContext.tsx`)
- SOC Web Console → Incident Triage: routes to triage (evidence: `frontend/src/App.tsx`)
- SOC Web Console → Graph Explorer: routes to graph (evidence: `frontend/src/App.tsx`)
- SOC Web Console → SOC Dashboard: routes to dashboard (evidence: `frontend/src/App.tsx`)
- SOC Web Console → Threat Intelligence: routes to intelligence (evidence: `frontend/src/App.tsx`)
- SOC Web Console → Response Center: routes to response (evidence: `frontend/src/App.tsx`)
- SOC Web Console → Audit Logs: routes to audit (evidence: `frontend/src/App.tsx`)
- Incident Triage → API Client: requests incidents (evidence: `frontend/src/pages/IncidentsPage.tsx`)
- Graph Explorer → API Client: requests graph data (evidence: `frontend/src/pages/KnowledgeGraphPage.tsx`)
- SOC Dashboard → API Client: requests dashboard data (evidence: `frontend/src/pages/DashboardPage.tsx`)
- Threat Intelligence → API Client: requests indicators (evidence: `frontend/src/services/api.ts`)
- Response Center → API Client: requests response actions (evidence: `frontend/src/services/api.ts`)
- Audit Logs → API Client: requests audit records (evidence: `README.md`)
- API Client → FastAPI Routes: calls backend API (evidence: `frontend/src/services/api.ts`)
- Incident Triage → Response Center: initiates mitigation (evidence: `README.md`)
- Incident Triage → Risk Scoring: displays risk breakdown (evidence: `README.md`)
