Groche is a lightweight grocery/recipe matching project built with:
- a Flask backend API
- a static HTML frontend
- a barcode scanning utility for generating ingredient data
Groche helps you:
- store recipes with ingredient lists
- match a grocery cart against saved recipes
- identify missing and extra items
- scan images of barcodes and build a virtual cart
app.py- Flask server providing recipe storage and matching APIindex.html- frontend UI for adding recipes, viewing recipes, and match resultsbarcodes/barcode.py- barcode scanning utility that processes images and outputs cart datadata/recipes.json- stored recipe database used by the backenddata/ingredients.json- output target for barcode scan resultsimages/- sample barcode image inputs forbarcode.py
GET /recipes- returns saved recipesPOST /recipes/add- add a new recipe with ingredientsPOST /recipes/delete- delete a recipe by nameGET /match- match the current cart against recipes
- add recipe name + ingredients
- view saved recipes
- delete recipes
- display matched recipes, missing ingredients, and extras
- periodic refresh every 2 seconds
- processes still images from
barcodes/images - supports
.jpg,.jpeg, and.png - detects barcodes using
zxingcppand OpenCV - resolves product names using Open Food Facts
- writes
data/ingredients.json
- Python 3
- Flask
- Flask-CORS
- Python 3
- OpenCV (
cv2) - NumPy
- requests
- zxingcpp
From project root:
python app.py