-
-
the welcome screen
-
selecting a goal
-
Storing user height and weight
-
Diet and allergies (“hard rules”)
-
the daily target of 2,310 kcal
-
the planner setup with USC or off campus, Full day, swipes and the free-text box
-
It shows live USC menus across the halls.
-
off-campus setup with budget, walking bands and cuisines.
-
It shows restaurant photos and AI reasons.
-
the full day locked in. It shows the day adjusting.
-
My day. It shows calorie, protein and spend totals.
Inspiration
USC students juggle three dining halls, dozens of nearby restaurants, a meal plan and a budget, and the menus change every day. Generic diet apps suggest food nobody on campus can order, and USC does not publish calories for its dining hall dishes. We wanted one app that answers a simple question: given my goal and my allergies, what can I actually eat right now?
What it does
A student creates an account (or continues as a guest), builds a profile in five short steps, and gets an estimated daily calorie and protein target. Then they pick USC dining halls or off campus, choose a meal, and get three options for it.
Each card shows calories, protein, walk time, the price or the meal swipe it uses, why it fits the student's goal, and an allergen line. Choosing a meal updates the target and budget for the rest of the day. A free-text box understands requests like "high protein dinner under $15". My day adds up what was chosen and can be shared.
- USC dining halls: Everybody's Kitchen, Parkside and USC Village, read from USC Hospitality's published menu for today. Dishes are combined into realistic plates, and a hall visit costs one swipe because buffet dishes have no price.
- Off campus: restaurants near the student's location in three walking bands (up to 0.3 miles, 0.3 to 0.5 and 0.5 to 1.5), all on by default so every open restaurant is included and none is dropped for distance. Students filter by cuisine and a per-meal and daily budget, and 231 dishes show a photo of that exact dish.
- Full day: breakfast, lunch and dinner appear together with three options each. Choosing one locks it and re-plans the other two around it.
- When money or swipes run out: the app points to USC Student Basic Needs and the Trojan Food Pantry, and says eligibility rules apply.
- Honest numbers: anything estimated is marked with ≈ and says so. Walking times are labelled as straight-line estimates, and the Details sheet names where each photo came from.
How we built it
The design rule is that code decides what is safe and AI only helps people say and understand things.
Hard filters first. Allergies, diet (including strict halal), dislikes, budget, distance, opening hours and item availability windows are applied before any ranking. If USC has not analysed a dish's allergens, it is hidden from students who listed an allergy.
Transparent ranking. The remaining dishes are scored against the student's goal, the calories and protein left for that meal, price, distance and any cuisines they picked, which carry real weight but never override a safety rule. The student can re-sort by best fit, closest, cheapest or protein (lighter in USC mode), and each sort orders the whole list, not just the top few.
Plates and the rest of the day. Dining hall dishes are composed into a main with up to two sides. Every pick changes what is left to eat and spend for the next meal.
AI at the edges. OpenAI (gpt-4.1-mini) turns free text into constraints and writes the one-line "why it fits" note. Numbers in those notes are checked against the dish's real facts, and free text can only add restrictions, never remove them.
Data. The official USC Hospitality menu feed is fetched for the current date, with a saved copy as fallback. Off-campus items come from a saved snapshot of 72 restaurants; one that is reported closed is never recommended.
The front end is a static JavaScript app with no build step, served by a Python FastAPI backend. Calorie targets use the Mifflin-St Jeor equation:
$$\text{BMR} = 10\,w + 6.25\,h - 5\,a + s$$
where $w$ is weight in kg, $h$ is height in cm, $a$ is age in years, and $s = +5$ for male and $s = -161$ for female. The daily target is $\text{BMR} \times \text{activity factor}$, adjusted for the student's goal.
Challenges we ran into
- USC publishes no nutrition values, so dining hall calories and protein are estimates from the dish name, and we label every one of them.
- Dining halls are all-you-care-to-eat, so there is no per-dish price. We model a visit as one swipe and build plates instead of pricing dishes.
- The feed mixes dishes with station headers, condiments, availability windows (for example "available until 2pm") and Sunday brunch.
- Allergen data is incomplete, so the engine fails closed and never says a dish is safe.
Accomplishments that we're proud of
- We generated 2,000 random student profiles and checked every returned option with a separate verifier that does not share the engine's code path. It found zero violations of allergy, diet, budget or distance rules, across every distance band and sort.
- 39 automated tests run offline against a saved copy of a real USC menu.
- A complete flow from sign-up to a shareable day plan, on phone and desktop, with real menu data.
What we learned
Students trust a recommendation when it shows its work. Labelling an estimate as an estimate, and showing fewer options rather than inventing one, mattered more than clever ranking.
What's next for Trojan Fork
Live menus for off-campus restaurants, real walking routes, meal history and feedback, more USC retail eateries, and combined campus and off-campus plans. Any USC account integration would need USC's authorisation.
Good to know
Student-built and not affiliated with USC. Restaurant items come from a saved snapshot, so prices and hours can change. Dish photos come from the restaurants' own sites or delivery menus, and a portion may look different. Accounts on the hosted demo live in temporary server storage and can reset, so guest mode is the fallback.
Built by Gurpreet Kukkar, Pavan Kumar Ramesh and Murali Krishna.
Built With
- css
- fastapi
- gpt-4.1-mini
- html
- javascript
- microsoft
- openai-api
- pytest
- python
- sqlalchemy
- sqlite
- usc-hospitality-menu-feed
- vercel