# varunleo69-cloud/sentinelops architecture

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

- Interactive diagram: https://gitdiagram.com/varunleo69-cloud/sentinelops
- Repository: https://github.com/varunleo69-cloud/sentinelops

## Overview

SentinelOps is a local Docker-based self-healing application platform. Users view the dashboard and can inspect health and metrics or simulate and restore failures; the recovery monitor checks health and requests a container restart after repeated failures, while Docker restart policies cover process crashes. Prometheus and Grafana provide a separate metrics-visualization branch. The README documents service wiring and capabilities; source excerpts show Flask routes, dashboard requests, and recovery behavior. Compose and Prometheus configuration were not excerpted, so their detailed wiring is represented only where documented.

Main entry points: [`app/app.py`](https://github.com/varunleo69-cloud/sentinelops/blob/main/app/app.py) (Flask Service), [`docker-compose.yml`](https://github.com/varunleo69-cloud/sentinelops/blob/main/docker-compose.yml) (Service Orchestration), [`app/static/js/script.js`](https://github.com/varunleo69-cloud/sentinelops/blob/main/app/static/js/script.js) (Dashboard Logic), [`monitoring/recovery_monitor.py`](https://github.com/varunleo69-cloud/sentinelops/blob/main/monitoring/recovery_monitor.py) (Recovery Monitor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Operations Dashboard"]
  node_dashboard_page["Dashboard Page<br/>[index.html]"]
  node_dashboard_logic["Dashboard Logic<br/>[script.js]"]
  node_dashboard_style["Dashboard Styles<br/>[style.css]"]
end

subgraph group_application["Flask Application"]
  node_flask["Flask Service<br/>[app.py]"]
  node_health["Health Endpoint<br/>[app.py]"]
  node_failure_controls["Failure Controls<br/>[app.py]"]
  node_metrics_endpoint["Metrics Endpoint<br/>[app.py]"]
end

subgraph group_monitoring["Metrics Monitoring"]
  node_prometheus["Prometheus<br/>[prometheus.yml]"]
  node_grafana["Grafana<br/>[docker-compose.yml]"]
end

subgraph group_recovery["Recovery"]
  node_recovery_monitor["Recovery Monitor"]
  node_docker_api["Docker API"]
  node_docker_daemon["Docker Engine"]
end

node_operator(("Operator"))
node_compose["Service Orchestration<br/>[docker-compose.yml]"]

node_operator -->|"views"| node_dashboard_page
node_dashboard_page -->|"served by"| node_flask
node_flask -->|"renders"| node_dashboard_page
node_dashboard_logic -->|"requests health"| node_health
node_dashboard_logic -->|"requests metrics"| node_metrics_endpoint
node_dashboard_logic -->|"sends actions"| node_failure_controls
node_operator -->|"uses controls"| node_dashboard_logic
node_compose -->|"runs service"| node_flask
node_compose -->|"runs service"| node_prometheus
node_compose -->|"runs service"| node_grafana
node_compose -->|"runs service"| node_recovery_monitor
node_prometheus -->|"scrapes metrics"| node_metrics_endpoint
node_grafana -->|"visualizes metrics"| node_prometheus
node_recovery_monitor -->|"checks health"| node_health
node_recovery_monitor -->|"requests restart"| node_docker_api
node_docker_api -.->|"controls containers"| node_docker_daemon
node_docker_daemon -->|"restarts container"| node_flask
node_docker_daemon -->|"restart policy"| node_flask

click node_dashboard_page "https://github.com/varunleo69-cloud/sentinelops/blob/main/app/templates/index.html"
click node_dashboard_logic "https://github.com/varunleo69-cloud/sentinelops/blob/main/app/static/js/script.js"
click node_dashboard_style "https://github.com/varunleo69-cloud/sentinelops/blob/main/app/static/css/style.css"
click node_compose "https://github.com/varunleo69-cloud/sentinelops/blob/main/docker-compose.yml"
click node_flask "https://github.com/varunleo69-cloud/sentinelops/blob/main/app/app.py"
click node_health "https://github.com/varunleo69-cloud/sentinelops/blob/main/app/app.py"
click node_failure_controls "https://github.com/varunleo69-cloud/sentinelops/blob/main/app/app.py"
click node_metrics_endpoint "https://github.com/varunleo69-cloud/sentinelops/blob/main/app/app.py"
click node_prometheus "https://github.com/varunleo69-cloud/sentinelops/blob/main/monitoring/prometheus.yml"
click node_grafana "https://github.com/varunleo69-cloud/sentinelops/blob/main/docker-compose.yml"
click node_recovery_monitor "https://github.com/varunleo69-cloud/sentinelops/blob/main/monitoring/recovery_monitor.py"
click node_docker_api "https://github.com/varunleo69-cloud/sentinelops/blob/main/monitoring/recovery_monitor.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_page,node_dashboard_logic,node_dashboard_style toneBlue
class node_flask,node_health,node_failure_controls,node_metrics_endpoint toneAmber
class node_prometheus,node_grafana toneMint
class node_recovery_monitor,node_docker_api,node_docker_daemon toneRose
class node_operator toneIndigo
class node_compose toneTeal
```

## Components

### Operations Dashboard

- [Dashboard Page](https://github.com/varunleo69-cloud/sentinelops/blob/main/app/templates/index.html): `app/templates/index.html`
- [Dashboard Logic](https://github.com/varunleo69-cloud/sentinelops/blob/main/app/static/js/script.js): `app/static/js/script.js`
- [Dashboard Styles](https://github.com/varunleo69-cloud/sentinelops/blob/main/app/static/css/style.css): `app/static/css/style.css`

### Flask Application

- [Flask Service](https://github.com/varunleo69-cloud/sentinelops/blob/main/app/app.py): `app/app.py`
- [Health Endpoint](https://github.com/varunleo69-cloud/sentinelops/blob/main/app/app.py): `app/app.py`
- [Failure Controls](https://github.com/varunleo69-cloud/sentinelops/blob/main/app/app.py): `app/app.py`
- [Metrics Endpoint](https://github.com/varunleo69-cloud/sentinelops/blob/main/app/app.py): `app/app.py`

### Metrics Monitoring

- [Prometheus](https://github.com/varunleo69-cloud/sentinelops/blob/main/monitoring/prometheus.yml): `monitoring/prometheus.yml`
- [Grafana](https://github.com/varunleo69-cloud/sentinelops/blob/main/docker-compose.yml): `docker-compose.yml`

### Recovery

- [Recovery Monitor](https://github.com/varunleo69-cloud/sentinelops/blob/main/monitoring/recovery_monitor.py): `monitoring/recovery_monitor.py`
- [Docker API](https://github.com/varunleo69-cloud/sentinelops/blob/main/monitoring/recovery_monitor.py): `monitoring/recovery_monitor.py`
- **Docker Engine**

### Other components

- **Operator**
- [Service Orchestration](https://github.com/varunleo69-cloud/sentinelops/blob/main/docker-compose.yml): `docker-compose.yml`

## Connections

- Operator → Dashboard Page: views (evidence: `README.md`)
- Dashboard Page → Flask Service: served by (evidence: `app/app.py`)
- Flask Service → Dashboard Page: renders (evidence: `app/app.py`)
- Dashboard Logic → Health Endpoint: requests health (evidence: `app/static/js/script.js`)
- Dashboard Logic → Metrics Endpoint: requests metrics (evidence: `app/static/js/script.js`)
- Dashboard Logic → Failure Controls: sends actions (evidence: `app/static/js/script.js`)
- Operator → Dashboard Logic: uses controls (evidence: `README.md`)
- Service Orchestration → Flask Service: runs service (evidence: `README.md`)
- Service Orchestration → Prometheus: runs service (evidence: `README.md`)
- Service Orchestration → Grafana: runs service (evidence: `README.md`)
- Service Orchestration → Recovery Monitor: runs service (evidence: `README.md`)
- Prometheus → Metrics Endpoint: scrapes metrics (evidence: `README.md`)
- Grafana → Prometheus: visualizes metrics (evidence: `README.md`)
- Recovery Monitor → Health Endpoint: checks health (evidence: `monitoring/recovery_monitor.py`)
- Recovery Monitor → Docker API: requests restart (evidence: `monitoring/recovery_monitor.py`)
- Docker API → Docker Engine: controls containers
- Docker Engine → Flask Service: restarts container (evidence: `README.md`)
- Docker Engine → Flask Service: restart policy (evidence: `README.md`)
