/BrewMobil

☕ Flutter application following the Clean Architecture design pattern and MVVM

Primary LanguageDart

logo BrewMobil

This project is a Flutter application following the Clean Architecture design pattern and MVVM (Model-View-ViewModel), inspired by the Flutter Advanced Course - Clean Architecture With MVVM by Mina Farid on Udemy.

Table of Contents

  1. Overview
  2. Features
  3. Architecture
  4. Technologies and Packages
  5. Screenshots
  6. Credits

Overview

This app demonstrates the Clean Architecture design pattern in Flutter, with the separation of concerns between different layers: Data, Domain, and Presentation. It provides a scalable, testable, and maintainable code structure.

Features

  • State Management using Stream Controller and RX Dart
  • Full MVVM Pattern:
  • ViewModel Inputs and Outputs
  • Base ViewModel and Base UseCase
  • Multiple UI States managed via State Renderer (Full screen and popup states)
  • Localization with support for English and Persian (RTL - LTR)
  • Remote Data Source with API integration
  • Local Data Source for caching
  • Dependency Injection and Repository pattern implementation
  • Mock APIs for testing
  • Responsive UI with SVG and JSON Animations

Architecture

The project follows Clean Architecture with clear separations between:

  • Presentation Layer: UI components (Splash, Onboarding, Login, etc.), state rendering, and localization.
  • Domain Layer: Business logic with UseCases, Repository interfaces, and models.
  • Data Layer: API calls, caching, and data transformation (using mappers and the toDomain concept).

Layer Breakdown:

  1. Data Layer:
  • API Client with interceptor and JSON serialization.
  • Caching with a local data source.
  • Mappers to convert API responses to domain models.
  1. Domain Layer:
  • UseCases to handle business logic.
  • Either concept for handling success (Right) and failure (Left) cases.
  1. Presentation Layer:
  • State Management with RX Dart and Stream Builder.
  • State Renderer to handle loading, success, and error states.

Technologies and Packages

  • Flutter and Dart
  • RX Dart for state management.
  • Retrofit for HTTP requests.
  • Lottie for JSON animations.
  • GetIt for dependency injection.
  • 18 Flutter packages in total (JSON, SVG, animations, etc.)

Screenshots

Home Home Home Home Home Home Home Home

Credits

This project was created following the Flutter Advanced Course - Clean Architecture With MVVM by Mina Farid on Udemy.