Supermarket Prices
— Grocery Price Comparison (Mobile)
A mobile app that scans a grocery barcode and searches supermarkets in real time to find the cheapest store — and the cheapest whole basket.
Overview
Supermarket Prices is a mobile app for people who don’t want to overpay at the grocery store. You take a product off the shelf, scan its barcode, and the app tells you what it costs across nearby supermarkets — so you can pick the cheapest store, or find out you’re about to overpay before you buy.
The core is a real-time search. Instead of a static catalog, a scan opens a live connection to the backend, which searches across many stores at once and streams prices back to the phone as they come in, with a progress bar counting results. On top of single-product lookups, the app builds a personal shopping cart and prices the whole basket per store, so the comparison works both ways: cheapest store for one product, and cheapest store for everything you buy.
My Role
I built the app end to end as a solo React Native project — architecture, the real-time search client, and the full store-ready feature set.
- Designed the app’s state architecture on Redux with redux-saga (via reduxsauce) and redux-persist, keeping the async search flow and cached data predictable.
- Built the barcode-scanning flow (camera + manual entry) with client-side EAN validation, so invalid barcodes are caught on the device before a search is spent.
- Implemented the real-time price search over Socket.IO — subscribing to streamed
ean_foundevents through a saga event channel, driving a live progress bar, and handling handshake and timeout edge cases. - Wrote the cart pricing logic that totals a basket per store with several strategies for handling products a store doesn’t stock.
- Shipped the commercial layer: a monthly free-scan limit, in-app subscriptions with on-device receipt validation for both iOS and Android, and referrals via Firebase Dynamic Links.
- Localized the app in English, Russian, and Ukrainian, and wired up geolocation for nearest-store results, CSV cart export by email, Sentry, and analytics.
Key Challenges
Streaming results from a live search. A scan doesn’t hit a REST endpoint and wait — it opens a WebSocket and receives prices from different stores as the backend finds them. I modeled that as a redux-saga event channel so the UI could update incrementally, show a real “X of Y prices loaded” progress state, and still handle a connection that drops mid-search or never finishes.
Not wasting scans. Scans are metered (free users get a monthly quota), so a barcode that can’t possibly resolve shouldn’t cost anything. I validated EAN barcodes on-device first — checking length and the control digit — to reject store-assigned or mistyped codes before they ever reached the server.
Pricing an incomplete basket. Real stores don’t stock the same products, so a naive cart total is misleading. The cart supports multiple total types — averaging over missing items, counting only in-stock items, and full-basket totals — so users can compare stores fairly instead of being punished for one store missing one product.
Subscriptions on two platforms. The freemium model relies on correctly knowing whether a subscription is active. I implemented receipt validation for both iOS (validating the latest receipt against the App Store) and Android (checking active purchases), so the scan limit unlocked reliably without trusting the client blindly.
Outcome
A complete, store-ready grocery price-comparison app: real-time multi-store search, a cheapest-basket shopping cart, geolocation, subscriptions and referrals, and three-language support — built and maintained as a solo project.