Inspiration
Food insecurity and poor nutrition disproportionately affect low-income and diverse US communities because the tools available don't account for their real constraints: tight budgets, cultural food preferences, dietary restrictions tied to chronic conditions, and overall lifestyle. Most meal planning apps are built for a narrow demographic. We wanted to build something that works for a 60-year-old diabetic grandmother in Houston and a young family on WIC in Los Angeles equally well.
What it does
FoodBridge is a 5-step personalized nutrition and meal planning app. You enter your health profile (including medications and chronic conditions), goals, dietary preferences, weekly budget, and zip code. The app searches a 770,000-food USDA database ranked by your personal nutrient needs, then uses an AI agent to generate a 7-day meal plan that respects your allergies, diet, and medication interactions. Finally, it produces an itemized grocery list with real-time local pricing pulled from the web so you know exactly what you'll spend before you shop.
How we built it
- Frontend: React 19 + TypeScript + TailwindCSS, with Zustand for state management
- Backend: FastAPI (Python) with direct PostgreSQL queries for speed-critical steps
- Nutrition engine: Custom BMR/TDEE calculator that derives 18 personalized daily nutrient targets per user using the Mifflin-St Jeor equation, adjusted for health conditions, medications, smoking, and pregnancy
- Food database: USDA FoodData Central (~770K foods, 150+ nutrients), hosted in PostgreSQL
- Meal planning: LangChain ReAct agent with Claude Haiku 4.5, using SQL tools to query the database and enforce medication-aware substitution rules
- Grocery pricing: DuckDuckGo web search + single Claude LLM call to extract real local store prices by zip code
- Infrastructure: Docker Compose with hot reload for rapid iteration
Challenges we ran into
Getting the meal plan agent to reliably respect medication/allergy constraints was the hardest problem. Early versions would confidently generate meal plans with high-sugar foods for diabetic users. We solved it by encoding explicit substitution rules in the system prompt and forcing the agent to query the user's conditions before planning. Grocery pricing was another challenge — crowdsourced price databases had almost no USD data, so we pivoted to web search with LLM extraction, which turned out to be both faster and more accurate. We also had to kill a runaway LangChain agent that was looping through SQL queries and running up API costs in real time. Originally, we were using MCP to automate the backend, however this proved to be slow so we decided to only use it to calculate the weekly plan and grocery list.
Accomplishments that we're proud of
- Personalized daily values that actually account for who you are — not a generic RDA
- Medication-aware meal planning that automatically substitutes foods conflicting with warfarin, metformin, statins, and antihypertensives
- Cuisine-aware food scoring that boosts culturally relevant foods for users who prefer Asian, Mexican, Mediterranean, or Middle Eastern cooking
- Real zip-code-based grocery pricing instead of hardcoded estimates
- A full end-to-end working prototype built in a hackathon weekend
What we learned
Building health-adjacent tools requires much more domain specificity than we expected. Generic nutrition advice fails real users, the difference between a standard RDA and a personalized one can be 400+ calories and completely different micronutrient targets. We also learned that LLM agents are powerful but need tight guardrails: recursion limits, explicit constraints, and structured output formats are non-negotiable for production reliability.
What's next for FoodBridge
- Store locator integration — connect to Kroger, Walmart, and Instacart APIs for live, cart-ready pricing by store/region
- WIC/SNAP eligibility filtering — surface only WIC-approved items for eligible users
- Recipe generation — turn the 7-day plan into step-by-step recipes with cook times
- Multilingual support — Spanish, Mandarin, Vietnamese, and Arabic for broader community reach
- Medication database integration — connect to RxNorm API for comprehensive drug–food interaction checking beyond our current hardcoded rules
Built With
- docker
- duckduckgo-search-(ddgs)
- httpx-platforms-&-devops-docker
- langchain
- langchain-react-agent
- langgraph
- open-food-facts-api
- open-prices-api-libraries-zustand
- psycopg2
- pydantic
- python
- python-dotenv
- react-19
- sql-frameworks-fastapi
- sqlalchemy
- sqldatabasetoolkit-databases-postgresql-16
- tailwindcss
- typescript
- usda-fooddata-central-(770k+-foods)-apis-anthropic-api
- vite-ai-/-llm-anthropic-claude-haiku-4.5
Log in or sign up for Devpost to join the conversation.