Architecture-00026 — My Orders, Order Details & Track Shipment Component Topology and Data Flow

By Engineering Team•October 11, 2026•5 min read

Metadata

Field Value
System Name ui-application — My Orders, Order Details & Track Shipment
Document ID ARCH-2026-ORD-001
Author Engineering Team
Status Implemented (gaps noted inline)

Realizes SR-031 under ADR-00047.

Components

Component Role
ui-application — my_orders feature (GetX) List screen: binding/controller/view triad, status-tab filter, infinite-scroll pagination, per-row tagged controllers for row-level actions.
ui-application — order_details feature (GetX) Detail screen: fetches one order’s full composition (items, address, payment method, status) on open.
ui-application — order_tracking feature (GetX) Track Shipment screen: combines the one-shot order-detail fetch with a live SSE subscription for shipment scan events.
shop-service — GraphQL MyOrders/OrderDetail resolvers Entry point for both list and detail; the only backend surface the Flutter app talks to for order data.
shop-service — order service (orchestration layer) Calls order-service (gRPC) for the order record, pii-service (gRPC) for address content, and payment-service (gRPC) for payment-method display enrichment; assembles one response per request.
order-service — OrderQueryService (gRPC) GetOrder/ListOrders — owns the order record itself; enforces per-shopper ownership, returning the same not-found result whether an order doesn’t exist or belongs to someone else.
pii-service — address-snapshot lookup (gRPC) Resolves the shipping/billing address snapshot identifiers stored on the order back to their content. Called directly by shop-service, not via order-service’s own equivalent RPC.
payment-service — allowed-payment-methods lookup (gRPC) Supplies the current display name/description for a payment method code; shop-service falls back to the order’s persisted values if this lookup fails or the code no longer matches.
shipment-service — SSE tracking stream GET /shipment/api/v1/order/:id/stream — serves courier scan-event history for one order, catch-up-then-subscribe, independent of order-service’s checkout-time saga stream.

Diagram

My Orders, Order Details & Track Shipment — three flows from ui-application: the paged order list and the order detail composition both through shop-service's GraphQL orchestration across order-service, pii-service and payment-service, and live shipment tracking over a direct SSE channel to shipment-service that bypasses shop-service

End-to-end flow

My Orders list

  1. The list screen issues a MyOrders GraphQL query with an optional status filter (a CancelledOrRefunded tab maps to a combined filter for both statuses in one request), under FetchPolicy.networkOnly (SR-031 FR-01, FR-02).
  2. shop-service’s order service calls order-service’s ListOrders, which is unconditionally scoped to the authenticated shopper’s own identity regardless of any filter parameter supplied (SR-031 FR-10).
  3. Scrolling to the end of the loaded page triggers the next page’s query with the same filter, appended rather than replacing the current list (SR-031 FR-03).
  4. Any row with its own row-level controller registers it via Get.lazyPut(..., tag: orderId), so multiple rows never collide into one shared controller instance (SR-031 FR-04).

Order Details

  1. Opening an order calls the OrderDetail GraphQL field for that order’s identifier, also networkOnly (SR-031 FR-05).
  2. shop-service’s order service calls order-service’s GetOrder for the order record and current status. If the order doesn’t exist, or exists but belongs to a different shopper in the same tenant, GetOrder returns the identical not-found result either way — the caller cannot distinguish the two cases (SR-031 FR-09).
  3. In parallel, shop-service’s order service calls pii-service’s address-snapshot lookup directly to resolve the shipping/billing address content — not via order-service’s own GetAddressSnapshots RPC, which stays unused for this purpose (SR-031 FR-07; see “What this does not yet guarantee” below).
  4. shop-service’s order service calls payment-service’s allowed-payment-methods lookup to overlay a display name/description onto the order’s persisted payment method code; on lookup failure or an unmatched code, it falls back to the order’s own persisted values rather than failing the request (SR-031 FR-08, NFR-02).
  5. shop-service assembles the order record, resolved address content, enriched payment method, and status into one OrderDetail response (SR-031 FR-06).

Track Shipment

  1. The Track Shipment screen performs the same one-shot OrderDetail fetch as step 5–9, for the item/address/status context shown alongside the live tracking view (SR-031 FR-11).
  2. Independently, the screen opens an SSE connection directly to shipment-service’s per-order stream endpoint — a separate channel from order-service’s checkout-time saga-progress stream (SR-031 FR-12).
  3. Before opening the stream, shipment-service confirms the order exists for the requesting shopper’s tenant; a request for an order outside that tenant is refused rather than returning an empty stream (SR-031 FR-15).
  4. On connect, the stream immediately replays every courier scan event already recorded for the order, then continues pushing new events live as they’re recorded — catch-up, then subscribe, with no gap between the two (SR-031 FR-13).
  5. A periodic heartbeat frame keeps the connection alive through any intermediary that might otherwise treat a quiet connection as dead (SR-031 FR-14).

What this does not yet guarantee

  • Track Shipment’s SSE client has no automatic reconnect on a dropped connection — a network interruption requires the shopper to manually leave and re-open the screen to resume live updates. See TD-2026-ORD-001.
  • shipment-service’s SSE broker holds in-flight subscriptions in-process, single-instance, with no cross-replica replay — if the service scales beyond one instance, a shopper’s stream can silently miss events delivered to a different instance. See TD-2026-ORD-001.
  • order-service’s own GetAddressSnapshots RPC exists but is never called by shop-service for this flow, which calls pii-service directly instead — the RPC is effectively dead code for this use case. See TD-2026-ORD-001.
  • Cancel Order and Download Invoice are present as UI stubs on these screens but have no backend implementation behind them yet. See TD-2026-ORD-001.