How tarunkumar48/btech_projects works
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: main.py Application entry · engine.py RAG orchestration · database.py SQLite database · routes_incidents.py Incident endpoints
Components 32
Operator UI
- Health dashboard
SentinelAI_RAG/sentinel-ai/frontend/src/app/page.tsx - Metrics analytics
SentinelAI_RAG/sentinel-ai/frontend/src/app/analytics/page.tsx - Incident views
SentinelAI_RAG/sentinel-ai/frontend/src/app/incidents/[id]/page.tsx - RAG chat
SentinelAI_RAG/sentinel-ai/frontend/src/app/chat/page.tsx - Runbook views
SentinelAI_RAG/sentinel-ai/frontend/src/app/runbooks/page.tsx - Live events UI
SentinelAI_RAG/sentinel-ai/frontend/src/components/providers/WebSocketProvider.tsx - API client
SentinelAI_RAG/sentinel-ai/frontend/src/lib/api.ts
Backend API
- Application entry
SentinelAI_RAG/sentinel-ai/backend/app/main.py - Metrics endpoints
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_metrics.py - Incident endpoints
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py - Anomaly endpoints
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py - RAG endpoints
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_rag.py - Runbook endpoints
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_runbooks.py - WebSocket events
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_ws.py
Detection and Incidents
- Metric analysis
SentinelAI_RAG/sentinel-ai/backend/app/services/anomaly_service.py - Anomaly scoring
SentinelAI_RAG/sentinel-ai/backend/app/ml/anomaly_detector.py - Log parsing
SentinelAI_RAG/sentinel-ai/backend/app/ml/log_parser.py - Model training
SentinelAI_RAG/sentinel-ai/backend/app/ml/trainer.py - Incident lifecycle
SentinelAI_RAG/sentinel-ai/backend/app/services/incident_service.py - Remediation
SentinelAI_RAG/sentinel-ai/backend/app/services/remediation_service.py
RAG and Runbooks
- RAG orchestration
SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py - Text chunking
SentinelAI_RAG/sentinel-ai/backend/app/rag/chunker.py - Embedding service
SentinelAI_RAG/sentinel-ai/backend/app/rag/embeddings.py - Knowledge retrieval
SentinelAI_RAG/sentinel-ai/backend/app/rag/retriever.py - Result reranking
SentinelAI_RAG/sentinel-ai/backend/app/rag/reranker.py
Data and Models
- SQLite database
SentinelAI_RAG/sentinel-ai/backend/app/db/database.py - Initial data seed
SentinelAI_RAG/sentinel-ai/backend/app/db/seed.py - Incident schemas
SentinelAI_RAG/sentinel-ai/backend/app/models/incident.py - Metric schema
SentinelAI_RAG/sentinel-ai/backend/app/models/metric.py - Runbook schema
SentinelAI_RAG/sentinel-ai/backend/app/models/runbook.py - Application settings
SentinelAI_RAG/sentinel-ai/backend/app/config.py
Other components
- Operator
Connections 39
- 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
SentinelAI_RAG/sentinel-ai/backend/app/main.py - Application entry → Runbook endpoints: registers
SentinelAI_RAG/sentinel-ai/backend/app/main.py - Application entry → Metrics endpoints: registers
SentinelAI_RAG/sentinel-ai/backend/app/main.py - Application entry → RAG endpoints: registers
SentinelAI_RAG/sentinel-ai/backend/app/main.py - Application entry → WebSocket events: registers
SentinelAI_RAG/sentinel-ai/backend/app/main.py - Application entry → Anomaly endpoints: registers
SentinelAI_RAG/sentinel-ai/backend/app/main.py - Anomaly endpoints → Metric analysis: analyzes metrics
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py - Anomaly endpoints → Anomaly scoring: scores logs
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py - Anomaly endpoints → Incident lifecycle: creates incidents
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py - Anomaly endpoints → WebSocket events: broadcasts alerts
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_anomaly.py - Metric analysis → Anomaly scoring: detects anomalies
SentinelAI_RAG/sentinel-ai/backend/app/services/anomaly_service.py - Metric analysis → Incident lifecycle: creates incidents
SentinelAI_RAG/sentinel-ai/backend/app/services/anomaly_service.py - Incident endpoints → Incident lifecycle: manages incidents
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py - Incident endpoints → RAG orchestration: requests diagnosis
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py - Incident endpoints → Remediation: executes remediation
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py - Incident endpoints → WebSocket events: broadcasts updates
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_incidents.py - Metrics endpoints → SQLite database: reads and writes
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_metrics.py - Runbook endpoints → SQLite database: reads and writes
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_runbooks.py - Runbook endpoints → RAG orchestration: uses knowledge engine
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_runbooks.py - RAG endpoints → RAG orchestration: queries and ingests
SentinelAI_RAG/sentinel-ai/backend/app/api/routes_rag.py - RAG orchestration → Text chunking: chunks documents
SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py - RAG orchestration → Embedding service: creates embeddings
SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py - RAG orchestration → Knowledge retrieval: retrieves context
SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py - RAG orchestration → Result reranking: reranks results
SentinelAI_RAG/sentinel-ai/backend/app/rag/engine.py - Live events UI → WebSocket events: receives live events
- SQLite database → Application settings: reads database settings
SentinelAI_RAG/sentinel-ai/backend/app/db/database.py - Application entry → SQLite database: initializes database
SentinelAI_RAG/sentinel-ai/backend/app/main.py - Application entry → Initial data seed: seeds startup data
SentinelAI_RAG/sentinel-ai/backend/app/main.py - Incident lifecycle → SQLite database: persists incident data
SentinelAI_RAG/sentinel-ai/backend/app/services/incident_service.py - Incident lifecycle → Incident schemas: uses schemas
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
SentinelAI_RAG/sentinel-ai/backend/app/ml/anomaly_detector.py - Anomaly scoring → Model training: uses trained model
SentinelAI_RAG/sentinel-ai/backend/app/ml/anomaly_detector.py