What problem does it solve?
Clean Architecture reduces maintainability problems caused by tangled dependencies by enforcing a strict separation between business rules, application use cases, infrastructure concerns, and HTTP delivery.
Core Features & Use Cases
- Layered project structure: Establish a four-project layout (Domain, Application, Infrastructure, Api) with clear responsibilities and boundaries.
- Dependency inversion enforcement: Keep the Domain free of framework and external dependencies while the outer layers reference inner abstractions.
- Use-case-first orchestration: Implement each command and query as a focused Application handler that coordinates domain logic and persistence via abstractions.
- Infrastructure as a plugin: Swap EF Core, external services, and storage implementations without changing business logic.
- Thin API endpoints: Map HTTP requests to use cases and return responses without embedding business rules in controllers/handlers.
Quick Start
Load this skill when designing a .NET project that needs a layered architecture, dependency inversion, and use-case handlers aligned to a Clean Architecture style.