Skip to content

Commit 5f47d84

Browse files
authored
Merge pull request #324 from lbedner/overseer-docs
Overseer Docs
2 parents 4d2a557 + d7a0433 commit 5f47d84

11 files changed

Lines changed: 592 additions & 3 deletions

File tree

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
99
[![Commits per Month](https://img.shields.io/github/commit-activity/m/lbedner/aegis-stack)](https://github.com/lbedner/aegis-stack/commits)
1010
[![Total Commits](https://img.shields.io/github/commit-activity/t/lbedner/aegis-stack)](https://github.com/lbedner/aegis-stack/commits)
11+
[![Monthly Downloads](https://img.shields.io/pypi/dm/aegis-stack)](https://pypi.org/project/aegis-stack/)
1112
[![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-orange.json)](https://github.com/copier-org/copier)
1213

1314
You need to ship reliable software, but management only gave you 2 weeks.
@@ -20,6 +21,11 @@ No time for health checks, proper testing, or clean architecture. Just enough ti
2021

2122
Aegis Stack is a modular Python framework that grows with your projects — start with an API, add Auth, Scheduler, Workers, or AI services when you need them.
2223

24+
## Prerequisites
25+
26+
- **Python 3.11+**
27+
- **Docker & Docker Compose** - Required for the standard development workflow (`make serve`). Generated projects use Docker for consistent environments and service dependencies (Redis for workers, health monitoring, etc.).
28+
2329
## Quick Start
2430

2531
```bash
@@ -67,11 +73,13 @@ Most frameworks lock you in at `init`. Aegis Stack doesn't. See **[Evolving Your
6773

6874
## See It In Action
6975

70-
### Overseer
76+
### Overseer - Built-In Health Monitoring
7177

7278
![Overseer](docs/images/overseer-dashboard-1-dark.png)
7379

74-
Real-time monitoring dashboard showing how every component and service is performing with detailed health metrics and status information.
80+
**[Overseer](docs/overseer/index.md)** is the read-only health monitoring dashboard built into every Aegis Stack project. It provides real-time visibility into all your components (Backend, Database, Worker, Scheduler) and services (Auth, AI, Comms) through a web UI and CLI commands.
81+
82+
No Datadog. No New Relic. No vendor lock-in. Just centralized monitoring you own from day one.
7583

7684
### CLI Health Monitoring
7785

docs/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Eventually, I started noticing the same patterns everywhere. Every project neede
2626

2727
Years ago, I had a boss who got it. We'd sit in one of the conference rooms dreaming about automation tools, sketching ideas, making plans. He even started working on something on the side. But that manager was long gone by the time I brought it to fruition.
2828

29-
Post-pandemic, I discovered Streamlit and got tired of waiting for permission. So I built what I would later name, Overseer, myself. It actually worked - I actively used it to automate monotonous domain-specific tasks that were eating up our days.
29+
Post-pandemic, I discovered Streamlit and got tired of waiting for permission. So I built what I would later name, **[Overseer](overseer/index.md)**, myself. It actually worked - I actively used it to automate monotonous domain-specific tasks that were eating up our days.
3030

3131
That experience taught me what happens when you stop waiting for permission and just build the tools you need.
3232

docs/components/webserver.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ async def register_middleware(app: FastAPI) -> None:
7272

7373
**No registration required** - just drop the file and restart. See the [Integration Patterns](../integration-patterns.md) for complete details.
7474

75+
!!! example "Musings: Backend Middleware Auto-Discovery (November 22nd, 2025)"
76+
I'm not sure how I ultimately feel about the auto-discovery middleware pattern. I don't have enough experience with FastAPI plugins yet, but it's something I'm thinking about as the architecture evolves.
77+
78+
The current approach works well for explicit component registration, but auto-discovery could reduce boilerplate at the cost of making the registration flow less obvious. Trade-offs worth considering as Aegis Stack matures.
79+
7580
## Integration
7681

7782
FastAPI integrates with your application and provides:

docs/images/druski-shrug.gif

479 KB
Loading
1.65 MB
Loading

docs/images/overseer-old-1.png

650 KB
Loading

docs/installation.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
Aegis Stack can be used in multiple ways depending on your needs and preferences.
44

5+
## System Requirements
6+
7+
Before installing Aegis Stack, ensure you have the following:
8+
9+
### Required
10+
11+
- **Python 3.11 or higher** - Core runtime for Aegis Stack and generated projects
12+
- **Docker & Docker Compose** - Required for generated projects' development workflow
13+
14+
### Why Docker?
15+
16+
Generated projects use Docker for:
17+
18+
- **Consistent development environments** - Same setup across all machines
19+
- **Service dependencies** - Redis for worker component, health monitoring infrastructure
20+
- **Standard workflow** - The `make serve` command uses `docker compose` under the hood
21+
- **Production parity** - Development closely mirrors production deployment
22+
23+
!!! note "Docker Alternatives"
24+
While the standard workflow uses Docker, generated projects are standard Python applications. Advanced users can manually run components (uvicorn for backend, direct Redis installation, etc.), but this workflow is currently undocumented and unsupported.
25+
26+
### Installing Docker
27+
28+
- **macOS/Windows**: [Docker Desktop](https://www.docker.com/products/docker-desktop/)
29+
- **Linux**: [Docker Engine](https://docs.docker.com/engine/install/) + [Docker Compose](https://docs.docker.com/compose/install/)
30+
531
## Installation
632

733
Choose the method that works best for your workflow:

docs/overseer/index.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Overseer
2+
3+
## Why This Exists
4+
5+
**Nothing is more annoying than the shrug.**
6+
7+
![Druski Shrug](../images/druski-shrug.gif)
8+
9+
Something's broken in production. You ask what happened. You get a shrug. You ask when it started. Another shrug. You ask where the logs are. Shrug. You ask how we can fix it. The biggest fucking shrug you've ever seen.
10+
11+
If something is wrong, I want to know **where**, **when**, **how**, **why**, and **how can we reconcile it**. Christ! Is that too much to ask?
12+
13+
**It shouldn't be so fucking hard to know what happened, when, where.**
14+
15+
You work with Datadog until management decides to migrate to New Relic. Or you're a solo dev who just wants to see if your background jobs are running without paying enterprise prices. Overseer solves this: centralized monitoring that you own, built into every Aegis Stack project from day one.
16+
17+
## What It Is
18+
19+
**Overseer is a read-only health monitoring dashboard** built into your Aegis Stack application. It provides real-time visibility into component and service health through a web UI and CLI commands.
20+
21+
![Overseer Dashboard](../images/overseer-dashboard-1-dark.png)
22+
23+
The dashboard displays:
24+
25+
- **Component Cards**: Backend, Database, Worker, Scheduler health
26+
- **Service Cards**: Auth, AI, Comms health (when included)
27+
- **Header**: Overall health summary and theme toggle
28+
- **Auto-refresh**: Polls health endpoint every 30 seconds
29+
30+
## Current Capabilities
31+
32+
- Component health monitoring (Backend, Database, Worker, Scheduler)
33+
- Service health monitoring (Auth, AI, Comms)
34+
- System metrics (CPU, memory, disk usage)
35+
- Status hierarchy (Healthy, Warning, Unhealthy, Info)
36+
- Web dashboard with auto-refresh (30-second polling)
37+
- CLI health commands via your generated app
38+
39+
## How It Works
40+
41+
```mermaid
42+
sequenceDiagram
43+
participant C as Components/Services
44+
participant R as Health Registry
45+
participant E as /health/ Endpoint
46+
participant D as Dashboard UI
47+
48+
Note over C,R: Startup: Registration Phase
49+
C->>R: register_health_check("backend", check_func)
50+
C->>R: register_health_check("database", check_func)
51+
C->>R: register_service_health_check("auth", check_func)
52+
53+
Note over E,D: Runtime: Monitoring Phase
54+
D->>E: GET /health/ (every 30s)
55+
E->>R: Run all registered checks
56+
R->>C: Execute health check functions
57+
C->>R: Return ComponentStatus
58+
R->>E: Aggregate into SystemStatus
59+
E->>D: Return health data
60+
D->>D: Render component/service cards
61+
```
62+
63+
**The Flow:**
64+
65+
1. **Registration**: During app startup, components and services register their health check functions with the health registry
66+
2. **Aggregation**: The `/health/` endpoint runs all registered checks and aggregates results into a hierarchical status tree
67+
3. **Polling**: The dashboard polls the health endpoint every 30 seconds
68+
4. **Display**: Component and service cards render with real-time status, metrics, and details
69+
70+
## Component & Service Cards
71+
72+
Each card shows real-time health status, component-specific metrics, and configuration details. Click any card to open a detailed modal with diagnostics, performance data, and system information.
73+
74+
## Health Status Indicators
75+
76+
Each card displays a status indicator using the Overseer status hierarchy:
77+
78+
| Status | Color | Visual | Meaning |
79+
|--------|-------|--------|---------|
80+
| **✅ Healthy** | Green | Solid green border | Component/service fully operational |
81+
| **ℹ️ Info** | Blue | Solid blue border | Informational status, not a problem |
82+
| **⚠️ Warning** | Yellow | Orange border | Operational but with issues |
83+
| **❌ Unhealthy** | Red | Red border | Component/service down or failing |
84+
85+
**Status Propagation**: Parent components inherit the worst child status:
86+
87+
- Any child **Unhealthy** → Parent **Unhealthy**
88+
- Any child **Warning** (no unhealthy) → Parent **Warning**
89+
- Any child **Info** (no unhealthy/warning) → Parent **Info**
90+
- All children **Healthy** → Parent **Healthy**
91+
92+
## Theme Support
93+
94+
The dashboard automatically adapts to light and dark themes:
95+
96+
- **Light Mode**: White cards, dark text, subtle shadows
97+
- **Dark Mode**: Dark cards, light text, enhanced contrast
98+
- **Toggle**: Click the theme icon in the header to switch
99+
100+
Images and status colors adjust automatically to maintain visibility in both themes.
101+
102+
## CLI Health Access
103+
104+
The same health data is accessible via CLI:
105+
106+
```bash
107+
# View system health
108+
your-app health
109+
110+
# Example output:
111+
┌────────────────────────────────────────┐
112+
│ System Health │
113+
├────────────────────────────────────────┤
114+
│ Components │
115+
│ ✅ backend - FastAPI healthy │
116+
│ ✅ database - SQLite connected │
117+
│ ✅ worker - arq processing │
118+
│ ✅ scheduler - 3 jobs scheduled │
119+
│ │
120+
│ Services │
121+
│ ✅ auth - 42 users, HS256 │
122+
│ ✅ ai - Anthropic/Claude │
123+
└────────────────────────────────────────┘
124+
```
125+
126+
## What's Coming
127+
128+
Overseer is evolving into a full operational control plane. Want to know where this is headed and why I'm so confident it'll work?
129+
130+
**[Read the full story →](story.md)** - How Overseer evolved from solving production problems at iHeartMedia (2022-2024) to becoming the built-in control plane for Aegis Stack.
131+
132+
## Next Steps
133+
134+
- **[The Overseer Story](story.md)** - Evolution from Streamlit to Aegis Stack, roadmap, and vision
135+
- **[Integration Guide](integration.md)** - Add health checks to custom components/services

0 commit comments

Comments
 (0)