Inspiration
Forming habits can be quite challenging. Despite the fact that eating is a daily necessity for everyone, a striking 42.4% of adults in the US are affected by obesity. As we see our parents aging and more and more health issues popping up, we're reminded of the importance of forming eating habits that stick and healthier cooking at home. Every person is different with different nutrition needs, from the person who is vegetarian for religious reasons to the person trying to bulk at the gym to the person with a severe peanut allergy. We decided to create a full-stack web app, RepEat, to make this process more accessible for all.
What it does
RepEat has numerous pages and features associated. After signing up and going through a onboarding process where you populate your preferences and previous medical conditions, you're taken to a dashboard that showcases your health goals, recipe suggestions, and summaries of your past progress in creating a healthier future. In the inventory page, you can easily add or remove appliances and ingredients you have in your fridge, which is used on the next page, recipes, to suggest delicious recipes that both match what you have in your fridge and your allergies, preferences, and goals.
We also have an always-online pal, Cheffy, that you can ask questions when you need advice in terms of goals, nutrition, recipes, or health. For example, Cheffy can tell you some common substitutions for recipes Finally, the resource page is populated with links, questions, and help. With each user, the profile page shows all the information from the onboarding process, and allows for further edits as goals change. Though not all the functionality designed has been fully implemented, we believe that RepEat has the potential to be a unifying platform where users use the power of generative AI to take grasp of their health and steer towards a healthier future.
How we built it
We used Reflex as the basis of our full stack web app and the Gemini 1.5 Pro API for the generative AI requests. Since both of them were in Python, the primary functionality of our web app uses Python. Reflex also handled our login and signup, along with our designed models for the pantry, with a built-in database that uses SQLModel. We were able to use many different facets of Reflex, from the states to using foreach to the CSS styling. With Gemini, we created various prompts ranging from recipe generation, to ingredient substitution and nutritional value calculation. Several prompts also focused on nutritional and health advice to help direct the user with specific statistics and goals to guide users. Additionally, we used Gemini's image parsing to translate image text to a JSON object to provide users with a wider variety of onboarding options.
Challenges we ran into
The four of us had never worked on one project before, so it was quite challenging figuring out what each person is best at and dividing the tasks. In fact, it was Amy's first hackathon ever! In terms of the more technical side, learning Reflex and the Gemini API from scratch and building a functional app was definitely a journey, though shoutout to the folks at the Reflex and Google tables who were also kind enough to take time and help us debug our issues. Understanding better ways of prompting the Gemini API was also difficult. We initially had brainstormed a lot of ideas and many directions that this project could go, so narrowing down the scope to a few and actually going from ideation to designs to functionality in the span of 36 hours was a challenge we shared with the other teams at LA Hacks. Due to time limitations, we built out the backend and the functions that could be called to generate the front end, but some of the front end was not connected. While we had played around with generative AI, a large component of our project was fine tuning the prompts, though none of us were familiar with prompt engineering.
Accomplishments that we're proud of
We're really proud of how the web app looks from the design side, with all the fully fleshed out pages that showcase our ideas fully. We're also really happy with the number of new APIs and technologies we learned, which were really fun to put into practice. Looking back at what we finished, it was really impressive to see all the lines of code that we added to the Github and the many ways we were able to incorporate the impressive technology of generative AI to create something that will benefit the world.
What we learned
We learned a lot about Reflex and the power of generative AI through Gemini 1.5 Pro! Reflex actually had a surprisingly gentle learning curve, since Python is fairly user friendly and Reflex had robust and easy to read documentation. Gemini was also well documented with helpful examples for both generative prompting and image parsing. Many of the generated results were surprisingly accurate and consistent between runs.
What's next for RepEat
We hope to connect all the functionality and expand on the database to store users' preferences, past meals, and use it to suggest different varieties of meals so people don't get bored of the meals. With more data about the past meals and recipes used in some larger database management system, we can add a plaform for people to share recipes and a more robust filter system.
Log in or sign up for Devpost to join the conversation.