Inspiration

75% of people between the ages of 18 and 49 have to follow at least one major dietary restriction, with 17% being on a completely specialized diet. On our team alone, two of our vegetarian members struggled to find meals on campus sustainable for the whole day. This challenge is not unique to us, as many students face difficulty in maintaining a balanced diet that meets their nutritional needs while accommodating dietary preferences such as veganism, gluten-free, low-calorie, or high-protein diets. Furthermore, the constant need to search for appropriate meal options that aren’t too far away can be time-consuming and frustrating. We saw an opportunity to use AI to simplify and personalize meal planning, making it easier for everyone to access meals that align with their goals and restrictions, while also considering factors like proximity to dining halls and available menu items.

What it does

Meal Mentor is a web app designed to simplify meal planning for university students. By interacting with a Google Gemini-powered chatbot, students can input dietary preferences such as calorie limits, protein intake, and dietary restrictions. The app uses an AI-powered A* algorithm to generate a personalized meal plan by matching meals from nearby dining halls based on these preferences. It integrates real-time AI Agent based menu scraping to ensure up-to-date meal options and utilizes the Google Maps API to factor in the user's location, suggesting the nearest dining halls that meet their dietary goals. Meal Mentor helps students stay on track with their nutrition by automating meal suggestions and providing a balanced meal plan for the day.

How we built it

  1. We used a Zyte API Web Scraping Agent paired with BeautifulSoup script in python to collect all the dining information around Charlottesville to an SQLite3 database (flex and meal swaps).
  2. We implemented a Google Gemini chatbot trained to act as a nutritionist and help a user come up with an optimal diet.
  3. Utilized an A* algorithm to calculate the perfect daily meal schedule based on vector closeness between the meal’s total macronutrients and the user’s preferred nutrients. dietary preferences, distance to dining halls, available menu options, and nutritional goals. Integrated these results with our Javascript front-end.

Challenges we ran into

One of the biggest challenges we faced was integrating the front-end and back-end, as most of our team was new to full-stack development. Learning how to connect our Flask-based backend with the front-end required trial and error, especially when handling API requests. Additionally, implementing the Google Maps API for drag-and-drop location selection was difficult due to outdated documentation, making it challenging to embed an interactive map into our JavaScript-based site. While these both took a majority of our time, we’re glad that we were able to learn how to navigate such challenges on our own.

Accomplishments that we're proud of

We are proud of the fact that we were able to integrate all of our technical components into the front end of our application, overcoming the fact that most of us were strictly familiar with python and API utilization. Throughout this hackathon, we used tools such as flask to complete the frontend to backend integration, and SQLite3 databases to store and easily manage large forms of data, both of which were new to our whole team. But in the end, we were able to establish a connection between the front end and our meal generation algorithm, Google Maps location services, and our Gemini assistant.

What we learned

Although we were able to use many tools in creating this project, the tool that we found the most useful was that of leveraging AI agents for web scraping with Zyte, an AI-powered web scraping API. Zyte allowed us to efficiently scrape the UVA dining menu, automating the extraction of key data such as calorie counts, grams of protein, and other nutritional information for each meal. We were able to streamline the process, reducing manual effort that could have taken hours.

What's next for Meal Mentor

Looking ahead, we plan to expand Meal Mentor to more universities by deploying our AI agents to scrape their dining hall menu websites, making this solution accessible to a broader student base. We also aim to incorporate cost as an additional constraint, as meals are currently only evaluated based on meal swipes. Moreover, since this was our first experience integrating front-end and back-end components, we weren't able to fully optimize the user interface. To enhance the user experience, we intend to implement React, creating a more dynamic and interactive interface—especially for our chatbot.

Share this project:

Updates