What problem does it solve?
This Skill addresses the challenge of maintaining organized, scalable, and maintainable codebases in Flutter applications by enforcing a strict layer-based clean architecture with Domain-Driven Design (DDD) principles. It prevents common architectural pitfalls like mixed responsibilities and incorrect dependency flows.
Core Features & Use Cases
- Separation of Concerns: Enforces distinct layers for Domain, Infrastructure, Application, and Presentation.
- Dependency Rule Enforcement: Ensures dependencies flow inwards (Presentation -> Application -> Domain <- Infrastructure).
- DDD Principles: Promotes the use of entities, failures, and repository interfaces in the Domain layer.
- Immutability: Encourages the use of
@freezed for entities and failures.
- Functional Error Handling: Mandates
Either<Failure, Success> for repository return types.
- Use Case: A team developing a complex e-commerce app can use this Skill to ensure all developers adhere to a consistent, robust architectural pattern, leading to fewer bugs and easier maintenance as the app grows.
Quick Start
Apply the Flutter Layer-based Clean Architecture + DDD standards to the project's lib directory.