Skip to content

Repository files navigation

Flowery Tracking App 🌹🏍️

Overview

The Flowery Tracking App is a modern Flutter-based delivery management solution designed for drivers within the Flowery ecosystem.
It empowers drivers to receive, navigate, and complete delivery tasks seamlessly β€” building a reliable connection between stores and customers.

Developed with scalability, speed, and real-time synchronization in mind, the app integrates Firebase Firestore to keep driver and customer data perfectly aligned throughout the delivery process.

The project also includes robust localization support, dependency injection, and automated testing and CI/CD pipelines for continuous quality assurance.
Its architecture follows a feature-driven, layered structure β€” organizing logic into presentation, domain, and data layers β€” while connecting with both REST APIs and Firebase Firestore for smooth, live data flow.


Tech Stack

  • Flutter (UI)
  • Dart (language)
  • State management: flutter_bloc (Bloc/Cubit patterns)
  • Dependency injection: get_it + injectable (generated di.config.dart)
  • Networking: dio + retrofit (API clients & JSON serialization)
  • Serialization / Codegen: json_serializable, build_runner + code generation
  • Local storage / security: shared_preferences, flutter_secure_storage
  • Other libraries: cached_network_image, flutter_svg, lottie, location, pin_code_fields, logger, pretty_dio_logger, equatable, etc.
  • Testing: flutter_test, bloc_test, mockito for unit & widget tests
  • CI / Quality: GitHub Actions workflows for linting, SonarCloud, PR title checks, unit tests, and Fastlane for distribution
  • Firebase Firestore: Real-time synchronization between driver and user apps.

Architecture

The project follows a modern, layered and feature-driven architecture:

  • Feature-first layout (e.g., lib/features/<feature>/...) β€” each feature contains its data, domain, and presentation layers.
  • Domain layer: Entities and use-cases (pure Dart models & business rules).
  • Data layer: DTOs, remote/local data sources, repositories, and mappers to domain entities.
  • Presentation layer: Flutter UI using Bloc/Cubit for state management (views, pages, widgets).
  • Dependency injection: get_it configured and code-generated via injectable (di.config.dart).
  • Internationalization: ARB-based localization with l10n.yaml configuration (generated app_localizations.dart).

Features πŸŒ»πŸŒΌπŸ’

Onboarding & Authentication πŸš€

  • Onboarding Flow: Introduction screens guiding drivers about the app purpose.
  • Login / Apply:
    • Registered drivers can log in with email and password.
    • New drivers can apply for registration through a dedicated flow.
  • Forgot Password: Reset password easily using email verification and OTP flow.

Order Management πŸ“¦

  • Home Screen (Pending Orders):

    • Displays a real-time list of available delivery orders.
    • Drivers can accept an order directly from the list.
    • Once accepted, the order is locked until delivered.
  • Order Details Screen:

    • View detailed information including:
      • User Details
      • Store Details
      • Order Details
    • Direct navigation to map views:
      • Store Map: Displays the route from the driver’s current location to the store.
      • User Map: Displays the route from the store to the customer’s location.
  • Accepted Orders:

    • Real-time updates from Firestore.
    • The driver cannot accept new orders until the current one is delivered.

Completed & Canceled Orders πŸ“œ

  • Orders History Screen:
    • Displays all Completed and Canceled orders.
    • Each order includes detailed information such as user details, store details, and delivery time.
    • Drivers can open any previous order to view its Order Details Screen.

Profile & Settings πŸ‘€

  • Profile Screen:
    • View and edit personal information (name, phone number, etc.).
    • Change the app language between English and Arabic.
    • Log out securely anytime.

Testing

  • Run unit & widget tests:

    flutter test
  • Mocks are generated using mockito (see generated *.mocks.dart files).

  • CI runs tests via GitHub Actions and also runs flutter analyze for static analysis.


Folder Structure

lib/
β”œβ”€β”€ config/                         # Global app configurations
β”‚   β”œβ”€β”€ routing/                    # Navigation & route management
β”‚   └── theme/                      # Light/Dark themes setup

β”œβ”€β”€ core/                           # Shared base layer used by all features
β”‚   β”œβ”€β”€ components/                 # Reusable custom widgets
β”‚   β”œβ”€β”€ di/                         # Dependency Injection (Injectable setup)
β”‚   β”œβ”€β”€ errors/                     # Failure models + Safe API call handler
β”‚   β”œβ”€β”€ helpers/                    # Toasts, dialogs, spacing helpers, validators
β”‚   β”œβ”€β”€ l10n/                       # Localization (EN/AR) files and setup
β”‚   β”œβ”€β”€ network/                    # Networking base (Dio interceptors, client setup)
β”‚   β”œβ”€β”€ providers/                  # Theme & locale providers
β”‚   β”œβ”€β”€ services/                   # App level services (Token, Firebase, etc.)
β”‚   └── utils/                      # App constants, keys, assets utilities

β”œβ”€β”€ features/                       # Modular features (Fully independent)
β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”œβ”€β”€ data/
β”‚   β”‚   β”‚   β”œβ”€β”€ data_source/        # Remote/Local data sources
β”‚   β”‚   β”‚   β”œβ”€β”€ models/             # DTOs with json_serializable
β”‚   β”‚   β”‚   └── repositories_impl/  # Repository implementations
β”‚   β”‚   β”œβ”€β”€ domain/
β”‚   β”‚   β”‚   β”œβ”€β”€ entities/           # Business entities
β”‚   β”‚   β”‚   β”œβ”€β”€ repositories/       # Repository contracts
β”‚   β”‚   β”‚   └── usecases/           # Auth use cases
β”‚   β”‚   └── presentation/
β”‚   β”‚       β”œβ”€β”€ view_models/        # BLoC / Cubit state management
β”‚   β”‚       β”œβ”€β”€ screens/            # UI pages
β”‚   β”‚       └── widgets/            # Feature-specific widgets
β”‚   β”‚
β”‚   β”œβ”€β”€ home/                       # Same structure for each feature
β”‚   β”œβ”€β”€ product/
β”‚   └── cart/

β”œβ”€β”€ firebase_options.dart           # Firebase configuration file
└── main.dart                       # Application entry point


How to Run the Project

  1. Install Flutter (stable channel recommended)
  2. Get dependencies:
flutter pub get
  1. Generate code:
flutter pub run build_runner build --delete-conflicting-outputs
  1. Run the app:
flutter run
  1. Build an APK:
flutter build apk --release

CI / CD

  • GitHub Actions for linting, pull request title, branch name, unit testing, soner qube, building & distribution
  • Fastlane workflow for Firebase App Distribution

πŸ“± Screenshots

Onboarding

onboarding_1

Login

login

Apply Driver

apply_driver_1 apply_driver_2 apply_driver_3
apply_driver_4

Forgot Password

forgot1 code new_pass

Home Tab

home_tab

Order Details

order_details_1 order_details_2 order_details_3
order_details_4 order_details_5 order_details_6

Orders Tab

orders_tab

Profile

profile_1 profile_2 profile_3

πŸ‘¨β€πŸ’» Contributors


πŸ‘₯ GitHub Avatars


License

Choose a license (MIT recommended)

About

Real-time delivery driver tracking app built with Flutter, MVI Architecture, live GPS tracking, route optimization, and CI/CD.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages