# tarunkumar48/btech_projects architecture

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

- Interactive diagram: https://gitdiagram.com/tarunkumar48/btech_projects
- Repository: https://github.com/tarunkumar48/btech_projects

## Overview

SentinelAI is an incident-response and observability application: operators inspect service health and incidents, investigate anomalies, consult runbooks or RAG-powered diagnosis, and follow remediation. The graph preserves the major UI, API, detection, incident, and knowledge-retrieval areas. Backend router registration and several service calls are evidenced; frontend-to-API wiring and unsampled subsystem internals are not shown, so those links are omitted or marked unverified.

Main entry points: [`SentinelAI_RAG/sentinel-ai/backend/app/main.py`](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/main.py) (Application entry), [`SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py`](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py) (RAG orchestration), [`SentinelAI_RAG/sentinel-ai/backend/app/db/database.py`](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/db/database.py) (SQLite database), [`SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py`](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py) (Incident endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Operator UI"]
  node_dashboard["Health dashboard<br/>[page.tsx]"]
  node_analytics["Metrics analytics<br/>[page.tsx]"]
  node_incident_ui["Incident views<br/>[page.tsx]"]
  node_chat_ui["RAG chat<br/>[page.tsx]"]
  node_runbook_ui["Runbook views<br/>[page.tsx]"]
  node_ws_ui["Live events UI"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["Backend API"]
  node_app_entry["Application entry<br/>[main.py]"]
  node_metrics_api["Metrics endpoints<br/>[routes_metrics.py]"]
  node_incidents_api["Incident endpoints"]
  node_anomaly_api["Anomaly endpoints<br/>[routes_anomaly.py]"]
  node_rag_api["RAG endpoints<br/>[routes_rag.py]"]
  node_runbooks_api["Runbook endpoints<br/>[routes_runbooks.py]"]
  node_ws_api["WebSocket events<br/>[routes_ws.py]"]
end

subgraph group_detection["Detection and Incidents"]
  node_anomaly_service["Metric analysis<br/>[anomaly_service.py]"]
  node_detector["Anomaly scoring"]
  node_log_parser["Log parsing<br/>[log_parser.py]"]
  node_trainer["Model training<br/>[trainer.py]"]
  node_incident_service["Incident lifecycle"]
  node_remediation["Remediation"]
end

subgraph group_knowledge["RAG and Runbooks"]
  node_rag_engine["RAG orchestration<br/>[engine.py]"]
  node_chunker["Text chunking<br/>[chunker.py]"]
  node_embeddings["Embedding service<br/>[embeddings.py]"]
  node_retriever["Knowledge retrieval<br/>[retriever.py]"]
  node_reranker["Result reranking<br/>[reranker.py]"]
end

subgraph group_persistence["Data and Models"]
  node_database[("SQLite database<br/>[database.py]")]
  node_seed["Initial data seed<br/>[seed.py]"]
  node_incident_model["Incident schemas<br/>[incident.py]"]
  node_metric_model["Metric schema<br/>[metric.py]"]
  node_runbook_model["Runbook schema<br/>[runbook.py]"]
  node_config["Application settings<br/>[config.py]"]
end

node_operator(("Operator"))

node_operator -.->|"views"| node_dashboard
node_operator -.->|"reviews"| node_analytics
node_operator -.->|"investigates"| node_incident_ui
node_operator -.->|"asks"| node_chat_ui
node_operator -.->|"consults"| node_runbook_ui
node_app_entry -->|"registers"| node_incidents_api
node_app_entry -->|"registers"| node_runbooks_api
node_app_entry -->|"registers"| node_metrics_api
node_app_entry -->|"registers"| node_rag_api
node_app_entry -->|"registers"| node_ws_api
node_app_entry -->|"registers"| node_anomaly_api
node_anomaly_api -->|"analyzes metrics"| node_anomaly_service
node_anomaly_api -->|"scores logs"| node_detector
node_anomaly_api -->|"creates incidents"| node_incident_service
node_anomaly_api -->|"broadcasts alerts"| node_ws_api
node_anomaly_service -->|"detects anomalies"| node_detector
node_anomaly_service -->|"creates incidents"| node_incident_service
node_incidents_api -->|"manages incidents"| node_incident_service
node_incidents_api -->|"requests diagnosis"| node_rag_engine
node_incidents_api -->|"executes remediation"| node_remediation
node_incidents_api -->|"broadcasts updates"| node_ws_api
node_metrics_api -->|"reads and writes"| node_database
node_runbooks_api -.->|"reads and writes"| node_database
node_runbooks_api -.->|"uses knowledge engine"| node_rag_engine
node_rag_api -->|"queries and ingests"| node_rag_engine
node_rag_engine -->|"chunks documents"| node_chunker
node_rag_engine -->|"creates embeddings"| node_embeddings
node_rag_engine -->|"retrieves context"| node_retriever
node_rag_engine -->|"reranks results"| node_reranker
node_ws_ui -.->|"receives live events"| node_ws_api
node_database -->|"reads database settings"| node_config
node_app_entry -->|"initializes database"| node_database
node_app_entry -->|"seeds startup data"| node_seed
node_incident_service -->|"persists incident data"| node_database
node_incident_service -.->|"uses schemas"| node_incident_model
node_database -.->|"stores metric records"| node_metric_model
node_database -.->|"stores runbooks"| node_runbook_model
node_detector -.->|"uses parsed logs"| node_log_parser
node_detector -.->|"uses trained model"| node_trainer

click node_dashboard "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/app/page.tsx"
click node_analytics "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/app/analytics/page.tsx"
click node_incident_ui "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/app/incidents/%5Bid%5D/page.tsx"
click node_chat_ui "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/app/chat/page.tsx"
click node_runbook_ui "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/app/runbooks/page.tsx"
click node_ws_ui "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/components/providers/WebSocketProvider.tsx"
click node_api_client "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/lib/api.ts"
click node_app_entry "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/main.py"
click node_metrics_api "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_metrics.py"
click node_incidents_api "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py"
click node_anomaly_api "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py"
click node_rag_api "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_rag.py"
click node_runbooks_api "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_runbooks.py"
click node_ws_api "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_ws.py"
click node_anomaly_service "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/services/anomaly_service.py"
click node_detector "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/ml/anomaly_detector.py"
click node_log_parser "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/ml/log_parser.py"
click node_trainer "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/ml/trainer.py"
click node_incident_service "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/services/incident_service.py"
click node_remediation "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/services/remediation_service.py"
click node_rag_engine "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py"
click node_chunker "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/chunker.py"
click node_embeddings "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/embeddings.py"
click node_retriever "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/retriever.py"
click node_reranker "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/reranker.py"
click node_database "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/db/database.py"
click node_seed "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/db/seed.py"
click node_incident_model "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/models/incident.py"
click node_metric_model "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/models/metric.py"
click node_runbook_model "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/models/runbook.py"
click node_config "https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/config.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_dashboard,node_analytics,node_incident_ui,node_chat_ui,node_runbook_ui,node_ws_ui,node_api_client toneBlue
class node_app_entry,node_metrics_api,node_incidents_api,node_anomaly_api,node_rag_api,node_runbooks_api,node_ws_api toneAmber
class node_anomaly_service,node_detector,node_log_parser,node_trainer,node_incident_service,node_remediation toneMint
class node_rag_engine,node_chunker,node_embeddings,node_retriever,node_reranker toneRose
class node_database,node_seed,node_incident_model,node_metric_model,node_runbook_model,node_config,node_operator toneIndigo
```

## Components

### Operator UI

- [Health dashboard](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/app/page.tsx): `SentinelAI_RAG/sentinel-ai/frontend/src/app/page.tsx`
- [Metrics analytics](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/app/analytics/page.tsx): `SentinelAI_RAG/sentinel-ai/frontend/src/app/analytics/page.tsx`
- [Incident views](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/app/incidents/%5Bid%5D/page.tsx): `SentinelAI_RAG/sentinel-ai/frontend/src/app/incidents/[id]/page.tsx`
- [RAG chat](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/app/chat/page.tsx): `SentinelAI_RAG/sentinel-ai/frontend/src/app/chat/page.tsx`
- [Runbook views](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/app/runbooks/page.tsx): `SentinelAI_RAG/sentinel-ai/frontend/src/app/runbooks/page.tsx`
- [Live events UI](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/components/providers/WebSocketProvider.tsx): `SentinelAI_RAG/sentinel-ai/frontend/src/components/providers/WebSocketProvider.tsx`
- [API client](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/frontend/src/lib/api.ts): `SentinelAI_RAG/sentinel-ai/frontend/src/lib/api.ts`

### Backend API

- [Application entry](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/main.py): `SentinelAI_RAG/sentinel-ai/backend/app/main.py`
- [Metrics endpoints](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_metrics.py): `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_metrics.py`
- [Incident endpoints](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py): `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py`
- [Anomaly endpoints](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py): `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py`
- [RAG endpoints](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_rag.py): `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_rag.py`
- [Runbook endpoints](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_runbooks.py): `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_runbooks.py`
- [WebSocket events](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/api/routes_ws.py): `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_ws.py`

### Detection and Incidents

- [Metric analysis](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/services/anomaly_service.py): `SentinelAI_RAG/sentinel-ai/backend/app/services/anomaly_service.py`
- [Anomaly scoring](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/ml/anomaly_detector.py): `SentinelAI_RAG/sentinel-ai/backend/app/ml/anomaly_detector.py`
- [Log parsing](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/ml/log_parser.py): `SentinelAI_RAG/sentinel-ai/backend/app/ml/log_parser.py`
- [Model training](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/ml/trainer.py): `SentinelAI_RAG/sentinel-ai/backend/app/ml/trainer.py`
- [Incident lifecycle](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/services/incident_service.py): `SentinelAI_RAG/sentinel-ai/backend/app/services/incident_service.py`
- [Remediation](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/services/remediation_service.py): `SentinelAI_RAG/sentinel-ai/backend/app/services/remediation_service.py`

### RAG and Runbooks

- [RAG orchestration](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py): `SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py`
- [Text chunking](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/chunker.py): `SentinelAI_RAG/sentinel-ai/backend/app/rag/chunker.py`
- [Embedding service](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/embeddings.py): `SentinelAI_RAG/sentinel-ai/backend/app/rag/embeddings.py`
- [Knowledge retrieval](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/retriever.py): `SentinelAI_RAG/sentinel-ai/backend/app/rag/retriever.py`
- [Result reranking](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/rag/reranker.py): `SentinelAI_RAG/sentinel-ai/backend/app/rag/reranker.py`

### Data and Models

- [SQLite database](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/db/database.py): `SentinelAI_RAG/sentinel-ai/backend/app/db/database.py`
- [Initial data seed](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/db/seed.py): `SentinelAI_RAG/sentinel-ai/backend/app/db/seed.py`
- [Incident schemas](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/models/incident.py): `SentinelAI_RAG/sentinel-ai/backend/app/models/incident.py`
- [Metric schema](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/models/metric.py): `SentinelAI_RAG/sentinel-ai/backend/app/models/metric.py`
- [Runbook schema](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/models/runbook.py): `SentinelAI_RAG/sentinel-ai/backend/app/models/runbook.py`
- [Application settings](https://github.com/tarunkumar48/btech_projects/blob/main/SentinelAI_RAG/sentinel-ai/backend/app/config.py): `SentinelAI_RAG/sentinel-ai/backend/app/config.py`

### Other components

- **Operator**

## Connections

- Operator → Health dashboard: views
- Operator → Metrics analytics: reviews
- Operator → Incident views: investigates
- Operator → RAG chat: asks
- Operator → Runbook views: consults
- Application entry → Incident endpoints: registers (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/main.py`)
- Application entry → Runbook endpoints: registers (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/main.py`)
- Application entry → Metrics endpoints: registers (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/main.py`)
- Application entry → RAG endpoints: registers (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/main.py`)
- Application entry → WebSocket events: registers (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/main.py`)
- Application entry → Anomaly endpoints: registers (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/main.py`)
- Anomaly endpoints → Metric analysis: analyzes metrics (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py`)
- Anomaly endpoints → Anomaly scoring: scores logs (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py`)
- Anomaly endpoints → Incident lifecycle: creates incidents (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py`)
- Anomaly endpoints → WebSocket events: broadcasts alerts (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py`)
- Metric analysis → Anomaly scoring: detects anomalies (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/services/anomaly_service.py`)
- Metric analysis → Incident lifecycle: creates incidents (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/services/anomaly_service.py`)
- Incident endpoints → Incident lifecycle: manages incidents (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py`)
- Incident endpoints → RAG orchestration: requests diagnosis (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py`)
- Incident endpoints → Remediation: executes remediation (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py`)
- Incident endpoints → WebSocket events: broadcasts updates (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py`)
- Metrics endpoints → SQLite database: reads and writes (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_metrics.py`)
- Runbook endpoints → SQLite database: reads and writes (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_runbooks.py`)
- Runbook endpoints → RAG orchestration: uses knowledge engine (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_runbooks.py`)
- RAG endpoints → RAG orchestration: queries and ingests (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/api/routes_rag.py`)
- RAG orchestration → Text chunking: chunks documents (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py`)
- RAG orchestration → Embedding service: creates embeddings (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py`)
- RAG orchestration → Knowledge retrieval: retrieves context (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py`)
- RAG orchestration → Result reranking: reranks results (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py`)
- Live events UI → WebSocket events: receives live events
- SQLite database → Application settings: reads database settings (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/db/database.py`)
- Application entry → SQLite database: initializes database (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/main.py`)
- Application entry → Initial data seed: seeds startup data (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/main.py`)
- Incident lifecycle → SQLite database: persists incident data (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/services/incident_service.py`)
- Incident lifecycle → Incident schemas: uses schemas (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/services/incident_service.py`)
- SQLite database → Metric schema: stores metric records
- SQLite database → Runbook schema: stores runbooks
- Anomaly scoring → Log parsing: uses parsed logs (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/ml/anomaly_detector.py`)
- Anomaly scoring → Model training: uses trained model (evidence: `SentinelAI_RAG/sentinel-ai/backend/app/ml/anomaly_detector.py`)
