# mohamedamin911/yallago-app-flutter architecture

> Architecture diagram of the GitHub repository mohamedamin911/yallago-app-flutter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohamedamin911/yallago-app-flutter
- Repository: https://github.com/mohamedamin911/yallago-app-flutter

## Overview

YallaGo is a Flutter ride-hailing system for customers and drivers, with a documented web admin dashboard. The main workflow is customer authentication and destination/fare selection, followed by a ride request, driver handling, live trip updates, payment, and trip history. The README describes a BLoC/Cubit separation between UI and business logic and names Firebase and third-party integrations. Dart implementation files were not included in the excerpts, so subsystem paths use existing directories and relationships are limited to those explicitly documented.

Main entry points: [`lib/bloc/customer`](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/customer) (Customer ride logic), [`lib/bloc/driver`](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/driver) (Driver trip logic), [`lib/UI/customer home`](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/customer%20home) (Customer app UI), [`lib/UI/driver home`](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/driver%20home) (Driver app UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer experience"]
  node_customer_ui["Customer app UI"]
  node_customer_auth["Customer authentication"]
  node_customer_logic["Customer ride logic"]
  node_destination["Destination search"]
  node_fare["Fare estimate"]
  node_trip_tracking["Trip tracking"]
  node_customer_history["Ride history"]
end

subgraph group_driver["Driver experience"]
  node_driver_ui["Driver app UI"]
  node_driver_onboarding["Driver onboarding"]
  node_driver_logic["Driver trip logic"]
  node_payout["Earnings and payouts"]
end

subgraph group_platform["Shared platform services"]
  node_payment["Customer payments"]
  node_chat["In-app chat"]
  node_notifications["Local notifications"]
  node_maps["Google Maps"]
  node_osrm["OSRM routing"]
  node_cloudinary["Cloudinary"]
end

subgraph group_backend["Backend and operations"]
  node_firebase["Firebase services"]
  node_firestore[("Firestore")]
  node_admin["Admin dashboard"]
  node_stripe["Stripe services"]
end

node_customer(("Customer"))
node_driver(("Driver"))

node_customer -->|"authenticates"| node_customer_auth
node_customer -->|"requests rides"| node_customer_ui
node_customer_ui -->|"separates via BLoC"| node_customer_logic
node_customer_ui -->|"searches destinations"| node_destination
node_customer_ui -->|"estimates fare"| node_fare
node_fare -->|"routes and estimates"| node_osrm
node_customer_logic -->|"tracks trip"| node_trip_tracking
node_customer_logic -->|"shows history"| node_customer_history
node_customer_logic -->|"manages payments"| node_payment
node_payment -->|"charges through"| node_stripe
node_customer_logic -->|"supports trip chat"| node_chat
node_driver -->|"signs up"| node_driver_onboarding
node_driver -->|"manages trips"| node_driver_ui
node_driver_ui -->|"separates via BLoC"| node_driver_logic
node_driver_logic -->|"updates trip progress"| node_trip_tracking
node_driver_logic -->|"tracks earnings"| node_payout
node_payout -->|"pays through Connect"| node_stripe
node_driver_logic -->|"supports trip chat"| node_chat
node_customer_logic -->|"uses backend"| node_firebase
node_driver_logic -->|"uses backend"| node_firebase
node_firebase -->|"stores ride updates"| node_firestore
node_customer_ui -->|"shows live map"| node_maps
node_driver_ui -->|"shows navigation"| node_maps
node_driver_onboarding -->|"uploads images"| node_cloudinary
node_customer_logic -->|"notifies arrival"| node_notifications
node_driver_logic -->|"notifies completion"| node_notifications

click node_customer_ui "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/customer%20home"
click node_customer_auth "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/auth/screens/customer_auth"
click node_customer_logic "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/customer"
click node_destination "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/customer%20home/widgets/location_search_widgets"
click node_fare "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/customer/home"
click node_trip_tracking "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/trip"
click node_customer_history "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/customer/customer_ride_history"
click node_payment "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/payment"
click node_driver_ui "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/driver%20home"
click node_driver_onboarding "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/auth/screens/driver_auth"
click node_driver_logic "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/driver"
click node_payout "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/driver/payout_history"
click node_chat "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/chat"
click node_notifications "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/services"
click node_firebase "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/services"
click node_admin "https://github.com/mohamedamin911/yallago-app-flutter/tree/main/web"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_customer_ui,node_customer_auth,node_customer_logic,node_destination,node_fare,node_trip_tracking,node_customer_history toneBlue
class node_driver_ui,node_driver_onboarding,node_driver_logic,node_payout toneAmber
class node_payment,node_chat,node_notifications,node_maps,node_osrm,node_cloudinary toneMint
class node_firebase,node_firestore,node_admin,node_stripe toneRose
class node_customer,node_driver toneIndigo
```

## Components

### Customer experience

- [Customer app UI](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/customer%20home): `lib/UI/customer home`
- [Customer authentication](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/auth/screens/customer_auth): `lib/UI/auth/screens/customer_auth`
- [Customer ride logic](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/customer): `lib/bloc/customer`
- [Destination search](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/customer%20home/widgets/location_search_widgets): `lib/UI/customer home/widgets/location_search_widgets`
- [Fare estimate](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/customer/home): `lib/bloc/customer/home`
- [Trip tracking](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/trip): `lib/bloc/trip`
- [Ride history](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/customer/customer_ride_history): `lib/bloc/customer/customer_ride_history`

### Driver experience

- [Driver app UI](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/driver%20home): `lib/UI/driver home`
- [Driver onboarding](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/UI/auth/screens/driver_auth): `lib/UI/auth/screens/driver_auth`
- [Driver trip logic](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/driver): `lib/bloc/driver`
- [Earnings and payouts](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/driver/payout_history): `lib/bloc/driver/payout_history`

### Shared platform services

- [Customer payments](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/payment): `lib/bloc/payment`
- [In-app chat](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/bloc/chat): `lib/bloc/chat`
- [Local notifications](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/services): `lib/services`
- **Google Maps**
- **OSRM routing**
- **Cloudinary**

### Backend and operations

- [Firebase services](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/lib/services): `lib/services`
- **Firestore**
- [Admin dashboard](https://github.com/mohamedamin911/yallago-app-flutter/tree/main/web): `web`
- **Stripe services**

### Other components

- **Customer**
- **Driver**

## Connections

- Customer → Customer authentication: authenticates (evidence: `README.md`)
- Customer → Customer app UI: requests rides (evidence: `README.md`)
- Customer app UI → Customer ride logic: separates via BLoC (evidence: `README.md`)
- Customer app UI → Destination search: searches destinations (evidence: `README.md`)
- Customer app UI → Fare estimate: estimates fare (evidence: `README.md`)
- Fare estimate → OSRM routing: routes and estimates (evidence: `README.md`)
- Customer ride logic → Trip tracking: tracks trip (evidence: `README.md`)
- Customer ride logic → Ride history: shows history (evidence: `README.md`)
- Customer ride logic → Customer payments: manages payments (evidence: `README.md`)
- Customer payments → Stripe services: charges through (evidence: `README.md`)
- Customer ride logic → In-app chat: supports trip chat (evidence: `README.md`)
- Driver → Driver onboarding: signs up (evidence: `README.md`)
- Driver → Driver app UI: manages trips (evidence: `README.md`)
- Driver app UI → Driver trip logic: separates via BLoC (evidence: `README.md`)
- Driver trip logic → Trip tracking: updates trip progress (evidence: `README.md`)
- Driver trip logic → Earnings and payouts: tracks earnings (evidence: `README.md`)
- Earnings and payouts → Stripe services: pays through Connect (evidence: `README.md`)
- Driver trip logic → In-app chat: supports trip chat (evidence: `README.md`)
- Customer ride logic → Firebase services: uses backend (evidence: `README.md`)
- Driver trip logic → Firebase services: uses backend (evidence: `README.md`)
- Firebase services → Firestore: stores ride updates (evidence: `README.md`)
- Customer app UI → Google Maps: shows live map (evidence: `README.md`)
- Driver app UI → Google Maps: shows navigation (evidence: `README.md`)
- Driver onboarding → Cloudinary: uploads images (evidence: `README.md`)
- Customer ride logic → Local notifications: notifies arrival (evidence: `README.md`)
- Driver trip logic → Local notifications: notifies completion (evidence: `README.md`)
