What problem does it solve?
This Skill provides a structured blueprint to implement Clean Architecture (including hexagonal and ports-and-adapters patterns) in Python/FastAPI projects, enabling clear separation of concerns and scalable software design.
Core Features & Use Cases
- Layered structure guidance: Domain, Application, Infrastructure, and Presentation layers with explicit responsibilities and allowed dependencies.
- Port/Adapter patterns: Clear definitions for domain and application ports and concrete adapters to support easy swapping of technologies.
- CQRS and testing conventions: Guidance on separating write and read models, plus testing strategies across domain, application, and infrastructure layers.
Quick Start
To begin, apply this guide to a Python/FastAPI project by: 1) delineating domain entities and value objects, 2) creating application use cases as interactor objects, 3) wiring ports to adapters in a DI setup, and 4) organizing code into domain/application/infrastructure/presentation folders.