Otobees

Otobees — internally developed as Zaggo / FirstGo — is a large, API-driven Flutter application that digitizes bus reservation and transport operations for the city of Zagazig, Egypt. It is Arabic-first at the product level: the app pins `Locale('ar', 'EG')`, uses RTL layout, shows all labels and validation messages in Arabic, and on wide desktop/web screens renders inside an iPhone 13 `DeviceFrame` mockup. The app implements four distinct user roles — passenger, driver, admin, and super-admin — each with its own `go_router` `StatefulShellRoute.indexedStack` shell and RBAC redirect guards. Passengers browse route lines, view line details, create/cancel bookings, subscribe to plans (immediate pay-now or deferred payment), and submit payments three ways: cash to an admin, cash to a driver, or electronic payment with a scanned receipt screenshot (`image_picker`). Drivers and admins confirm or reject those cash payments (with a mandatory rejection reason for drivers), review payment summaries and per-seat balance summaries, and admins additionally manage buses, drivers, passengers, stations, pickup points, route templates/sources, subscription types, approvals, and system settings. A super-admin manages admin accounts. The architecture is feature-first Clean Architecture (data → domain → presentation) with bloc/cubit state management over Freezed sealed states, `get_it` DI, Retrofit/Dio networking, and 90+ domain entities. Local caching is offline-first using Hive CE typed adapters with fallback only on connectivity errors, tokens live in `flutter_secure_storage`, Firebase Messaging delivers push notifications, and `local_auth` biometrics gate sensitive balance displays. Notable production touches include custom snackbar/dialog overlays, a reusable Zaggo design system, skeleton loading, infinite scroll pagination, and UTC-to-local time interceptor handling.

Key Features

Role-based access with per-role shells and redirect guards for passenger, driver, admin, and super-admin users via go_router
Passenger journey: browse route lines, view details, create/book trips, and manage bookings (create, update, cancel)
Subscription plans with immediate or deferred payment options plus pay, cancel, history, and admin approval/rejection flows
Multi-channel payments: cash to admin, cash to driver, and electronic payments with screenshot upload (image_picker); drivers and admins confirm/reject with rejection reasons
Offline-first caching via typed Hive CE adapters with cache fallback only on connectivity errors, plus secure token storage and 401 auto-refresh
Push notifications via Firebase Messaging with notification list and unread-count tracking
Biometric authentication (local_auth) gates sensitive wallet/balance displays in seat summary and settings
Admin operations suite: manage buses, drivers, passengers, stations, pickup points, route templates/sources, subscription types, seat summaries, and system settings

Technologies

FlutterDartgo_routerflutter_blocfreezedget_itdioretrofitjson_serializablehive_cehive_ce_flutterhive_ce_generatordartzequatableflutter_hooksflutter_secure_storageconnectivity_plusfirebase_corefirebase_messagingflutter_local_notificationsimage_pickerlocal_authinfinite_scroll_paginationskeletonizerdevice_frameintlflutter_slidableurl_launcher

Gallery