Skip to content

Commit ebe7dbf

Browse files
authored
Merge pull request #33 from lbedner/database-documentation
Database Documentation
2 parents edbf004 + 43bf0fb commit ebe7dbf

15 files changed

Lines changed: 283 additions & 342 deletions

File tree

CLAUDE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@ The architecture follows this pattern:
1111
- **Generated Projects**: Full-stack containerized applications created by the CLI
1212
- **Templates**: Cookiecutter templates that define generated project structure
1313

14+
## Release Status: v0.1.0 (LIVE on PyPI!)
15+
16+
**First Official Release** - August 2024
17+
-**CLI Tool**: Published to PyPI as `aegis-stack`
18+
-**Database Component**: SQLite + SQLModel ORM with health monitoring
19+
-**Foundation Stack**: FastAPI backend + Flet frontend + Docker containerization
20+
-**Worker Component**: arq + Redis for background job processing
21+
-**Scheduler Component**: APScheduler for scheduled tasks
22+
-**Documentation**: Progressive documentation philosophy - grows with real implementations
23+
24+
**Install**: `pip install aegis-stack`
25+
**PyPI**: https://pypi.org/project/aegis-stack/
26+
**GitHub Release**: https://github.com/lbedner/aegis-stack/releases/tag/v0.1.0
27+
1428
## Development Commands
1529

1630
This project uses `uv` for dependency management and a `Makefile` for CLI development tasks.

README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Aegis Stack 🛡️
22

