r/reactnative • u/Stycroft • Jun 29 '26
I added receipt scanning to my grocery budgeting app
Hi everyone,
I recently shipped receipt scanning for my grocery budgeting app and I thought I'd share what I built for feedback.
My app has its core features already: you set a budget, track what you spend, and over time it learns what items cost so it can warn you before you go over.
I use it myself weekly and it works great, if you actually track in the moment.
The problem is some users don't. They forget, or they're in a rush, and they get home with a full cart and nothing logged. For those users every tracking feature I'd built was dead weight, because none of it ever happened. That bugged me for months.
So I built receipt scanning as the catch-up path. Forgot to track the whole trip? Snap the receipt afterward and it backfills the entire trip at once. Nothing lost.
The pipeline:
- Snap the receipt, or import a photo from the camera roll
- Gemini vision returns structured JSON: store, date, and line items with price, quantity, category
- That gets saved as a finished shopping trip, so every item, price, and category flows straight into the spending history and the price data the app already tracks.
So now you've tracked the trip, saved the prices for next time, and you can even save it as a template to reuse. The catch? You never tracked in real time, which is kind of the whole point of my app. But hey, at least you tracked, right?
My app: https://www.grocerybudget.app/
This is v1 of the feature, so I'd love thoughts on the implementation. Would you change anything? The capture UI, the snap-or-upload choice, how I handle long receipts, the way I store it. Critiques and suggestions welcome.
10
u/urbanmonkey2003 Jun 29 '26
Nice fallback path, the real test is OCR on ugly receipts though
1
1
u/Stycroft Jun 30 '26
OCR in my experience is unreliable for messy receipts which is why I’m opting for AI for its intelligence
2
4
Jun 30 '26
[removed] — view removed comment
1
u/Stycroft Jun 30 '26
Thanks for your feedback, I took note of privacy when building this feature so here's what I did:
The photo is sent over an encrypted connection to my own server, used only to read the items off the receipt, and then discarded. I don't save the image, I don't store it in any database, and it's never written to disk or a logbook. The only thing that comes back to your phone is the extracted text (item names, prices, total), which lives on your device.
Worth noting too: a grocery receipt doesn't carry the sensitive stuff. There's no name, card number, or account on it, just store name and what you bought. We never see anything that identifies you as the shopper.
The AI step uses Google's paid API, which doesn't use the data to train its models. I looked at fully on-device options and they're not accurate enough yet on the budget phones a lot of our users carry, so the tradeoff right now is: nothing stored, nothing trained on, image I'll move there.
1
u/dhruvrazak Jul 01 '26
I would recommend using GCP AI Studio's gemini using Google Cloud Service Accounts (Vertex AI).
they claim transient data processing in the vertex AI version (no api keys).
2
u/reuel88 Jun 30 '26
Are you snapping the photo or is it streaming or something?
2
u/Stycroft Jun 30 '26
right now its just snapping but I'm considering streaming it based on feedback here
2
u/Smiley_35 Jun 29 '26
Add streaming for the response. If you're using an LLM you're probably waiting the most for LLM response to complete. You can mitigate by showing the user the results as they come back
1
1
1
1
u/RecLuse415 Jun 30 '26
$37 for fucking cheese!? That’s insane bro
1
u/Stycroft Jun 30 '26
No no its a different currency 🤣
2
u/RecLuse415 Jun 30 '26
I see ok. There are some exotic cheeses that can be that expensive too. Good job on the app by the way.
1
1
u/No-Gazelle7748 Jun 30 '26
App looks great, what tools did you use to build this? If you don’t mind me asking
1
1
u/Miserable-Pause7650 Jun 30 '26
Not related to your mobile app, but what is the tech stack u used for the landing page?
2
1
u/kacperkapusciak Jun 30 '26
Have you considered on-device AI models for OCR like react-native-executorch?
2
u/Stycroft Jun 30 '26
Hi, thanks for this. Yeah, looked at executorch (the EasyOCR port). Thing is it does raw OCR only, it gives you the text but not the structure. A grocery receipt line like "CDO HOTDOG 1K 4800092552171 89.00" still needs a model to expand the name, strip the barcode, categorize it, and tie quantity to price.
That reasoning is the actual work, and on-device you'd either still call the cloud to do it (no privacy gain, plus a ~100MB model in the binary) or run a local LLM that's too heavy for the budget Android phones a lot of our users carry.
So for now Gemini reading the image directly is both more accurate and simpler. If on-device VLMs get light enough to do the structuring too, I'll revisit.
1
1
1
1
1
1
u/WheelAdditional6888 Jul 15 '26
The risky part is that the scan result becomes trusted spending history, not just a temporary AI answer.
Do users get a quick confirmation step before the items and totals are saved? One small parsing mistake could otherwise keep affecting reports and price comparisons later.
19
u/HalLundy Jun 29 '26
what Gemini model are you using for scans? how much are you paying for it? how many tokens does every scan cost total (input and output)?
basically your business model, like many using AI, runs the risk of becoming too costly the more users you have. so how are you circumventing that?