How resourceful-nebil/flutter-clean-architecture-starter-kit-template works
Main Components
a) Presentation Layer (Top)
• UI Components (Screens & Widgets)
• State Management (Cubit/BLoC)
b) Domain Layer (Middle)
• Entities
• Use Cases
• Repository Interfaces
c) Data Layer (Bottom)
• Repository Implementations
• Data Sources (Remote & Local)
• Models
d) Core Infrastructure (Side)
• Network Info
• API Consumer
• Cache Helper
• Error Handling
┌─────────────────────────────────────────────────────────────┐
• Presentation Layer │
• ┤
• ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
• User Screen │ │Post Screen │ │Template │ │
• & Widgets │ │ │ │Screen │ │
• ┬──────┘ └──────┬──────┘ └──────┬──────┘ │
• ┌──────┴──────┐ ┌──────┴──────┐ ┌──────┴──────┐ │
• User Cubit │ │Post Cubit │ │Template │ │
• Cubit │ │
• ┬──────┘ └──────┬──────┘ └──────┬──────┘ │
• ┼───────────────┼───────────────┼────────────────┤
• Domain Layer │
• ┼───────────────┼───────────────┼────────────────┤
• ┌──────┴──────┐ ┌──────┴──────┐ ┌──────┴──────┐ │
• User Entity │ │Post Entity │ │Template │ │
• & Use Cases │ │& Use Cases │ │Entity │ │
• ┬──────┘ └──────┬──────┘ └──────┬──────┘ │
• ┼───────────────┼───────────────┼────────────────┤
• Data Layer │
• ┼───────────────┼───────────────┼────────────────┤
• ┌──────┴──────┐ ┌──────┴──────┐ ┌──────┴──────┐ │
• User Repo │ │Post Repo │ │Template │ │
• Impl │ │Impl │ │Repo Impl │ │
• ┬──────┘ └──────┬──────┘ └──────┬──────┘ │
• ┌──────┴──────┐ ┌──────┴──────┐ ┌──────┴──────┐ │
• Data Sources │ │Data Sources │ │Data Sources │ │
• Remote/Local │ │Remote/Local │ │Remote/Local │ │
• ┘ └─────────────┘ └─────────────┘ │
• ┘
• ┬───────┴──────────┬──────┘
• ┌──────┴──────┐ ┌─────┴─────┐
• Core Network │ │Core Cache │
• & API │ │ │
• ┘ └───────────┘
Important Elements to Highlight
a) Dependencies Flow:
• Dependency injection paths
b) Data Flow:
• How data moves from API/Cache through repositories to UI
• Error handling paths
c) Feature Modules:
• Clearly separate User, Post, and Template features
• Shared core dependencies
Implementation Details
• Use standardized UML notation where appropriate
• Brief descriptions of key components
• Major interfaces and abstract classes
• Where dependency injection occurs
Remember to include the core utilities (network_info, api_consumer, cache_helper) as supporting infrastructure, showing how they interact with the main architectural components.