/leftover-master

Food-waste reducing perishables tracking app integrated with Google Login.

Primary LanguageHTMLCreative Commons Zero v1.0 UniversalCC0-1.0

LeftoverMaster

LeftoverMaster was inspired by the untouched ingredients sitting at the back of fridges and students throwing out their meal prep after making too much of a particular meal. LeftoverMaster was designed with the goal to help reduce food waste by providing people with a simple way to keep track of their food items. It is an intuitive meal prep, groceries, and leftovers tracking companion. Users can sign in and keep track of different food items with approximate expiry dates provided depending on the storage location. A calendar view is available for quick viewing of upcoming expiry dates. This project also taught me how to implement database initialization, database operations within Python, and Google Login with oauthlib.

Stack and Implementation

LeftoverMaster was built using the Flask framework with a Python backend, SQLite database for users and tracked foods, and an HTML/CSS/JS frontend. Bootstrap was used for components of the UI and the calendar was a component of Semantic UI. The food groups were chosen based on research of common food types with storage concerns. The estimated best before date for foods stored in the freezer was calculated as: fridge estimated best before date * 7. The multiplier of 7 was an average taken from research and ChatGPT regarding how much longer foods can last in a freezer vs in a fridge.

Usage

LeftoverMaster is hosted at dayqiu19.pythonanywhere.com and users may register for an account or log in with Google. After logging in, the homepage displays all food items tracked by the user (if any), the type of food, their remaining portions, the storage location, and the approximate best before date. A food item can be tracked using the "Track new leftovers and groceries" card by giving a name, food group, storage method, the portions available, and clicking "TRACK". To simulate the consumption of an item, "CONSUME 1" or "CONSUME ALL" can be clicked on an item card and once all portions are consumed the item will be removed from the account. Food items past their best before date will not be automatically removed from the user account. Each time a food item is tracked, an event is automatically created and placed on the calendar, representing the consumable period in green and the best before date in red.

What's Next

I plan to implement notifications about best before dates through Google Calendar notifications, and intelligent recommendations for scheduling food prep and maintaining a balanced diet using ChatGPT.