Inspiration

LeftoverMaster was inspired by the untouched ingredients sitting at the back of my own fridge and stories of university students throwing out their meal prep after making too much of a particular meal. LeftoverMaster was designed to help people keep track of all the food items they possess, where they are, and when they spoil so that they can plan ahead for grocery shopping and meal prep to reduce food waste.

What it does

LeftoverMaster allows users to register for a personal account. After logging in, the homepage displays all food items tracked by the user, the type of food, their remaining portions, the storage location, and the estimated best before date. The estimated best before date is calculated based on the type of food and the storage method. To simulate the consumption of an item, CONSUME 1 or CONSUME ALL can be clicked and once all portions are consumed the item will be removed from the account. Each time a food item is tracked, an event is created and placed on the calendar view, representing the consumable period in green and the best before date in red.

How I built it

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 taken from 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 x 7. The multiplier of 7 was an average taken from research and ChatGPT for on average how much longer foods can last in a freezer vs in a fridge.

Challenges I ran into

I had to make sure that when a food reached 0 portions, the item didn't linger in the database and was actually removed. I had to also make the decision about whether or not food items would disappear after they expire. I chose to let food items remain on the account after expiring because the user should know if something is expired and still present in their fridge/freezer.

Accomplishments that I am proud of and what I learned

While the app did not have a complex backend implementation, I was proud to be able to add animations to the website background using CSS to make everything dynamic and beautiful. Google and ChatGPT were both very helpful tools and I am becoming more proficient at prompting ChatGPT and using its answers intelligently. I also learned how to implement the Semantic UI calendar with events added automatically for newly tracked food items.

What's next for LeftoverMaster

In the future, we plan to implement notifications for upcoming best before dates through the Google Calendar API, and potentially intelligent recommendations for food prep scheduling and food substitutions for a balanced diet using the ChatGPT API.

Built With

Share this project:

Updates