# keshavsundar10-kk/sentrax architecture

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

- Interactive diagram: https://gitdiagram.com/keshavsundar10-kk/sentrax
- Repository: https://github.com/keshavsundar10-kk/sentrax

## Overview

SentraX is an AI-agent security monitoring dashboard with a Spring backend for task records and rule-based action evaluation. The principal workflow is to submit a task intent and proposed action in the Live Demo, reuse or create a task, request an evaluation, and display the decision while the backend records a security event. The dashboard also refreshes metrics, tasks, and recent events. The sampled material does not establish live data wiring for every page or the database configuration, so those links are omitted or marked unverified.

Main entry points: [`sentrax-frontend/src/App.jsx`](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/App.jsx) (Page router), [`sentrax-frontend/src/services/api.js`](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/services/api.js) (API client), [`sentrax-backend/src/main/java/com/sentrax/SecurityController.java`](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/SecurityController.java) (Security evaluation), [`sentrax-backend/src/main/java/com/sentrax/TaskRepository.java`](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/TaskRepository.java) (Task persistence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Monitoring interface"]
  node_app["Page router<br/>[App.jsx]"]
  node_live_demo["Action evaluation<br/>[LiveDemo.jsx]"]
  node_dashboard["Live dashboard<br/>[Dashboard.jsx]"]
  node_tasks_page["Task monitor<br/>[Tasks.jsx]"]
  node_events_page["Security events<br/>[SecurityEvents.jsx]"]
  node_analytics_page["Analytics view<br/>[Analytics.jsx]"]
  node_nav["Navigation<br/>[Sidebar.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_backend["Security service"]
  node_task_controller["Task endpoints"]
  node_security_controller["Security evaluation"]
  node_metrics_controller["Metrics endpoint"]
end

subgraph group_persistence["Task and event records"]
  node_task_repository["Task persistence"]
  node_task_entity["Task record<br/>[Task.java]"]
  node_event_repository["Event persistence"]
  node_event_entity["Security event<br/>[SecurityEvent.java]"]
end

node_operator(("Security operator"))

node_operator -->|"opens"| node_app
node_app -->|"routes to"| node_live_demo
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_tasks_page
node_app -->|"routes to"| node_events_page
node_app -->|"routes to"| node_analytics_page
node_live_demo -->|"requests tasks and evaluation"| node_api_client
node_dashboard -->|"loads monitoring data"| node_api_client
node_api_client -->|"calls task routes"| node_task_controller
node_api_client -->|"calls security routes"| node_security_controller
node_task_controller -->|"reads and saves"| node_task_repository
node_task_repository -->|"persists"| node_task_entity
node_security_controller -->|"looks up task"| node_task_repository
node_security_controller -->|"saves and lists events"| node_event_repository
node_event_repository -->|"persists"| node_event_entity
node_api_client -.->|"requests metrics"| node_metrics_controller
node_metrics_controller -->|"counts decisions"| node_event_repository

click node_app "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/App.jsx"
click node_live_demo "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/pages/LiveDemo.jsx"
click node_dashboard "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/pages/Dashboard.jsx"
click node_tasks_page "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/pages/Tasks.jsx"
click node_events_page "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/pages/SecurityEvents.jsx"
click node_analytics_page "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/pages/Analytics.jsx"
click node_nav "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/components/Sidebar.jsx"
click node_api_client "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/services/api.js"
click node_task_controller "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/TaskController.java"
click node_security_controller "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/SecurityController.java"
click node_metrics_controller "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/SecurityMetricsController.java"
click node_task_repository "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/TaskRepository.java"
click node_task_entity "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/Task.java"
click node_event_repository "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/SecurityEventRepository.java"
click node_event_entity "https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/SecurityEvent.java"

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_live_demo,node_dashboard,node_tasks_page,node_events_page,node_analytics_page,node_nav,node_api_client toneBlue
class node_task_controller,node_security_controller,node_metrics_controller toneAmber
class node_task_repository,node_task_entity,node_event_repository,node_event_entity toneMint
class node_operator toneIndigo
```

## Components

### Monitoring interface

- [Page router](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/App.jsx): `sentrax-frontend/src/App.jsx`
- [Action evaluation](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/pages/LiveDemo.jsx): `sentrax-frontend/src/pages/LiveDemo.jsx`
- [Live dashboard](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/pages/Dashboard.jsx): `sentrax-frontend/src/pages/Dashboard.jsx`
- [Task monitor](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/pages/Tasks.jsx): `sentrax-frontend/src/pages/Tasks.jsx`
- [Security events](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/pages/SecurityEvents.jsx): `sentrax-frontend/src/pages/SecurityEvents.jsx`
- [Analytics view](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/pages/Analytics.jsx): `sentrax-frontend/src/pages/Analytics.jsx`
- [Navigation](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/components/Sidebar.jsx): `sentrax-frontend/src/components/Sidebar.jsx`
- [API client](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-frontend/src/services/api.js): `sentrax-frontend/src/services/api.js`

### Security service

- [Task endpoints](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/TaskController.java): `sentrax-backend/src/main/java/com/sentrax/TaskController.java`
- [Security evaluation](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/SecurityController.java): `sentrax-backend/src/main/java/com/sentrax/SecurityController.java`
- [Metrics endpoint](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/SecurityMetricsController.java): `sentrax-backend/src/main/java/com/sentrax/SecurityMetricsController.java`

### Task and event records

- [Task persistence](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/TaskRepository.java): `sentrax-backend/src/main/java/com/sentrax/TaskRepository.java`
- [Task record](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/Task.java): `sentrax-backend/src/main/java/com/sentrax/Task.java`
- [Event persistence](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/SecurityEventRepository.java): `sentrax-backend/src/main/java/com/sentrax/SecurityEventRepository.java`
- [Security event](https://github.com/keshavsundar10-kk/sentrax/blob/main/sentrax-backend/src/main/java/com/sentrax/SecurityEvent.java): `sentrax-backend/src/main/java/com/sentrax/SecurityEvent.java`

### Other components

- **Security operator**

## Connections

- Security operator → Page router: opens (evidence: `sentrax-frontend/src/App.jsx`)
- Page router → Action evaluation: routes to (evidence: `sentrax-frontend/src/App.jsx`)
- Page router → Live dashboard: routes to (evidence: `sentrax-frontend/src/App.jsx`)
- Page router → Task monitor: routes to (evidence: `sentrax-frontend/src/App.jsx`)
- Page router → Security events: routes to (evidence: `sentrax-frontend/src/App.jsx`)
- Page router → Analytics view: routes to (evidence: `sentrax-frontend/src/App.jsx`)
- Action evaluation → API client: requests tasks and evaluation (evidence: `sentrax-frontend/src/pages/LiveDemo.jsx`)
- Live dashboard → API client: loads monitoring data (evidence: `sentrax-frontend/src/pages/Dashboard.jsx`)
- API client → Task endpoints: calls task routes (evidence: `sentrax-frontend/src/services/api.js`)
- API client → Security evaluation: calls security routes (evidence: `sentrax-frontend/src/services/api.js`)
- Task endpoints → Task persistence: reads and saves (evidence: `sentrax-backend/src/main/java/com/sentrax/TaskController.java`)
- Task persistence → Task record: persists (evidence: `sentrax-backend/src/main/java/com/sentrax/TaskRepository.java`)
- Security evaluation → Task persistence: looks up task (evidence: `sentrax-backend/src/main/java/com/sentrax/SecurityController.java`)
- Security evaluation → Event persistence: saves and lists events (evidence: `sentrax-backend/src/main/java/com/sentrax/SecurityController.java`)
- Event persistence → Security event: persists (evidence: `sentrax-backend/src/main/java/com/sentrax/SecurityEventRepository.java`)
- API client → Metrics endpoint: requests metrics
- Metrics endpoint → Event persistence: counts decisions (evidence: `sentrax-backend/src/main/java/com/sentrax/SecurityMetricsController.java`)
