How karanongit/flow_app works
Purpose and Entry Points
FLOW is a cross-platform Flutter client that prototypes an electric ride-hailing journey: authentication, trip selection, driver matching/tracking, receipt/payment, and account management. Dart startup is lib/main.dart; app-wide dependency setup, routing, and theme establish the application boundary in lib/core/providers/app_providers.dart, lib/core/router/app_router.dart, and lib/core/theme/app_theme.dart.
Runtime and Platform Hosts
Flutter/Dart supplies the shared UI runtime for Android, iOS, macOS, and web. Native hosts bootstrap the Flutter engine rather than contain product logic: android/app/src/main/kotlin/com/flow/app/flow_app/MainActivity.kt, ios/Runner/AppDelegate.swift, and macos/Runner/MainFlutterWindow.swift. Web is hosted through web/index.html. The project has no indicated backend, authentication provider, payment gateway, or third-party map API.
Application Composition and Navigation
go_router declaratively maps auth, tab-shell, active-ride, and account subpage URLs. lib/core/router/app_router.dart is the central control-flow hub: screens invoke route transitions rather than directly composing the whole journey. Feature ownership is divided between lib/features/auth, lib/features/ride, and lib/features/account; the account shell provides persistent tab-level structure in lib/features/account/widgets/account_shell_scaffold.dart.
State, Domain, and Data Boundary
Riverpod providers expose shared application state and services through lib/core/providers/app_providers.dart. The ride workflow is coordinated by lib/features/ride/controllers/ride_controller.dart, which mediates screen interactions and trip state. Domain-shaped immutable data is organized under lib/data/models, notably lib/data/models/trip_model.dart, lib/data/models/driver_model.dart, and lib/data/models/payment_model.dart. lib/data/repositories/flow_repository.dart defines the app-facing data boundary, currently fulfilled by local fixture data in lib/data/repositories/mock_flow_data.dart, so UI flows are demonstrative rather than connected to remote infrastructure.
Ride Lifecycle
The primary flow proceeds from destination input and ride tier selection to simulated driver matching, in-progress tracking, then receipt/payment. Core stages are represented by lib/features/ride/screens/home_screen.dart, lib/features/ride/screens/ride_selection_screen.dart, lib/features/ride/screens/matching_screen.dart, lib/features/ride/screens/tracking_screen.dart, and lib/features/ride/screens/receipt_screen.dart. Search and scheduling are interaction boundaries encapsulated in lib/features/ride/widgets/place_search_modal.dart and lib/features/ride/widgets/schedule_ride_modal.dart.
Mapping, Location, and Routing
Maps are rendered locally via the custom vector canvas rather than an external map SDK: lib/core/widgets/map_canvas.dart supplies map visuals and route animation, while lib/core/widgets/car_pin.dart represents moving vehicle state. lib/core/widgets/osm_map_view.dart is an additional map-view abstraction. Location and route-calculation responsibilities are isolated behind lib/core/services/location_service.dart and lib/core/services/routing_service.dart; these are the natural integration boundaries for device geolocation and a future routing/maps service.
Presentation System
A centralized design system controls colors, typography, and theme modes through lib/core/theme/app_colors.dart, lib/core/theme/app_typography.dart, and lib/core/theme/app_theme.dart. Reusable branded and action primitives reside in lib/core/widgets/flow_logo.dart and lib/core/widgets/primary_button.dart, keeping feature screens focused on journey-specific composition.
Main entry points: app_router.dart App router · main.dart Flutter startup · ride_controller.dart Ride controller · mock_flow_data.dart Local fixtures
Components 23
Platform Hosts
- Android host · Bootstraps the Flutter engine.
android/app/src/main/kotlin/com/flow/app/flow_app/MainActivity.kt - iOS host · Bootstraps the Flutter engine.
ios/Runner/AppDelegate.swift - macOS host · Bootstraps the Flutter engine.
macos/Runner/MainFlutterWindow.swift - Web host · Hosts the Flutter web runtime.
web/index.html
App Core
- Flutter startup
lib/main.dart - App providers · Exposes shared state and services.
lib/core/providers/app_providers.dart - App router · Maps auth, shell, ride, and account routes.
lib/core/router/app_router.dart - Design system · Centralizes theme, color, and typography.
lib/core/theme/app_theme.dart - Location service · Future device geolocation boundary.
lib/core/services/location_service.dart - Routing service · Future route-calculation boundary.
lib/core/services/routing_service.dart - Map canvas · Renders local map visuals and route animation.
lib/core/widgets/map_canvas.dart - Account shell · Provides persistent account-level tab structure.
lib/features/account/widgets/account_shell_scaffold.dart
Ride Journey
- Ride controller · Coordinates ride interactions and trip state.
lib/features/ride/controllers/ride_controller.dart - Destination input
lib/features/ride/screens/home_screen.dart - Ride selection
lib/features/ride/screens/ride_selection_screen.dart - Driver matching
lib/features/ride/screens/matching_screen.dart - Ride tracking
lib/features/ride/screens/tracking_screen.dart - Receipt and payment
lib/features/ride/screens/receipt_screen.dart
Data Layer
- Flow repository · Defines the app-facing data contract.
lib/data/repositories/flow_repository.dart - Local fixtures · Supplies demonstrative ride data without remote infrastructure.
lib/data/repositories/mock_flow_data.dart - Trip model
lib/data/models/trip_model.dart - Driver model
lib/data/models/driver_model.dart - Payment model
lib/data/models/payment_model.dart
Connections 27
- Android host → Flutter startup: boots
- iOS host → Flutter startup: boots
- macOS host → Flutter startup: boots
- Web host → Flutter startup: hosts
- Flutter startup → App providers: initializes
- Flutter startup → App router: starts
- Flutter startup → Design system: applies
- App router → Account shell: routes to shell
- App router → Destination input: routes to
- App router → Ride selection: routes to
- App router → Driver matching: routes to
- App router → Ride tracking: routes to
- App router → Receipt and payment: routes to
- Destination input → Ride selection: select ride
- Ride selection → Driver matching: request ride
- Driver matching → Ride tracking: driver matched
- Ride tracking → Receipt and payment: complete trip
- Ride controller → Flow repository: reads ride data
- App providers → Ride controller: provides
- Flow repository → Local fixtures: fulfilled by
- Local fixtures → Trip model: uses
- Local fixtures → Driver model: uses
- Local fixtures → Payment model: uses
- Ride controller → Location service: uses
- Ride controller → Routing service: uses
- Ride tracking → Map canvas: renders
- Map canvas → Routing service: animates route from