Inspiration
Who doesn't have a jar of expired pickles sitting in the back of their fridge? As new roommates navigating school and life together, we realized that just finding things to keep ourselves fed 3 times a day is a challenge by itself, let alone keeping track of when all our food is going to go bad. We know that this problem just keeps getting worse as you get older, your family grows, and your pantry gets bigger. That's why we decided to create a user-friendly website to keep track of those things for you!
What it does
basil has the USDA food database built in, so that looking up any of your groceries is as easy as typing in the name. Typing in quantities and expiration dates can be tedious, so we utilize a family login system so that kids or roommates can all help out with your synchronized virtual fridge. It also has a favorites feature so that you can quickly see what ingredients you've run out of and never forget to buy them again! Finally, the website includes a custom AI recipe generator (with accurate macros!) that prioritizes items that are about to go bad and user input to specify exactly what you want to make that day - whether it be a 15-minute lunch or a 4-course dinner.
How we built it
We created a full-stack application featuring a React frontend and a Flask/SQLite backend, architected with SQLAlchemy. The core innovation lies in its AI integration—a custom Mosaic/OpenAI client with structured prompts that force JSON-formatted nutritional data, which the backend seamlessly parses. This enables intelligent, inventory-aware recipe generation, all within a secure framework authenticated by Amazon Cognito, all while being extremely user-friendly, even for those who aren't tech savvy.
Challenges we ran into
For the backend, the first challenge we ran into was converting millions of data points in the USDA .csv file into something that we could actually use in the final project. We also had trouble with implementing the Mosaic/OpenAI client, especially because of the private nature of the OpenAI API Key. Overall, there was a lot of testing with different models and prompts to achieve exactly the kind of consistent, accurate output we wanted on the final website. For the frontend, we struggled slightly with implementing Amazon Cognito. We actually only learned this recently, at the AWS seminar held on Friday. Although we understood the broader strokes, we struggled with dealing with smaller edge cases like timed expiry of authentication, handling refresh after being signed out, etc. Through a lot of research and troubleshooting, we were able to effectively implement our authentication.
Accomplishments that we're proud of
Honestly, we're most proud of the challenges we overcame above. This is our first hackathon, so we came in expecting not to do much. We didn't even know if we would be able to have a fully finished hack by the end, and we definitely bit off more than we could chew in terms of features with the experience we have. Somehow, we made it all the way to the end with a product that is functional and visually pleasing. We managed to incorporate all the features that we wanted to while attending all the workshops we could.
What we learned
We grew more familiar with full-stack and backend development, especially in cases where databases include a huge number of entries. We also created our first AI-integrated project, and we're super happy that it's not just a preset chatbot, too!
What's next for basil
We want to make basil more useful for families and roommates. We were thinking about features that would be useful to use in our own apartment, including making specific foods shareable or personal, and labeling the owners of each specific grocery. We also want to make a mobile app version of basil to make using it more convenient, since we were toying around with the idea of a barcode scanner, or even an AI-assisted photo scanner for labeling and quantifying specific groceries.
Built With
- amazoncognito
- css
- databricks
- flask
- flask-cors
- html
- javascript
- mosaicai
- openai
- python
- pythonanywhere
- react
- sqlalchemy
- sqlite

Log in or sign up for Devpost to join the conversation.