Back to Case Studies
Food & beverage / small business tooling

On-Device OCR Receipt Scanning for a Food Business Costing App

Published July 21, 2026

React NativeExpoGoogle ML Kit (on-device OCR)Supabase

The problem

Small food businesses often track ingredient costs and pricing by hand from paper receipts, which is slow and makes it hard to keep an accurate, up-to-date cost basis for recipes. The client wanted receipt data captured automatically, without depending on a paid cloud OCR API or requiring an internet connection at the point of scanning.

What we built

We built a receipt scanner using on-device OCR (Google ML Kit), so text extraction happens entirely on the phone with no API keys and no internet connection required. Extracted text feeds into a parser that identifies item names, quantities, and prices, which the user can review and correct before saving to an ingredient database that prevents duplicate entries.

From there, the app calculates production costs per recipe — direct materials, packaging and labor overhead, and a target profit margin — to suggest a selling price per unit, with everything falling back to local on-device storage when the optional cloud sync isn't configured.

The messy reality of parsing real receipts

Real, low-quality receipt photos break naive parsing quickly. OCR frequently misreads characters — the letter "O" for the digit "0", a lowercase "l" for "1" — and different stores format prices inconsistently, mixing currency symbols, spacing around decimal points, and using either a comma or a period as the decimal separator.

We built a dedicated cleanup step that normalizes these OCR quirks before parsing: correcting the common character substitutions, detecting whether a comma is a decimal separator or a thousands separator based on its position in the string, and filtering out an extensive list of non-item lines (totals, tax, change, cashier info, payment method) so they don't get mistaken for purchased items.

Because paper receipts vary so much between vendors, we treated this as an iterative problem: testing against real captured receipt text, expanding the skip-keyword list and price-matching patterns as new edge cases showed up, rather than assuming one parsing pass would handle every receipt format on the first try.

Results

Ingredient costs that previously required manual entry from a paper receipt can now be scanned and reviewed in seconds, entirely offline, with the app falling back gracefully to manual input for photos too degraded for OCR to parse reliably.

Have a similar project in mind?

Tell us what you need and we'll help you figure out the right approach.

Get in touch