How kurokeita/quotable-flutter-app works
Main Components
a) Frontend Layer (Presentation):
• Views/Screens (found in lib/ui/views/)
• Home View
• Quote List View
• Quote of the Day View
• Startup View
• Components (lib/ui/components/)
• Layout components
• Quote-specific components (cards and tiles)
• Bottom Sheets
• Dialogs
b) Business Logic Layer:
• ViewModels (MVVM pattern is used with Stacked architecture)
• Services Layer (lib/services/)
• API Service
• Authentication Service
• Database Service
• Quote Service
• Author Service
• Preference Service
c) Data Layer:
• Models (lib/models/)
• Quote Model
• Author Model
• Repositories (lib/database/)
• Quote Repository
• Author Repository
• Base Repository
d) Platform-Specific Implementations:
• Android Implementation
• iOS Implementation
• Web Implementation
┌─────────────────────────────────────────┐
• Presentation Layer (UI) │
• Views │
• Components │
• Bottom Sheets │
• Dialogs │
• ┬───────────────────────┘
• ↕
┌─────────────────┴───────────────────────┐
• Business Logic Layer │
• ViewModels │
• Services │
• ┬───────────────────────┘
• ↕
┌─────────────────┴───────────────────────┐
• Data Layer │
• Models │
• Repositories │
• ┘
Connection Types
• Double lines for data bindings between ViewModels and Views
Additional Elements
a) Navigation Flow:
• Relationships between views
• Bottom sheet and dialog triggers
b) Data Flow:
• API to Repository to Service to ViewModel to View
Notes for Implementation
• Version information
• Document all external dependencies
The service layer's role in managing business logic
Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that make this quotes application unique while following Flutter and Stacked architecture best practices.