Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / fooddelivery / AGENTS.md

AGENTS.md3.9 KiBRenderedCodeRaw
1# AGENTS.md — fooddelivery/ (':fooddelivery')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `fooddelivery/` + allowed shared modules. Do not root-scan.
4
5_Install: ./install fooddelivery (dev by default)._
6<!-- last-reviewed: 2026-10-16 -->
7- Gradle: :fooddelivery / dir: fooddelivery/
8- Package roots present: ui, data, platform, intents, notifications
9- Entry files: MainActivity.kt + FoodDeliveryApplication.kt + platform/AppInit.kt (no Route.kt — home/restaurant/cart/checkout/orders flow)
10- Deps: :library:image, :library:map, :library:network
11- Metadata: metadata_data/fooddelivery.md (present)
12- Rust: no / screenshotTest: yes
13
14## Overview
15**Purpose:** US-only food-delivery client — restaurant browse, cart + Stripe checkout (pickup/delivery, tips, promos), live order tracking, deals/loyalty. Requires internet throughout.
16**Key features:**
17- Home/deals → restaurant → cart → checkout → success flow with modifier dialogs and totals; account addresses/auth/profile
18- `data/CartStore` + `AddressStore` client state over `api/BitesApi`; order tracking in `notifications/` (live update + foreground tracking service)
19- Assistant order lookup via `intents/OrderLookupIntent` (+ `ipc/OrderLookupContract`)
20**Architecture / data-flow:** `ui/` flow screens → `platform/AppInit`-wired state (`data/CartStore`) → `api/BitesApi` backend; tracking runs in `notifications/OrderTrackingService` independent of the UI process.
21**Entry points + reading order:** `FoodDeliveryApplication.kt` → `platform/AppInit.kt` → `MainActivity.kt` → `ui/HomeScreen.kt` → `ui/RestaurantScreen.kt` → `ui/CartScreen.kt` → `ui/CheckoutScreen.kt` → `api/BitesApi.kt`.
22**Gotchas:**
23- `api/` and `ipc/` are NOT closed package roots — pending migration; don't add more files there
24- Payment data goes straight to Stripe tokenization — card numbers must never hit app state or logs
25- Tracking must survive the app being killed; keep it in the service, not the ViewModel
26
27## Key files
28### Root + platform/ — app init + entry (no Route.kt)
29- com/vayunmathur/fooddelivery/FoodDeliveryApplication.kt
30- com/vayunmathur/fooddelivery/MainActivity.kt
31- com/vayunmathur/fooddelivery/platform/AppInit.kt
32### api/ — backend client (pending migration to closed roots)
33- com/vayunmathur/fooddelivery/api/BitesApi.kt
34### data/ — cart, addresses, models
35- com/vayunmathur/fooddelivery/data/CartStore.kt
36- com/vayunmathur/fooddelivery/data/AddressStore.kt
37- com/vayunmathur/fooddelivery/data/Models.kt
38### intents/ + ipc/ — assistant lookup contract
39- com/vayunmathur/fooddelivery/intents/OrderLookupIntent.kt
40- com/vayunmathur/fooddelivery/ipc/OrderLookupContract.kt
41### notifications/ — live tracking
42- com/vayunmathur/fooddelivery/notifications/OrderTrackingService.kt
43- com/vayunmathur/fooddelivery/notifications/OrderLiveUpdate.kt
44### ui/ — browse, cart, checkout, orders, account
45- com/vayunmathur/fooddelivery/ui/HomeScreen.kt
46- com/vayunmathur/fooddelivery/ui/DealsScreen.kt
47- com/vayunmathur/fooddelivery/ui/RestaurantScreen.kt
48- com/vayunmathur/fooddelivery/ui/RestaurantSections.kt
49- com/vayunmathur/fooddelivery/ui/ModifierDialog.kt
50- com/vayunmathur/fooddelivery/ui/CartScreen.kt
51- com/vayunmathur/fooddelivery/ui/CheckoutScreen.kt
52- com/vayunmathur/fooddelivery/ui/CheckoutSections.kt
53- com/vayunmathur/fooddelivery/ui/CheckoutTotals.kt
54- com/vayunmathur/fooddelivery/ui/CheckoutSuccess.kt
55- com/vayunmathur/fooddelivery/ui/OrdersScreen.kt
56- com/vayunmathur/fooddelivery/ui/OrdersScreenSection.kt
57- com/vayunmathur/fooddelivery/ui/OrderTrackingScreen.kt
58- com/vayunmathur/fooddelivery/ui/AccountScreen.kt
59- com/vayunmathur/fooddelivery/ui/AccountAuth.kt
60- com/vayunmathur/fooddelivery/ui/AccountProfile.kt
61- com/vayunmathur/fooddelivery/ui/AccountAddresses.kt
62- com/vayunmathur/fooddelivery/ui/AddressFormCard.kt
63
64## Verify (this module only)
65```
66./gradlew :fooddelivery:compileDevKotlin
67./gradlew :fooddelivery:lint
68./gradlew :fooddelivery:checkMetadata
69```