首页/ AI 技能 / @skilllib/skill-2014279412013805569
Skill站外收录 @skilllib/skill-2014279412013805569

feature-based-clean-architecture

按业务功能组织代码结构,通过领域驱动设计实现关注点分离,确保各模块在表现、逻辑与数据层之间的清晰边界,提升系统的可扩展性与长期可维护性。

0.0 (0) 554 次安装 原作者 编程导航
收录于 2026-01-22
软件开发 AI 技能

Skills.MD

# Feature-Based Clean Architecture ## **Priority: P0 (CRITICAL)** Standard for modular Clean Architecture organized by business features in `lib/features/`. ## Structure See [references/folder-structure.md](references/folder-structure.md) for the complete directory blueprint. ## Implementation Guidelines - **Feature Encapsulation**: Keep logic, models, and UI internal to the feature directory. - **Strict Layering**: Maintain 3-layer separation (Domain/Data/Presentation) within each feature. - **Dependency Rule**: `Presentation -> Domain <- Data`. Domain must have zero external dependencies. - **Cross-Feature Communication**: Features only depend on the **Domain** layer of other features. - **Flat features**: Keep `lib/features/` flat; avoid nested features. - **No DTO Leakage**: Never expose DTOs or Data Sources to UI or other features; return Domain Entities. - **Shared logic**: Move cross-cutting concerns to `lib/shared/` or `lib/core/`. ## Reference & Examples For feature folder blueprints and cross-layer dependency templates: See [references/REFERENCE.md](references/REFERENCE.md). ## Related Topics layer-based-clean-architecture | retrofit-networking | go-router-navigation | bloc-state-management | dependency-injection

评论 0

还没有评论,来抢沙发。