Project Info
Inspiration
As college students who attend UC Berkeley, we find ourselves not having time to cook healthy nutritious food that would meet our fitness goals. The next best option out there was getting food from the campus' dining halls. However, due to the vast types of foods served at these dining halls it seemed difficult to keep track of what to eat in order to maintain our health goals.
What it does
We created a website that scrapes the UC Berkeley dining page where it is updated daily with all the food that is offered at the dining halls and its nutritional values. The website then takes the amount of calories and macro nutrients the user wants to eat and creates a personalized meal plan that abide by their specific needs.
How we built it
We used the Gemini AI API to create the customized meals, where the base of the website was created using React.js. Finally for scraping, we used selenium for the main part.
Challenges we ran into
Using the Gemini API took us a while to understand and make it output what we wanted. When it came to scraping, we ran into some challenges with getting hidden elements.
Accomplishments we're proud of
We are very proud that we have a final project that we can be proud of as well as one that we made in such a limited amount of time. It took a lot of effort from us but it payed off in the end.
What we learned
Building a web application in such a short amount of time was very challenging but through it we learned so much. We learned how to problem solve and go around many of the issues and bugs we came across. It was so much fun pushing ourselves to the limit and seeing what we come up with.
What's next
Upscaling it to other UCs and eventually to other universities across the world.
Getting Started with Create React App
This project was bootstrapped with Create React App.
Available Scripts
In the project directory, you can run:
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
npm test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run build
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
npm run eject
Note: this is a one-way operation. Once you eject, you can't go back!
If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
Learn More
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
npm run build fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
Analysis
View
Metric
- 20
- 16
- 10
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- Google GeminiIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- Node.jsClaimed
7 of 8 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
112 KB
Source files
18
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
ahugais/ucbmealz
30 files · 1.0 MB · @ 746f7f7
Structure
Interface
4 files · 13%Screens, components and styles rendered to the user.
Application logic
13 files · 43%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- JavaScript85%
- Python7%
- CSS3%
- Markdown3%
- HTML2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 15- @google/generative-ai
- @testing-library/jest-dom
- @testing-library/react
- @testing-library/user-event
- axios
- chromedriver
- express
- node-schedule
- react
- react-dom
- react-scripts
- selenium
- selenium-webdriver
- sqlite3
- web-vitals
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
Feature verification
Gemini AI-generated personalized meal planVerified
Gemini AI API is used to create customized meals from calorie/macro goals
Claimed on Devposthigh confidencesrc/gemini_api.js:9— Initializes GoogleGenerativeAI with gemini-1.5-flash modelsrc/gemini_api.js:35— Builds a prompt embedding menu data, dining hall, meal period, dietary includes/excludes, calories, protein, carbs, and fats, then calls model.generateContent(prompt) in mealPlan()src/components/RecommendedMeal.js:23— RecommendedMeal component calls mealPlan() and renders the HTML result when the user clicks Generate Meal
Persist scraped menu data to SQLite and JSONVerified
Scraped nutritional data is stored so it can be used to build meal plans
Claimed on readmehigh confidencescraping/dining_menu_scrape.py:30— insert_data() writes each scraped item into a scraped_data SQLite tabledining_hall_data.db— A populated SQLite database file exists in the repo confirming the scraper's output was actually persistedsrc/meal_data.json— job() serializes menu_data to src/meal_data.json, and this file exists with 3200+ lines of real dining hall entries
React.js frontendVerified
The base of the website was created using React.js
Claimed on Devposthigh confidencepackage.json:14— react and react-dom v18 are dependencies, and react-scripts drives start/buildsrc/App.js:1— App.js is a functional React component composing Header, SelectionPanel, and RecommendedMeal
Scheduled daily re-scrapingVerified
The dining page is scraped and updated daily
Claimed on Devpostmedium confidencescraping/dining_menu_scrape.py:189— schedule.every().day.at('00:01').do(job) sets up a daily recurring scrape jobscraping/dining_menu_scrape.js:205— node-schedule cron '1 0 * * *' equivalently schedules the job daily; requires the script to be running continuously to actually fire
Selenium-based scraper for UC Berkeley dining hall menusVerified
The website scrapes the UC Berkeley dining page which is updated daily with food and nutritional values
Claimed on Devposthigh confidencescraping/dining_menu_scrape.py:57— Uses selenium webdriver to open https://dining.berkeley.edu/menus/, click through dining halls and meal periods, and extract nutrient details per itemscraping/dining_menu_scrape.js:67— Equivalent Node.js/selenium-webdriver implementation of the same scraping flow, confirming the scraper is real and functional
User selection UI for dining hall, meal period, dietary restrictions, and nutrient goalsVerified
User inputs calories and macro goals to generate a personalized meal plan
Claimed on Devposthigh confidencesrc/App.js:58— Renders SelectionPanel components for Dining Halls, Meal, Dietary Restriction, and Nutrients, storing user choices in statesrc/components/SelectionPanel.js:34— Handles checkbox/radio selection and numeric nutrient input, propagating values up via onChange callbackssrc/data.js:1— selectedData global object is populated from App.js state on Generate Meal click and consumed by gemini_api.js
Live end-to-end pipeline from scraper output to Gemini promptCode-supported
The website scrapes dining data daily and feeds it directly into meal plan generation
Claimed on Devpostmedium confidencesrc/gemini_api.js:4— gemini_api.js imports menu data from src/jsonData.js, a hardcoded static file, not from src/meal_data.json which is the file the scraper actually writes to; so the daily scraper output is not automatically wired into the live app without a manual copy stepsrc/jsonData.js:1— jsonData.js hardcodes a menu() function returning a fixed JSON array rather than reading meal_data.json at runtime
Upscaling to other UCs/universitiesClaimed only
What's next: upscaling to other UCs and eventually other universities
Claimed on Devposthigh confidence
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.