ui-application — Flutter Mobile Storefront Client
By Engineering Team•October 10, 2026•5 min read
Responsibility
ui-application is the only client a shopper ever uses — every storefront, cart, checkout, settings, and personalization feature documented elsewhere in this pipeline is, from the shopper’s side, a screen inside this app. It holds no business logic of its own beyond composing backend data for display and capturing shopper input; every real decision (pricing, stock, eligibility, history) is resolved server-side.
- Feature Triad (GetX) — every screen or feature directory is exactly Binding (dependency wiring for the page lifecycle) → Controller (reactive state, page logic) → View (pure declarative UI tree), with an optional Service layer only when a controller’s logic goes beyond wiring one repository call to state (joining multiple repositories, caching, request shaping). A feature opened via
Get.bottomSheet/Get.dialoginstead of a routedGetPagemust have its Binding’sdependencies()invoked manually by the caller immediately before opening it. - Storefront & checkout — consumes
shop-serviceover GraphQL for curated storefront sections (including the recently-viewed teaser and “see all” screen), search, product detail, cart, and the unified checkout flow. - Identity & settings — consumes
user-secure-engineover REST for phone-OTP login/signup, profile, and Terms/Privacy consent; consumesuser-preference-serviceover REST for wishlist, addresses, and the rest of the Settings screen group. - Search typeahead — calls
search-service’s REST suggestion endpoint directly for the search bar’s typeahead, independent of the GraphQL-backed ranked-results flow. - Dynamic UI (Composite Pattern) —
lib/features/dashboard/sections/renders self-contained section components at runtime from JSON schema structures embedded in GraphQL payloads, rather than hardcoding the storefront’s section list client-side. - White-labeling — Android build flavors (
dev, plus per-tenant flavors) pair a distinct application ID with a--dart-define-from-fileenv file settingTENANT_ID; both axes must be passed together and kept in sync per tenant, or the app builds for the wrong tenant identity than it authenticates as. - Firebase App Check — attaches
X-Firebase-AppCheckon every request via a Dio interceptor, mirroringui-admin-application’s identical client-side pattern; see [[06-security]] for the shared debug-token hazard across all three services (this app,ui-admin-application,user-secure-engine).
Tech Stack
| Concern | Choice |
|---|---|
| Language / framework | Dart / Flutter |
| State management & DI | GetX (reactive controllers, Get.put/Get.find, route-level Bindings) |
| Networking | GraphQL client (shop-service), REST via Dio (every other backend service) |
| Auth | Firebase phone-OTP, exchanged via user-secure-engine; session/App Check tokens attached per-request by Dio interceptors |
| Build variants | Android product flavors (dev + per-tenant), paired with --dart-define-from-file for TENANT_ID |
Implementation Notes
- Every page-level screenshot walkthrough for this app’s screens lives under this application’s
08-ui-mobiledoc section — one doc per screen, never a single combined hub page (unlikeui-admin-application’s07-ui-adminhub pattern), since a shopper browses screens independently rather than through a fixed wizard sequence. - This app never injects
X-Tenant-IDitself — tenant scope rides inside the Firebase JWT, decoded server-side by Nginx — consistent with every other client in this monorepo; see [[06-security]].
Related Documents
- shop-service
- user-preference-service
- user-secure-engine
- search-service
- Architecture — Recently Viewed Products: Component Topology and Data Flow
- Technical Debt — Customer Settings Gaps
Full module reference: ui-application/CLAUDE.md.