# pykhaled/overseer architecture

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

- Interactive diagram: https://gitdiagram.com/pykhaled/overseer
- Repository: https://github.com/pykhaled/overseer

## Overview

Overseer is a project-centric web service for observing and controlling Docker Compose applications. Users open its dashboard to view project and service status, resource usage, and declared dependencies, or use service controls to start, stop, and restart containers. The sampled implementation places web handling and much of the discovery, inspection, and metric logic in `overseer/app.py`; the README documents the user-facing capabilities. The excerpts do not show the route handlers’ full internal call structure, so the graph avoids inferring links between those internal stages.

Main entry points: [`overseer/app.py`](https://github.com/pykhaled/overseer/blob/main/overseer/app.py) (Flask application), [`overseer/templates/dashboard.html`](https://github.com/pykhaled/overseer/blob/main/overseer/templates/dashboard.html) (Project dashboard), [`overseer/templates/index.html`](https://github.com/pykhaled/overseer/blob/main/overseer/templates/index.html) (Dependency graph), [`overseer/templates/services.html`](https://github.com/pykhaled/overseer/blob/main/overseer/templates/services.html) (Service controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_webapp["Flask application<br/>[app.py]"]
  node_dashboard["Project dashboard<br/>[dashboard.html]"]
  node_dependencies["Dependency graph<br/>[index.html]"]
  node_service_view["Service controls<br/>[services.html]"]
end

subgraph group_observe["Project observability"]
  node_discovery["Compose discovery<br/>[app.py]"]
  node_container_view["Container inspection<br/>[app.py]"]
  node_resource_metrics["Resource metrics<br/>[app.py]"]
  node_project_summary["Project summary<br/>[app.py]"]
end

subgraph group_control["Service control"]
  node_lifecycle["Container lifecycle<br/>[app.py]"]
end

node_user(("Project operator"))
node_docker["Docker Engine"]

node_user -->|"opens dashboard"| node_webapp
node_webapp -->|"serves overview"| node_dashboard
node_webapp -->|"serves graph"| node_dependencies
node_webapp -->|"serves controls"| node_service_view
node_webapp -->|"manages containers"| node_docker
node_docker -->|"provides services"| node_discovery
node_docker -->|"provides state"| node_container_view
node_docker -->|"provides stats"| node_resource_metrics
node_webapp -->|"routes controls"| node_lifecycle
node_lifecycle -->|"starts or stops"| node_docker
node_discovery -.->|"summarizes project"| node_project_summary

click node_webapp "https://github.com/pykhaled/overseer/blob/main/overseer/app.py"
click node_dashboard "https://github.com/pykhaled/overseer/blob/main/overseer/templates/dashboard.html"
click node_dependencies "https://github.com/pykhaled/overseer/blob/main/overseer/templates/index.html"
click node_service_view "https://github.com/pykhaled/overseer/blob/main/overseer/templates/services.html"
click node_discovery "https://github.com/pykhaled/overseer/blob/main/overseer/app.py"
click node_container_view "https://github.com/pykhaled/overseer/blob/main/overseer/app.py"
click node_resource_metrics "https://github.com/pykhaled/overseer/blob/main/overseer/app.py"
click node_project_summary "https://github.com/pykhaled/overseer/blob/main/overseer/app.py"
click node_lifecycle "https://github.com/pykhaled/overseer/blob/main/overseer/app.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_webapp,node_dashboard,node_dependencies,node_service_view toneBlue
class node_discovery,node_container_view,node_resource_metrics,node_project_summary toneAmber
class node_lifecycle toneMint
class node_user,node_docker toneIndigo
```

## Components

### Web interface

- [Flask application](https://github.com/pykhaled/overseer/blob/main/overseer/app.py): `overseer/app.py`
- [Project dashboard](https://github.com/pykhaled/overseer/blob/main/overseer/templates/dashboard.html): `overseer/templates/dashboard.html`
- [Dependency graph](https://github.com/pykhaled/overseer/blob/main/overseer/templates/index.html): `overseer/templates/index.html`
- [Service controls](https://github.com/pykhaled/overseer/blob/main/overseer/templates/services.html): `overseer/templates/services.html`

### Project observability

- [Compose discovery](https://github.com/pykhaled/overseer/blob/main/overseer/app.py): `overseer/app.py`
- [Container inspection](https://github.com/pykhaled/overseer/blob/main/overseer/app.py): `overseer/app.py`
- [Resource metrics](https://github.com/pykhaled/overseer/blob/main/overseer/app.py): `overseer/app.py`
- [Project summary](https://github.com/pykhaled/overseer/blob/main/overseer/app.py): `overseer/app.py`

### Service control

- [Container lifecycle](https://github.com/pykhaled/overseer/blob/main/overseer/app.py): `overseer/app.py`

### Other components

- **Project operator**
- **Docker Engine**

## Connections

- Project operator → Flask application: opens dashboard (evidence: `README.md`)
- Flask application → Project dashboard: serves overview (evidence: `README.md`)
- Flask application → Dependency graph: serves graph (evidence: `README.md`)
- Flask application → Service controls: serves controls (evidence: `README.md`)
- Flask application → Docker Engine: manages containers (evidence: `README.md`)
- Docker Engine → Compose discovery: provides services (evidence: `README.md`)
- Docker Engine → Container inspection: provides state (evidence: `overseer/app.py`)
- Docker Engine → Resource metrics: provides stats (evidence: `overseer/app.py`)
- Flask application → Container lifecycle: routes controls (evidence: `overseer/app.py`)
- Container lifecycle → Docker Engine: starts or stops (evidence: `overseer/app.py`)
- Compose discovery → Project summary: summarizes project (evidence: `overseer/app.py`)
