What problem does it solve?
Clean Architecture prevents tangled dependencies and keeps business rules isolated from frameworks, making your .NET codebase easier to scale, test, and evolve.
Core Features & Use Cases
- Dependency inversion across layers: Enforces that Domain depends on nothing external, while Infrastructure and Api depend on abstractions.
- Use case-centric organization: Models commands and queries as dedicated Application handlers with validation and orchestration.
- Domain-first behavior: Encapsulates invariants and business rules inside entities (and supporting domain patterns) rather than spreading logic across endpoints.
- Infrastructure as a swappable plugin: Moves EF Core, external services, and persistence implementations behind interfaces so you can replace technologies without rewriting business logic.
- Thin API endpoints: Routes HTTP requests directly to use cases, keeping endpoints free of business logic.
Quick Start
Load this skill when you are structuring a new .NET application and want to define Domain, Application, Infrastructure, and Api layers that communicate through use cases and dependency inversion.