# younas548/sensor-zoomigoo architecture

> Architecture diagram of the GitHub repository younas548/sensor-zoomigoo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/younas548/sensor-zoomigoo
- Repository: https://github.com/younas548/sensor-zoomigoo

## Overview

Zoomigoo is a multi-role ride-booking and parcel-delivery platform. Its documented user workflow runs from passenger ride or parcel requests through driver matching, assignment, live progress, and completion; administrators monitor platform activity. The tree exposes native Flutter launchers but not the Dart application sources, so the client capabilities below are documented rather than source-verified. The backend excerpts show ride-related Cloud Functions and parcel callables; parcel pricing, OTP, dispatch, and types have distinct source modules. Firebase and map integrations are documented, but many client-side connections cannot be established from the available excerpts.

Main entry points: [`functions/src/parcel/index.ts`](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/index.ts) (Parcel callables), [`functions/src/index.ts`](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts) (Driver matching), [`functions/src/parcel/dispatch.ts`](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/dispatch.ts) (Offer dispatch), [`functions/src/parcel/pricing.ts`](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/pricing.ts) (Parcel pricing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Role-based apps"]
  node_mobile["Flutter applications"]
end

subgraph group_rides["Ride backend"]
  node_ride_request["Ride request<br/>[index.ts]"]
  node_matching["Driver matching<br/>[index.ts]"]
  node_fare["Ride fare quote<br/>[index.ts]"]
  node_ride_lifecycle["Ride lifecycle<br/>[index.ts]"]
  node_driver_safety["Safety scoring<br/>[index.ts]"]
end

subgraph group_parcels["Parcel backend"]
  node_parcel_api["Parcel callables<br/>[index.ts]"]
  node_parcel_dispatch["Offer dispatch<br/>[dispatch.ts]"]
  node_parcel_pricing["Parcel pricing<br/>[pricing.ts]"]
  node_parcel_otp["Pickup and delivery OTP<br/>[otp.ts]"]
end

subgraph group_platform["Platform services"]
  node_firestore[("Cloud Firestore")]
  node_realtime_db[("Realtime Database")]
  node_firebase_services["Firebase services"]
  node_maps["Google Maps and location"]
end

node_passenger(("Passenger"))
node_driver(("Driver"))
node_admin(("Administrator"))

node_passenger -->|"uses"| node_mobile
node_driver -->|"uses"| node_mobile
node_admin -->|"uses"| node_mobile
node_mobile -->|"requests rides"| node_ride_request
node_ride_request -->|"checks eligibility"| node_matching
node_matching -->|"offers requests"| node_driver
node_mobile -->|"requests quote"| node_fare
node_ride_request -->|"stores ride data"| node_firestore
node_matching -->|"reads driver data"| node_firestore
node_matching -->|"prioritizes safety"| node_driver_safety
node_driver_safety -->|"reads score data"| node_firestore
node_ride_lifecycle -->|"updates ride data"| node_firestore
node_ride_lifecycle -->|"updates status"| node_realtime_db
node_driver -->|"shares location"| node_mobile
node_mobile -->|"syncs location"| node_realtime_db
node_mobile -->|"requests delivery"| node_parcel_api
node_parcel_api -->|"loads fare config"| node_parcel_pricing
node_parcel_api -->|"creates and verifies"| node_parcel_otp
node_parcel_api -->|"dispatches offers"| node_parcel_dispatch
node_parcel_api -->|"reads and writes orders"| node_firestore
node_parcel_dispatch -->|"reads driver data"| node_firestore
node_parcel_dispatch -->|"sends offers"| node_firebase_services
node_mobile -->|"uses authentication and storage"| node_firebase_services
node_mobile -->|"uses maps and location"| node_maps
node_mobile -->|"uses application data"| node_firestore
node_mobile -->|"syncs live updates"| node_realtime_db

click node_ride_request "https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts"
click node_matching "https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts"
click node_fare "https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts"
click node_ride_lifecycle "https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts"
click node_driver_safety "https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts"
click node_parcel_api "https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/index.ts"
click node_parcel_dispatch "https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/dispatch.ts"
click node_parcel_pricing "https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/pricing.ts"
click node_parcel_otp "https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/otp.ts"

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_mobile toneBlue
class node_ride_request,node_matching,node_fare,node_ride_lifecycle,node_driver_safety toneAmber
class node_parcel_api,node_parcel_dispatch,node_parcel_pricing,node_parcel_otp toneMint
class node_firestore,node_realtime_db,node_firebase_services,node_maps toneRose
class node_passenger,node_driver,node_admin toneIndigo
```

## Components

### Role-based apps

- **Flutter applications**

### Ride backend

- [Ride request](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts): `functions/src/index.ts`
- [Driver matching](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts): `functions/src/index.ts`
- [Ride fare quote](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts): `functions/src/index.ts`
- [Ride lifecycle](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts): `functions/src/index.ts`
- [Safety scoring](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/index.ts): `functions/src/index.ts`

### Parcel backend

- [Parcel callables](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/index.ts): `functions/src/parcel/index.ts`
- [Offer dispatch](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/dispatch.ts): `functions/src/parcel/dispatch.ts`
- [Parcel pricing](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/pricing.ts): `functions/src/parcel/pricing.ts`
- [Pickup and delivery OTP](https://github.com/younas548/sensor-zoomigoo/blob/main/functions/src/parcel/otp.ts): `functions/src/parcel/otp.ts`

### Platform services

- **Cloud Firestore**
- **Realtime Database**
- **Firebase services**
- **Google Maps and location**

### Other components

- **Passenger**
- **Driver**
- **Administrator**

## Connections

- Passenger → Flutter applications: uses
- Driver → Flutter applications: uses
- Administrator → Flutter applications: uses
- Flutter applications → Ride request: requests rides
- Ride request → Driver matching: checks eligibility
- Driver matching → Driver: offers requests
- Flutter applications → Ride fare quote: requests quote
- Ride request → Cloud Firestore: stores ride data
- Driver matching → Cloud Firestore: reads driver data
- Driver matching → Safety scoring: prioritizes safety
- Safety scoring → Cloud Firestore: reads score data
- Ride lifecycle → Cloud Firestore: updates ride data
- Ride lifecycle → Realtime Database: updates status
- Driver → Flutter applications: shares location
- Flutter applications → Realtime Database: syncs location
- Flutter applications → Parcel callables: requests delivery
- Parcel callables → Parcel pricing: loads fare config
- Parcel callables → Pickup and delivery OTP: creates and verifies
- Parcel callables → Offer dispatch: dispatches offers
- Parcel callables → Cloud Firestore: reads and writes orders
- Offer dispatch → Cloud Firestore: reads driver data
- Offer dispatch → Firebase services: sends offers
- Flutter applications → Firebase services: uses authentication and storage
- Flutter applications → Google Maps and location: uses maps and location
- Flutter applications → Cloud Firestore: uses application data
- Flutter applications → Realtime Database: syncs live updates
