Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / taxi / AGENTS.md
| 1 | # AGENTS.md — taxi/ (':taxi') |
| 2 | |
| 3 | > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `taxi/` + allowed shared modules. Do not root-scan. |
| 4 | |
| 5 | _Install: ./install taxi (dev by default)._ |
| 6 | - Gradle: :taxi / dir: taxi/ |
| 7 | - Package roots present: ui, data, platform, network, intents, provider, notifications |
| 8 | - Entry files: MainActivity.kt, Route.kt, Navigation.kt |
| 9 | - Deps: :library:network, :library:map, :library:image |
| 10 | - Metadata: metadata_data/taxi.md (present) |
| 11 | - Rust: no / screenshotTest: yes |
| 12 | |
| 13 | ## Overview |
| 14 | **Purpose:** US/CA ride-hailing aggregator — side-by-side Uber vs Lyft fare comparison, Lyft booking without the Lyft app, live tracking; address search with no Google Places/Play Services. |
| 15 | **Key features:** |
| 16 | - Quote flow: `provider/QuoteRepository` over `provider/RideProvider` impls → `ui/RideResults` comparison → per-provider booking (`LyftBooking`, Uber WebView auth) |
| 17 | - Live ride: tracking map + cards + driver/ETA notification (`notifications/RideTrackingService`); deep-link re-entry (`platform/deeplink/`) |
| 18 | - Cards tokenised straight to Stripe (`LyftCardTokenizer`) — numbers never touch the app backend |
| 19 | **Architecture / data-flow:** `ui/RideScreen` inputs → `provider/` quotes → results → booking → `notifications/` live tracking; `network/uber/` + `network/lyft/` own provider APIs/auth/parsers; `ipc/` directions + ride-handoff contracts bridge maps/assistant. |
| 20 | **Entry points + reading order:** `Route` → `MainActivity.kt` → `Navigation.kt` → `ui/RideScreen.kt` → `provider/QuoteRepository.kt` → `provider/RideProvider.kt` → `network/lyft/LyftProvider.kt` / `network/uber/UberProvider.kt`. |
| 21 | **Gotchas:** |
| 22 | - `ipc/` is NOT a closed package root — don't add more files there |
| 23 | - Unofficial-provider APIs are brittle — isolate Uber/Lyft failures from each other and from the quote UI |
| 24 | - Dialogs are `Route` destinations (`SignOutDialog`, `AddCardDialog`, `CancelRideDialog(rideId)`, `CancelResultDialog(rideId, outcome, message)` — `DialogPage()` entries in `ui/TaxiDialogEntries.kt`, stateless content under `ui/dialogs/`, results via `RESULT_*` keys in that file); the Lyft booking wizard in `ui/LyftBooking.kt` is a local multi-step dialog flow by exception marker. Screenshot captures in `src/screenshotTest` cover the ride tab and the dialog routes; the live/provider-backed routes are exempted per route in `Route.kt` |
| 25 | |
| 26 | ## Key files |
| 27 | ### Root — entry + navigation |
| 28 | - com/vayunmathur/taxi/MainActivity.kt |
| 29 | - com/vayunmathur/taxi/Navigation.kt |
| 30 | - com/vayunmathur/taxi/Route.kt |
| 31 | ### data/ — models + token stores |
| 32 | - com/vayunmathur/taxi/data/Models.kt |
| 33 | - com/vayunmathur/taxi/data/lyft/LyftTokenStore.kt |
| 34 | - com/vayunmathur/taxi/data/uber/UberSession.kt |
| 35 | ### provider/ — quote abstraction |
| 36 | - com/vayunmathur/taxi/provider/RideProvider.kt |
| 37 | - com/vayunmathur/taxi/provider/QuoteRepository.kt |
| 38 | ### network/lyft/ + network/uber/ — provider clients |
| 39 | - com/vayunmathur/taxi/network/lyft/LyftProvider.kt |
| 40 | - com/vayunmathur/taxi/network/lyft/LyftAuth.kt |
| 41 | - com/vayunmathur/taxi/network/lyft/LyftRideParser.kt |
| 42 | - com/vayunmathur/taxi/network/lyft/LyftOffersParser.kt |
| 43 | - com/vayunmathur/taxi/network/lyft/LyftProto.kt |
| 44 | - com/vayunmathur/taxi/network/lyft/LyftCardTokenizer.kt |
| 45 | - com/vayunmathur/taxi/network/uber/UberProvider.kt |
| 46 | - com/vayunmathur/taxi/network/uber/UberAuth.kt |
| 47 | - com/vayunmathur/taxi/network/uber/UberWebView.kt |
| 48 | ### platform/ + notifications/ — location, deep links, tracking |
| 49 | - com/vayunmathur/taxi/platform/location/LocationProvider.kt |
| 50 | - com/vayunmathur/taxi/platform/deeplink/RideDeepLinks.kt |
| 51 | - com/vayunmathur/taxi/notifications/RideTrackingService.kt |
| 52 | - com/vayunmathur/taxi/notifications/RideLiveUpdate.kt |
| 53 | ### intents/ + ipc/ — assistant + handoff contracts |
| 54 | - com/vayunmathur/taxi/intents/RideEstimateIntent.kt |
| 55 | - com/vayunmathur/taxi/ipc/RideHandoffContract.kt |
| 56 | - com/vayunmathur/taxi/ipc/DirectionsClient.kt |
| 57 | - com/vayunmathur/taxi/ipc/IntentLaunch.kt |
| 58 | ### ui/ — search, results, booking, tracking, accounts |
| 59 | - com/vayunmathur/taxi/ui/RideScreen.kt |
| 60 | - com/vayunmathur/taxi/ui/RideContent.kt |
| 61 | - com/vayunmathur/taxi/ui/RideInputs.kt |
| 62 | - com/vayunmathur/taxi/ui/RideResults.kt |
| 63 | - com/vayunmathur/taxi/ui/RideRoute.kt |
| 64 | - com/vayunmathur/taxi/ui/LyftBooking.kt |
| 65 | - com/vayunmathur/taxi/ui/LyftSignInScreen.kt |
| 66 | - com/vayunmathur/taxi/ui/UberSignInScreen.kt |
| 67 | - com/vayunmathur/taxi/ui/UberConnectScreen.kt |
| 68 | - com/vayunmathur/taxi/ui/TaxiDialogEntries.kt |
| 69 | - com/vayunmathur/taxi/ui/dialogs/AddCardDialog.kt |
| 70 | - com/vayunmathur/taxi/ui/dialogs/SignOutDialog.kt |
| 71 | - com/vayunmathur/taxi/ui/dialogs/CancelRideDialog.kt |
| 72 | - com/vayunmathur/taxi/ui/dialogs/CancelResultDialog.kt |
| 73 | - com/vayunmathur/taxi/ui/CurrentRideScreen.kt |
| 74 | - com/vayunmathur/taxi/ui/RideTrackingScreen.kt |
| 75 | - com/vayunmathur/taxi/ui/RideTrackingMap.kt |
| 76 | - com/vayunmathur/taxi/ui/RideTrackingCards.kt |
| 77 | - com/vayunmathur/taxi/ui/AccountsScreen.kt |
| 78 | - com/vayunmathur/taxi/ui/TaxiRideWideLayout.kt |
| 79 | |
| 80 | ## Verify (this module only) |
| 81 | ``` |
| 82 | ./gradlew :taxi:compileDevKotlin |
| 83 | ./gradlew :taxi:lint |
| 84 | ./gradlew :taxi:checkMetadata |
| 85 | ``` |