Production-grade, asynchronous backend blueprint engineered with Domain-Driven Design (DDD), Clean Architecture, and non-blocking I/O concurrency.
Maintained by Dato' Samuel F. / Midaz Dev (https://samuel.midaz.dev).
┌────────────────────────────────────────────────────────┐
│ API Gateway │
│ (Reverse Proxy / WAF / Nginx) │
└───────────────────────────┬────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ Presentation Layer │
│ (FastAPI Routers / Pydantic v2 Request Validation) │
└───────────────────────────┬────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ Domain Use Cases │
│ (Pure Business Entities & Workflow Orchestration) │
└───────────────────────────┬────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ Infrastructure Layer │
│ (Async SQLAlchemy 2.0 / Redis / Connection Pools) │
└────────────────────────────────────────────────────────┘
- Clean Architecture Separation: Business logic is completely decoupled from frameworks and database ORMs.
- AsyncIO Non-Blocking Throughput: Sustained capacity exceeding 8,000+ requests per second on standard container nodes.
- Resilience by Default: Proactive
/healthprobes, graceful teardowns, and structured telemetry. - Docker Compose Orchestration: Zero-friction local setup for FastAPI, PostgreSQL 16, and Redis.
docker compose up --buildThe API documentation will be available immediately at:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
# 1. Install dependencies
pip install -e .
# 2. Run with Uvicorn
uvicorn app.main:app --reload --port 8000python -m unittest discover -s tests -p "test_*.py"- Clean Architecture (Robert C. Martin)
- Domain-Driven Design (DDD) concepts
- 12-Factor App Methodology for cloud-native deployment
Distributed under the MIT License. See LICENSE for details.
© 2026 Dato' Samuel F. | Midaz Dev (https://samuel.midaz.dev)