Skip to content

Alexecono/Groche

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Groche

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

Project Overview

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

Repository Structure

  • app.py - Flask server providing recipe storage and matching API
  • index.html - frontend UI for adding recipes, viewing recipes, and match results
  • barcodes/barcode.py - barcode scanning utility that processes images and outputs cart data
  • data/recipes.json - stored recipe database used by the backend
  • data/ingredients.json - output target for barcode scan results
  • images/ - sample barcode image inputs for barcode.py

Main Features

Backend

  • GET /recipes - returns saved recipes
  • POST /recipes/add - add a new recipe with ingredients
  • POST /recipes/delete - delete a recipe by name
  • GET /match - match the current cart against recipes

Frontend

  • add recipe name + ingredients
  • view saved recipes
  • delete recipes
  • display matched recipes, missing ingredients, and extras
  • periodic refresh every 2 seconds

Barcode scanner

  • processes still images from barcodes/images
  • supports .jpg, .jpeg, and .png
  • detects barcodes using zxingcpp and OpenCV
  • resolves product names using Open Food Facts
  • writes data/ingredients.json

Requirements

Backend

  • Python 3
  • Flask
  • Flask-CORS

Barcode scanner

  • Python 3
  • OpenCV (cv2)
  • NumPy
  • requests
  • zxingcpp

Usage

Run the backend

From project root:

python app.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors