Inspiration
Our project was inspired by our love for baking. Too often we have found a very particular mismatch of ingredients and had to search long and hard for a recipe that we could make with them. With The Perfect Pantry, that issue is solved and more time can be spent baking and enjoying instead of just recipe hunting.
What it does
The project takes in quantities of ingredients that the user has (defaults are all set to zero if they don't have anything). It then sorts its list of recipes by which one most closely matches the search criteria to the one that least matches.
How we built it
For the sorting algorithm, we used vector cosine similarity to determine which recipe vectors were similar to the input vector. Then we sorted our array of recipes by that feature. Using React states we were able to continuously store the current value of the input as the user made changes and then pass it to the sorting function once the user hit submit.
Challenges we ran into
We had a lot of issues using React states. First, we tried to use it to store the changes the user made as they made them, but that proved to be unnecessarily complicated. Then, while implementing states for the passing of vector data, they kept on crashing. This issue turned out to be related to our router object which was creating separate pages. As a result of the time limit, we ended up creating only one page instead.
Accomplishments that we're proud of
This is both of our first ever hackathon, so we're very proud to have a functional product to demo today!
What we learned
Almost everything included in our project today we learned over the course of this weekend. We have a solid programming foundation, but neither of us has very much experience in web dev, if any. Which means that we used a lot of resources learning how to build this project.
What's next for The Perfect Pantry
We would love to move our data (which is currently stored in the project) to an outside database such as MongoDB. In addition, it would be really cool to add a user component in which users can add recipes of their own as well, expanding the database even further.
Log in or sign up for Devpost to join the conversation.