3+
**Build production-ready Python applications with your chosen components.**
4+
35
[![CI](https://github.com/lbedner/aegis-stack/workflows/CI/badge.svg)](https://github.com/lbedner/aegis-stack/actions/workflows/ci.yml)
46
[![Documentation](https://github.com/lbedner/aegis-stack/workflows/Deploy%20Documentation/badge.svg)](https://github.com/lbedner/aegis-stack/actions/workflows/docs.yml)
57
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
68

7-
**Build production-ready Python applications with your chosen components.**
8-
99
Aegis Stack is a CLI-driven framework for creating custom Python applications. Select exactly the components you need - no bloat, no unused dependencies.
1010

11-
## 🚀 Quick Start
11+
## Quick Start
1212

1313
```bash
1414
# Install
@@ -24,45 +24,43 @@ aegis init task-processor --components scheduler,worker
2424
cd my-project && uv sync && source .venv/bin/activate && make run-local
2525
```
2626

27-
## 🧩 Available Components
27+
## Available Components
2828

2929
| Component | Purpose | Status |
3030
|-----------|---------|--------|
31-
| **Core** (FastAPI + Flet) | Web API + Frontend |**Included** |
31+
| **Core** (FastAPI + Flet) | Web API + Frontend |**Always Included** |
32+
| **Database** | SQLite + SQLModel ORM |**Available** |
3233
| **Scheduler** | Background tasks, cron jobs |**Available** |
33-
| **Worker** | Async task queues, job processing |**Available** |
34-
| **Database** | PostgreSQL + SQLAlchemy + Alembic | 🚧 **Coming Soon** |
34+
| **Worker** | Async task queues (arq + Redis) | 🧪 **Experimental** |
3535
| **Cache** | Redis caching and sessions | 🚧 **Coming Soon** |
3636

37-
## What You Get
38-
39-
- **FastAPI backend** with automatic API documentation
40-
- **Flet frontend** with health dashboard
41-
- **CLI management** with health monitoring commands
42-
- **Worker queues** with async task processing and load testing
43-
- **Production ready** with structured logging and containerization
44-
- **Async-first** architecture for high-concurrency workloads
37+
## See It In Action
4538

46-
## 📱 System Health Dashboard
39+
### System Health Dashboard
4740

4841
![System Health Dashboard](docs/images/dashboard-light.png#only-light)
4942
![System Health Dashboard](docs/images/dashboard-dark.png#only-dark)
5043

5144
Real-time monitoring with component status, health percentages, and cross-platform deployment (web, desktop, mobile).
5245

53-
## 📚 Learn More
46+
### CLI Health Monitoring
47+
48+
![CLI Health Check](docs/images/cli_health_check.png)
49+
50+
Rich terminal output showing detailed component status, health metrics, and system diagnostics.
51+
52+
## Learn More
5453

5554
- **[📖 CLI Reference](docs/cli-reference.md)** - Complete command reference
5655
- **[🏗️ Components](docs/components/index.md)** - Deep dive into available components
5756
- **[🧠 Philosophy](docs/philosophy.md)** - Architecture and design principles
5857

59-
## Development Commands
58+
## For The Veterans
6059

61-
```bash
62-
make run-local # Start development server
63-
make test # Run test suite
64-
make check # Run all quality checks
65-
make docs-serve # Serve documentation
66-
```
60+
![Ron Swanson](docs/images/ron-swanson.gif)
61+
62+
No magic. No reinventing the wheel. Just the tools you already know, pre-configured and ready to compose.
63+
64+
Aegis Stack respects your expertise. We maintain existing standards - FastAPI for APIs, SQLModel for databases, arq for workers. No custom abstractions or proprietary patterns to learn. Pick your components, get a production-ready foundation, and build your way.
6765

68-
Built on FastAPI, Flet, Typer, and other open-source tools.
66+
The framework gets out of your way so you can get started.

aegis/core/CLAUDE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ COMPONENTS: dict[str, ComponentSpec] = {
3636
description="Scheduled task execution with APScheduler",
3737
type=ComponentType.INFRASTRUCTURE,
3838
),
39+
"database": ComponentSpec(
40+
name="database",
41+
description="SQLite database with SQLModel ORM",
42+
type=ComponentType.INFRASTRUCTURE,
43+
requires=[], # Standalone component
44+
),
3945
}
4046
```
4147

@@ -171,6 +177,12 @@ class TemplateGenerator:
171177
"tests/services/test_worker_health_registration.py",
172178
])
173179

180+
if "database" in self.components:
181+
files.extend([
182+
"app/core/db.py",
183+
"tests/conftest.py", # Database testing fixtures
184+
])
185+
174186
return sorted(files)
175187
```
176188

aegis/templates/CLAUDE.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ aegis/templates/cookiecutter-aegis-project/
4848
"version": "0.1.0",
4949
"python_version": "3.11",
5050
"include_scheduler": "no",
51-
"include_worker": "no"
51+
"include_worker": "no",
52+
"include_database": "no"
5253
}
5354
```
5455

@@ -73,6 +74,10 @@ aegis/templates/cookiecutter-aegis-project/
7374
{% if cookiecutter.include_worker == "yes" %}
7475
# Worker-specific content
7576
{% endif %}
77+
78+
{% if cookiecutter.include_database == "yes" %}
79+
# Database-specific content
80+
{% endif %}
7681
```
7782

7883
### Conditional Files
@@ -102,6 +107,11 @@ dependencies = [
102107
"arq>=0.26.1",
103108
"redis>=5.2.1",
104109
{% endif %}
110+
{% if cookiecutter.include_database == "yes" %}
111+
"sqlmodel>=0.0.14",
112+
"sqlalchemy>=2.0.0",
113+
"aiosqlite>=0.19.0",
114+
{% endif %}
105115
]
106116
```
107117

@@ -122,6 +132,11 @@ if "{{ cookiecutter.include_new_component }}" != "yes":
122132
remove_dir("app/components/new_component")
123133
remove_file("app/entrypoints/new_component.py")
124134
remove_file("tests/components/test_new_component.py")
135+
136+
# Database component logic
137+
if "{{ cookiecutter.include_database }}" != "yes":
138+
remove_file("app/core/db.py")
139+
remove_sections_from_conftest("tests/conftest.py", ["database"])
125140
```
126141

127142
### File Removal Patterns

docs/CLAUDE.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ This guide covers documentation standards and patterns for Aegis Stack component
44

55
## Documentation Standards
66

7+
### Progressive Documentation Philosophy (v0.1.0+)
8+
9+
**Architecture-First Documentation**: Documentation should trail real implementations, not lead them.
10+
11+
**Core Principles:**
12+
- **Lean Start**: Begin with infrastructure capabilities and basic setup
13+
- **Real Examples**: Add concrete examples only after building actual services
14+
- **Avoid Hypotheticals**: No theoretical User/Post models until auth exists
15+
- **Progressive Enhancement**: Documentation grows as the system evolves
16+
17+
**Implementation Strategy:**
18+
- **Database Component**: Infrastructure setup only, real patterns come with User service
19+
- **Worker Component**: Task execution patterns, real examples with scheduler integration
20+
- **Scheduler Component**: Basic scheduling, real patterns with job persistence
21+
- **Integration Docs**: Added when multiple components work together
22+
723
### Components Documentation (Voltron Philosophy)
824

925
**Components represent swappable capabilities** (web serving, scheduling, caching) with multiple implementation choices.
@@ -13,8 +29,11 @@ This guide covers documentation standards and patterns for Aegis Stack component
1329
docs/components/
1430
├── index.md # Overview of all components
1531
├── webserver.md # Web server capability (FastAPI impl)
32+
├── database.md # Database capability (SQLite/SQLModel impl) - v0.1.0
1633
├── frontend.md # Frontend capability (Flet impl)
17-
└── scheduling.md # Future: Scheduling capability (APScheduler/schedule)
34+
├── worker.md # Worker capability (arq/Redis impl)
35+
├── scheduler.md # Scheduler capability (APScheduler impl)
36+
└── future/ # Future components as needs emerge
1837
```
1938

2039
**Component Documentation Pattern:**

0 commit comments

Comments
 (0)