Yeah, I did think of the barcode approach, but I didn't think anyone would be willing to scan every item, which is why I ignored it
However, revisiting this question made me realize that we could probably have the user scan receipts. It would take some doing but you could probably extract all the information from the receipt because it's in a fairly predictable format, and it's far less onerous.
OTOH, you still have to scan barcodes every time you cook with something, and you'd probably want some sort of mechanism to track partial consumption and leftovers, though a minimum viable product could work without that
The tough part, then, is scouring the internet for deals. Should be doable though.
Might try to slap something together tonight or tomorrow for that first bit, seems pretty easy, I bet you've got open source libraries for handling barcodes, and scanning receipts can probably just be done with existing OCR tech, error correction using minimum edit distance, and a few if statements to figure out which is the quantity and which is the item. That is, if my adhd doesn't cause me to forget