How denisbronx/real-clean-architecture-in-android---sample works
• Library Modules (e.g., cache, httpclient, designsystem, foundations, viewmodel, etc.)
• Component Modules (e.g., cart-component, money-component, product-component, user-component, wishlist-component)
• UI Modules (e.g., cart-ui, main-ui, money-ui, onboarding-ui, plp-ui, wishlist-ui)
• App Module (the central coordinating module, which integrates navigation and dependency injection)
Clean Architecture Layers
• For each feature module (component and UI), show the separation into:
– Domain (business rules, use cases, entities): This layer is completely framework-independent.
– Data (repositories, data transfer objects, network & cache integration): These handle data sources.
– Presentation (UI components, ViewModels, screens): Found primarily in the UI modules.
• That component modules encapsulate domain and data layers, while UI modules expose the presentation layer.
Connections and Data Flow
• Within each feature area (e.g., Cart, Wishlist, etc.), show that the UI interacts with its corresponding component: the UI layer calls use cases or ViewModels that in turn rely on the domain and data layers represented in the associated component module.
Architectural Patterns and Design Principles
• That modularization is done by feature (Package by Component) rather than by typical layer, and note that component modules compile quickly since they’re pure Kotlin (or multiplatform) and independent from the Android framework.