Self-hosted tool for tracking grocery expenses from receipts
Hi everyone, I’m looking for an open-source or self-hosted tool to track grocery expenses from receipts. Ideally, I’d like to scan or upload receipts and have the software: - Extract the purchased items automatically. -Categorize the products. -Calculate food…
Hi everyone, I’m looking for an open-source or self-hosted tool to track grocery expenses from receipts. Ideally, I’d like to scan or upload receipts and have the software: - Extract the purchased items automatically. -Categorize the products. -Calculate food spending and budget over time. -Track the price of the same products across purchases. -Show when a product’s price has increased or decreased compared to previous receipts. The main goal is to monitor grocery spending and keep an eye on food price changes over time. Does anyone know of a project that does this ? Thanks!
已收录讨论
Expand the replies to this comment to learn how AI was used in this post/project.
Thanks
How does this differ from paperless-ngx?
I'm imagining a more complex setup where you pull out your groceries in front of a camera and that matches all your items to what's on the receipt. If it works it's great for inventory too.
Any chance of you making the code open so others could pick it up? Or is it easier nowadays to just task Clause to make a new implementation from scratch each time?
I have debated on open sourcing it, but its kind of a beast at this point and highly customized for my household, but its still on my roadmap to make it a bit more open for others to use ... but yeah otherwise with Claude, Codex, etc its pretty easy for someone to whip something up these days.
Grocy handles the inventory and shopping list side really well, but for OCR receipt parsing you'd pair it with a script feeding Paperless-ngx or a dedicated parser like receiptparser. The combo isn't turnkey — you still need some glue — but it gives you full control over the data.
I went down this path once, ironically the biggest challenge I found was not the OCR or the analysis, but the categorization. Grocery stores print out very short abbreviations on the receipt that are very often nonsensical and require tagging by hand. For example, a "Chobani strawberry Greek yogurt" might show up as "CHB STW GRK" or something like that, so you either need a library to compare against or be willing to build one up over time.
Maybe Receipt Wrangler?
I would split this into capture vs price history. Paperless-ngx or OCRmyPDF can archive/search the receipt, but the grocery tracking part needs its own line-item table: merchant, purchased_at, item_name_raw, normalized_item, unit_size, qty, price, unit_price. Without normalized names and unit_price, OCR will tell you the receipt total but not that pasta went from $1.49 to $1.89 for the same size. Grocy is solid for pantry/shopping state and Firefly is solid for budget totals, but neither is the whole price tracker by itself.
I do this. I’ve been doing it for a few years. The OCR was a no go for me, you can usually grab your receipts in JSON form from the grocery store website. Kroger and Walmart do this, I usually manually enter into the SQL DB for any store that I can’t automatically import. I just built a simple Java tool that imports the data from the file and use grafana to visualize what you’re looking for using SQL queries on the data
Your wish list is doable, but only if the receipts actually expose stable "item + unit" data. First diagnostic step: take 3-5 real receipts and check whether you can reliably extract line items with a unit size (or a unit price basis like per lb/kg). If not, the "price history for the same product" part turns into manual normalization. A practical approach is to separate: (1) capture/OCR + store the raw text, and (2) a curated mapping layer that turns OCR junk into your canonical product (size/unit normalized). Once that mapping exists, trend charts are the easy part.
Not that it helps you. But I was struggling with this and had Claude build this out for me as part of our household bill tracker. Scans the receipts and ingests them, reads the items, categorizes them and adds them all to the monthly spend. Also I thought it would be interesting to track increasing food item costs since I do most shopping at two grocery stores so the item names can be tracked and historical prices as well. For iOS I use the QuickScan app to scan the receipts that I upload into my software.
Lol. Why does everyone think of this project. I made one for my household as well. Just gotta make supabase tables and associate one product with different store codes. Only problem is some stores have different sizes of the same thing or slightly different. It's annoying
I think your best bet is to use 2 different services, Scanning the receipt with OCR to extract the purchased items and their price Either a budgetting or cooking service to store the item/price pairs and discover trends over time My suggestion would be to use Paperless-NGX for OCR, it's great for that purpose and you can add metadata to easily track products over time ActualBudget for budgetting, it's the most popular budgetting service out there. You can make a category group for Groceries and categories for the individual products you want to track. After inputting the purchase transaction, you can build custom reports to see your spending on each of the products over time. Note that tracking prices across purchases is not possible like this, your best bet would be to attach a note like e.g. "<product> @ <price> / kg". (possibly) A custom script to convert the OCR contents into a CSV file where each row contains the store you bought the products from (payee), a product (category), the total amount per product spent (amount), the unit price (note) and your bank account (payer). This makes it easy for ActualBudget to import your transactions, otherwise you have to make a lot of transactions by hand which might be cumbersome Good luck!