Delivered remotely for a business based in Cork, Ireland. Names withheld by agreement.
Project Overview
Supermarket pricing looks straightforward only until a shopper tries to compare an entire weekly trolley across competing chains. One retailer sells pasta in 500-gram bags while another stocks 450-gram packs; promotional discounts apply only with a loyalty card or in multiples of two; and split-shop savings vanish quickly once delivery fees are included.
We built native Android and iOS grocery comparison and ordering applications in Kotlin and Swift, connecting shoppers to a canonical retail catalog and basket-optimization backend. Users compile recurring shopping lists, scan kitchen barcodes for instant replacement lookups, inspect side-by-side single-store and split-basket totals adjusted for delivery thresholds, and hand off filled carts directly into retailer ordering flows.
Business Bottleneck
Consumer price-comparison prototypes routinely fail on three practical fronts:
- Apples-to-oranges catalog mismatch: Raw supermarket feeds describe identical staples with inconsistent abbreviations, pack weights, and multi-pack groupings, causing naive string matching to miss valid comparisons or pair unrelated goods.
- Misleading single-item rankings: Highlighting the cheapest brand of coffee means little if every other staple in a user's trolley costs more at that chain or fails to clear minimum delivery spend.
- Sluggish indoor retail UX: Thick metal-roofed supermarkets degrade mobile reception right when shoppers pull out their phones in the aisles, freezing webview-based lists mid-shop.
Architectural Strategy
We invested in dedicated native clients—Kotlin with Jetpack Compose and Retrofit on Android, and Swift with SwiftUI and URLSession on iOS—so barcode scanning, haptic list sorting, and offline persistence behave cleanly inside real store environments. Both apps treat local relational storage (Room and Core Data) as primary for shopping lists while fetching live pricing deltas asynchronously.
On the backend, product ingestion pipelines normalize retailer feeds into canonical product groups indexed in PostgreSQL. Instead of pushing heavy comparison math onto handsets across thousands of SKUs, the server evaluates multi-store basket permutations, loyalty eligibility, and delivery fee tiers in one structured response consumed identically by Retrofit and URLSession models.
Core Capabilities
- Barcode Pantry Scanning: Shoppers point the phone camera at empty boxes or jars to locate exact matches and equivalent store-brand alternatives across supermarkets immediately.
- Unit-Normalized Basket Matrix: Side-by-side store breakdowns show item availability, pack-size differences, per-kilogram or per-litre rates, and missing-item substitution suggestions.
- Promotion & Loyalty Modeling: Users toggle their active supermarket loyalty memberships and see multi-buy bundle thresholds calculated dynamically as quantities change.
- Single-Store vs. Split-Cart Toggle: The comparison view contrasts the convenience of ordering from one supermarket against splitting high-value staples across two chains once delivery fees apply.
- Retailer Ordering Handoff: Confirmed baskets export cleanly through retailer cart deep links or integrated checkout flows while preserving in-app list history for next week's shop.
Technical Architecture
Android structures presentation through Jetpack Compose screens observing Kotlin StateFlow view models backed by a Room repository and Retrofit service interfaces. OkHttp interceptors inject app-version headers, manage ETag conditional caching, and coalesce duplicate in-flight searches while typing. iOS mirrors this clean separation in Swift using SwiftUI views, async/await repositories, Core Data list persistence, and URLSession HTTP caching.
Flow: CameraX/AVFoundation barcode scan or Compose/SwiftUI search -> Local Room/Core Data list update -> Conditional Retrofit/URLSession basket quote request -> PostgreSQL canonical SKU & promo evaluation -> Native UI renders store-ranked matrix -> Deep-link or checkout handoff to selected retailer.
Both native clients maintain local lookup caches for recently viewed staples and store metadata, keeping aisle checklists instantaneous even when cellular bars disappear inside store refrigeration aisles.
Technology Stack
| Category | Technology detail |
|---|---|
| Android language & UI | Kotlin with Jetpack Compose, Coroutines, and StateFlow |
| Android networking | Retrofit paired with OkHttp interceptors, ETag caching, and Kotlinx Serialization |
| Android local storage | Room SQLite database for offline shopping lists and recent barcode lookups |
| iOS language & UI | Swift with SwiftUI, async/await structured concurrency, and Combine |
| iOS networking | URLSession client with Codable models and HTTP cache-control handling |
| iOS local storage | Core Data / SQLite store mirroring persistent baskets and price alerts |
| Barcode capture | Native CameraX ML barcode scanning (Android) and AVFoundation (iOS) |
| Catalog & pricing store | PostgreSQL full-text search with canonical SKU and unit-price normalization |
| Telemetry | Native crash reporting and per-endpoint network latency instrumentation |
Engineering Trade-offs & Solutions
| Architectural Dilemma | Chosen Solution & Rationale |
|---|---|
| Cross-platform UI wrapper vs. native Kotlin & Swift | Chose native Compose and SwiftUI to exploit hardware-accelerated CameraX/AVFoundation barcode pipelines and crisp offline list interactions where shoppers expect instant feedback. |
| On-device full catalog sync vs. basket-scoped delta quotes | Kept raw retailer feeds on the server and queried normalized comparison quotes per active basket, avoiding multi-megabyte mobile database downloads while staying accurate as daily promos turn over. |
| Strict exact-EAN matching vs. canonical product grouping | Layered canonical product families over EAN barcode links so own-label equivalents and slight pack-weight variations compare transparently alongside exact brand matches. |
| Raw Retrofit/URLSession calls vs. ETag-aware repository caching | Configured HTTP conditional caching in OkHttp and URLSession so unchanged aisle categories resolve locally without burning mobile bandwidth. |
Security & Reliability
Retailer pricing feeds arrive on staggered schedules and occasionally contain malformed promotional tags or discontinued EANs. Ingestion validators quarantine anomalous price swings—such as missing decimal points—for analyst review before publishing updates to mobile clients, protecting shoppers from phantom bargains.
User accounts store saved lists, postcode delivery zones, and loyalty preferences using scoped bearer tokens held in encrypted device keystores. When transferring baskets to external retail ordering portals, outbound deep links carry only SKU identifiers and quantities without leaking personal mobile analytics or cross-store list history to third-party merchants.
Performance & Scale
Typing into grocery search bars generates bursty query patterns. Both Kotlin Coroutines (debounce + flatMapLatest) and Swift async task cancellation abort superseded keystroke queries cleanly before Retrofit or URLSession hits the backend, preserving server CPU and mobile battery.
On the database tier, PostgreSQL GIN full-text indexes combined with pre-computed unit-price columns allow multi-store basket comparisons to resolve smoothly without expensive runtime parsing. Image thumbnails load progressively with disk-backed caches, ensuring brisk scroll performance across long weekly shopping histories.
Operational Outcomes
Delivering dedicated Kotlin and Swift applications backed by a unified normalization engine turned fragmented supermarket price checks into a coherent weekly planning tool. Shoppers gain honest, unit-adjusted visibility into how multi-buy deals and delivery fees affect their total bill, while the offline-capable Room and Core Data list architecture keeps the app dependable both at the kitchen table and inside low-signal supermarket aisles.