# bodaupender/sentinelwatch architecture

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

- Interactive diagram: https://gitdiagram.com/bodaupender/sentinelwatch
- Repository: https://github.com/bodaupender/sentinelwatch

## Overview

SentinelWatch is a Windows endpoint monitoring and SOC investigation platform. Its main workflow runs from endpoint collection and agent enrollment through telemetry delivery, backend detection and alert handling, and analyst review in the dashboard. The README documents additional capabilities including audit, reports, AI investigation, configuration distribution, and live updates; these are represented even where their implementation was not sampled. Source excerpts show agent/backend entry points and database setup, but not every runtime call, so some cross-system links rely on explicit README architecture statements.

Main entry points: [`frontend/src/App.tsx`](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/App.tsx) (Dashboard Routes), [`backend/src/sentinelwatch_backend/api/v1`](https://github.com/bodaupender/sentinelwatch/tree/main/backend/src/sentinelwatch_backend/api/v1) (REST API), [`backend/src/sentinelwatch_backend/database.py`](https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/database.py) (Database Layer), [`agent/src/sentinelwatch_agent/main.py`](https://github.com/bodaupender/sentinelwatch/blob/main/agent/src/sentinelwatch_agent/main.py) (Agent Runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Endpoint Agent"]
  node_agent_runtime["Agent Runtime<br/>[main.py]"]
  node_collectors["Telemetry Collectors"]
  node_agent_models["Telemetry Models"]
  node_agent_identity["Agent Identity<br/>[identity.py]"]
  node_agent_transport["Batching and Transport"]
end

subgraph group_backend["Backend Platform"]
  node_api["REST API"]
  node_enrollment["Agent Enrollment"]
  node_detection["Detection Engine"]
  node_alert_workflow["Alert Management<br/>[alerts.py]"]
  node_ai_investigation["AI Investigation"]
  node_auth["Authentication<br/>[auth.py]"]
  node_audit_reports["Audit and Reports"]
  node_realtime["Live Updates<br/>[realtime.py]"]
end

subgraph group_storage["Persistence"]
  node_database_layer["Database Layer<br/>[database.py]"]
  node_database[("Platform Database")]
end

subgraph group_dashboard["SOC Dashboard"]
  node_dashboard["Dashboard Routes<br/>[App.tsx]"]
  node_api_client["Dashboard API Client<br/>[api.ts]"]
  node_live_bridge["Live Updates Bridge"]
end

subgraph group_investigation["Analyst Workflows"]
  node_triage["Alert Triage<br/>[AlertsPage.tsx]"]
  node_threat_hunting["Telemetry Exploration"]
  node_rule_management["Rule Management"]
  node_endpoint_inventory["Endpoint Inventory<br/>[AgentsPage.tsx]"]
  node_audit_viewer["Audit Viewer<br/>[AuditPage.tsx]"]
  node_reports["Reports<br/>[ReportsPage.tsx]"]
  node_ai_workspace["AI Workspace"]
end

node_endpoint(("Windows Endpoint"))
node_analyst(("SOC Analyst"))

node_endpoint -->|"provides telemetry"| node_collectors
node_agent_runtime -->|"runs collection"| node_collectors
node_collectors -->|"creates records"| node_agent_models
node_agent_runtime -->|"manages identity"| node_agent_identity
node_agent_runtime -.->|"sends batches"| node_agent_transport
node_agent_transport -->|"sends telemetry"| node_enrollment
node_agent_identity -->|"enrolls endpoint"| node_enrollment
node_enrollment -.->|"stores credentials"| node_database_layer
node_api -.->|"persists API data"| node_database_layer
node_database_layer -->|"reads and writes"| node_database
node_api -.->|"evaluates telemetry"| node_detection
node_detection -->|"raises alerts"| node_alert_workflow
node_alert_workflow -->|"stores evidence"| node_database_layer
node_api -.->|"authenticates requests"| node_auth
node_api -.->|"serves audit and reports"| node_audit_reports
node_alert_workflow -->|"supplies alert evidence"| node_ai_investigation
node_realtime -->|"sends invalidations"| node_dashboard
node_analyst -->|"uses"| node_dashboard
node_dashboard -.->|"routes user actions"| node_api_client
node_api_client -->|"calls REST API"| node_api
node_live_bridge -->|"receives updates"| node_realtime
node_dashboard -->|"routes to"| node_triage
node_dashboard -->|"routes to"| node_threat_hunting
node_dashboard -->|"routes to"| node_rule_management
node_dashboard -->|"routes to"| node_endpoint_inventory
node_dashboard -->|"routes to"| node_audit_viewer
node_dashboard -->|"routes to"| node_reports
node_dashboard -->|"opens investigation"| node_ai_workspace

click node_agent_runtime "https://github.com/bodaupender/sentinelwatch/blob/main/agent/src/sentinelwatch_agent/main.py"
click node_collectors "https://github.com/bodaupender/sentinelwatch/tree/main/agent/src/sentinelwatch_agent/collectors"
click node_agent_models "https://github.com/bodaupender/sentinelwatch/tree/main/agent/src/sentinelwatch_agent/models"
click node_agent_identity "https://github.com/bodaupender/sentinelwatch/blob/main/agent/src/sentinelwatch_agent/identity.py"
click node_agent_transport "https://github.com/bodaupender/sentinelwatch/tree/main/agent/src/sentinelwatch_agent/transport"
click node_api "https://github.com/bodaupender/sentinelwatch/tree/main/backend/src/sentinelwatch_backend/api/v1"
click node_enrollment "https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/api/v1/agent_communication.py"
click node_detection "https://github.com/bodaupender/sentinelwatch/tree/main/detection_rules"
click node_alert_workflow "https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/api/v1/alerts.py"
click node_ai_investigation "https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/api/v1/ai_investigation.py"
click node_auth "https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/api/v1/auth.py"
click node_audit_reports "https://github.com/bodaupender/sentinelwatch/tree/main/backend/src/sentinelwatch_backend/api/v1"
click node_realtime "https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/realtime.py"
click node_database_layer "https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/database.py"
click node_dashboard "https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/App.tsx"
click node_api_client "https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/lib/api.ts"
click node_live_bridge "https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/components/LiveUpdatesBridge.tsx"
click node_triage "https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/AlertsPage.tsx"
click node_threat_hunting "https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/ProcessExplorerPage.tsx"
click node_rule_management "https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/DetectionRulesPage.tsx"
click node_endpoint_inventory "https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/AgentsPage.tsx"
click node_audit_viewer "https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/AuditPage.tsx"
click node_reports "https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/ReportsPage.tsx"
click node_ai_workspace "https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/AIInvestigationPage.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_agent_runtime,node_collectors,node_agent_models,node_agent_identity,node_agent_transport toneBlue
class node_api,node_enrollment,node_detection,node_alert_workflow,node_ai_investigation,node_auth,node_audit_reports,node_realtime toneAmber
class node_database_layer,node_database toneMint
class node_dashboard,node_api_client,node_live_bridge toneRose
class node_triage,node_threat_hunting,node_rule_management,node_endpoint_inventory,node_audit_viewer,node_reports,node_ai_workspace,node_endpoint,node_analyst toneIndigo
```

## Components

### Endpoint Agent

- [Agent Runtime](https://github.com/bodaupender/sentinelwatch/blob/main/agent/src/sentinelwatch_agent/main.py): `agent/src/sentinelwatch_agent/main.py`
- [Telemetry Collectors](https://github.com/bodaupender/sentinelwatch/tree/main/agent/src/sentinelwatch_agent/collectors): `agent/src/sentinelwatch_agent/collectors`
- [Telemetry Models](https://github.com/bodaupender/sentinelwatch/tree/main/agent/src/sentinelwatch_agent/models): `agent/src/sentinelwatch_agent/models`
- [Agent Identity](https://github.com/bodaupender/sentinelwatch/blob/main/agent/src/sentinelwatch_agent/identity.py): `agent/src/sentinelwatch_agent/identity.py`
- [Batching and Transport](https://github.com/bodaupender/sentinelwatch/tree/main/agent/src/sentinelwatch_agent/transport): `agent/src/sentinelwatch_agent/transport`

### Backend Platform

- [REST API](https://github.com/bodaupender/sentinelwatch/tree/main/backend/src/sentinelwatch_backend/api/v1): `backend/src/sentinelwatch_backend/api/v1`
- [Agent Enrollment](https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/api/v1/agent_communication.py): `backend/src/sentinelwatch_backend/api/v1/agent_communication.py`
- [Detection Engine](https://github.com/bodaupender/sentinelwatch/tree/main/detection_rules): `detection_rules`
- [Alert Management](https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/api/v1/alerts.py): `backend/src/sentinelwatch_backend/api/v1/alerts.py`
- [AI Investigation](https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/api/v1/ai_investigation.py): `backend/src/sentinelwatch_backend/api/v1/ai_investigation.py`
- [Authentication](https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/api/v1/auth.py): `backend/src/sentinelwatch_backend/api/v1/auth.py`
- [Audit and Reports](https://github.com/bodaupender/sentinelwatch/tree/main/backend/src/sentinelwatch_backend/api/v1): `backend/src/sentinelwatch_backend/api/v1`
- [Live Updates](https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/realtime.py): `backend/src/sentinelwatch_backend/realtime.py`

### Persistence

- [Database Layer](https://github.com/bodaupender/sentinelwatch/blob/main/backend/src/sentinelwatch_backend/database.py): `backend/src/sentinelwatch_backend/database.py`
- **Platform Database**

### SOC Dashboard

- [Dashboard Routes](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Dashboard API Client](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [Live Updates Bridge](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/components/LiveUpdatesBridge.tsx): `frontend/src/components/LiveUpdatesBridge.tsx`

### Analyst Workflows

- [Alert Triage](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/AlertsPage.tsx): `frontend/src/pages/AlertsPage.tsx`
- [Telemetry Exploration](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/ProcessExplorerPage.tsx): `frontend/src/pages/ProcessExplorerPage.tsx`
- [Rule Management](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/DetectionRulesPage.tsx): `frontend/src/pages/DetectionRulesPage.tsx`
- [Endpoint Inventory](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/AgentsPage.tsx): `frontend/src/pages/AgentsPage.tsx`
- [Audit Viewer](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/AuditPage.tsx): `frontend/src/pages/AuditPage.tsx`
- [Reports](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/ReportsPage.tsx): `frontend/src/pages/ReportsPage.tsx`
- [AI Workspace](https://github.com/bodaupender/sentinelwatch/blob/main/frontend/src/pages/AIInvestigationPage.tsx): `frontend/src/pages/AIInvestigationPage.tsx`

### Other components

- **Windows Endpoint**
- **SOC Analyst**

## Connections

- Windows Endpoint → Telemetry Collectors: provides telemetry (evidence: `README.md`)
- Agent Runtime → Telemetry Collectors: runs collection (evidence: `agent/src/sentinelwatch_agent/main.py`)
- Telemetry Collectors → Telemetry Models: creates records (evidence: `agent/src/sentinelwatch_agent/collectors/service.py`)
- Agent Runtime → Agent Identity: manages identity (evidence: `agent/src/sentinelwatch_agent/main.py`)
- Agent Runtime → Batching and Transport: sends batches (evidence: `agent/src/sentinelwatch_agent/main.py`)
- Batching and Transport → Agent Enrollment: sends telemetry (evidence: `README.md`)
- Agent Identity → Agent Enrollment: enrolls endpoint (evidence: `README.md`)
- Agent Enrollment → Database Layer: stores credentials
- REST API → Database Layer: persists API data (evidence: `backend/src/sentinelwatch_backend/api/v1/enrollment_tokens.py`)
- Database Layer → Platform Database: reads and writes (evidence: `backend/src/sentinelwatch_backend/database.py`)
- REST API → Detection Engine: evaluates telemetry
- Detection Engine → Alert Management: raises alerts (evidence: `README.md`)
- Alert Management → Database Layer: stores evidence (evidence: `README.md`)
- REST API → Authentication: authenticates requests
- REST API → Audit and Reports: serves audit and reports
- Alert Management → AI Investigation: supplies alert evidence (evidence: `README.md`)
- Live Updates → Dashboard Routes: sends invalidations (evidence: `README.md`)
- SOC Analyst → Dashboard Routes: uses (evidence: `frontend/src/App.tsx`)
- Dashboard Routes → Dashboard API Client: routes user actions
- Dashboard API Client → REST API: calls REST API (evidence: `README.md`)
- Live Updates Bridge → Live Updates: receives updates (evidence: `README.md`)
- Dashboard Routes → Alert Triage: routes to (evidence: `frontend/src/App.tsx`)
- Dashboard Routes → Telemetry Exploration: routes to (evidence: `frontend/src/App.tsx`)
- Dashboard Routes → Rule Management: routes to (evidence: `frontend/src/App.tsx`)
- Dashboard Routes → Endpoint Inventory: routes to (evidence: `frontend/src/App.tsx`)
- Dashboard Routes → Audit Viewer: routes to (evidence: `frontend/src/App.tsx`)
- Dashboard Routes → Reports: routes to (evidence: `frontend/src/App.tsx`)
- Dashboard Routes → AI Workspace: opens investigation (evidence: `README.md`)
