Inspiration
As college students, we often want to cook, but are bogged down by long recipes that include a bunch of ingredients we don't already have. We know that by cooking, we save money (something all college students want to be better at doing), we tend to eat healthier and we gain a new skill set. We wanted a service that could take what you have and find recipes that utilize those ingredients and also prioritize ingredients you have that are expiring. By doing this, we'd also minimize our food waste.
What it does
First, you can put in any ingredients you already have and want to use in future recipes. Second, you can put in expiration dates for each ingredients, so ingredients expiring sooner can be prioritized. Then, our website generates a list of recipes for you! We took prices from each ingredient sold at Target and added up those prices to identify how expensive a recipe would be if you purchased each item.
But you're probably not buying each item for a recipe; you probably already have some of the ingredients! That's why if you already have an ingredient in a recipe, we don't add that ingredient's price to cost of the recipe. This means that recipes with ingredients that you already own are prioritized. The webpage outputs the ten most affordable recipes for you, so right now you are sorting by price.
Looking at each recipe, you can see its name, the cost of additional ingredients you'd have to buy to make this recipe, the ingredients list, and the directions to make the recipe. Our recipes are all sourced from AllRecipes.com.
In addition, you can click the "sort by expiring items" button to prioritize recipes by ingredients that are expiring first. In an example pantry, you could have tomatoes and potatoes, with the tomatoes expiring first, so our program first shows recipes with tomatoes, and then recipes with potatoes, all sorted by most affordable recipe first.
How we built it
We found 30 recipes from AllRecipes.com and found the prices of each ingredient in the recipes at Target. We saved the recipe data in a JS dictionary found in our server.js file. Each ingredient also had its own JS dictionary to contain data about the ingredient (price and name).
We built the website using the ExpressJS packages. Specifically, we use the PUG package and EXPRESS Package. Each of our webpages are built using PUG, styled in CSS, and then any logic is done in either the server.js file, or the linked JS files.
The website is run locally on our computer for now, but we hope to eventually migrate it to be web-hosted.
Challenges we ran into
We had issues gathering data because we wanted recipes that contained the same ingredient to be recognized as the same ingredient. For example, if one called for "russet potatoes" but another called for "potatoes", our service should identify them as the same ingredient. We solved this by going through and removing descriptors, quantities, plurals, and capitalization from each recipe's ingredients list.
We ran into some challenges with making sure that if the user already had an ingredient, that ingredient's cost would not be added to the total recipe's cost. This ended up being a variety of small bugs with our variable names that we were able to fix.
Accomplishments that we're proud of
Everything we set out to do at the beginning of the project, we completed! We wanted to allow you to sort by price (taking into account the ingredients they had), and also sort by expiration dates that they put in.
What we learned
We learned a lot about connecting a website to a very large data set and how to structure datasets to be easily traversed by a website. We also learned how to preprocess data in a way that can be used.
This was our first-ever Hackathon; we learned a lot about perseverance and just how much you can get done in a short amount of time with the right focus.
What's next for Pocket Pantry
This is just a prototype now, but we'd love to introduce webhosting and sessions so that users make an account and can keep a constant list of what is in their pantry. In addition, we would like to transfer our current dataset of recipes and ingredients into a SQL database. Originally, we wanted to do this, but we lost access to our database that we wanted to use.
We would like to automate the scrubbing of recipes from the internet. This would mean we could include more recipes with more ingredients.
Log in or sign up for Devpost to join the conversation.