Inspiration
Many people want to eat healthier, but manually tracking every micro-gram of iron or vitamin C is exhausting. We noticed that most apps focus only on calories, leaving out critical nutrients like Iron and Potassium that actually affect daily energy levels. We wanted to build a "Buddy" that doesn't just track, but tells you exactly what’s missing from your day.
What it does
NutriBuddy is a smart nutrition assistant. Users can type in what they ate in plain English (e.g., "I had a chicken salad and a banana"). The app instantly fetches scientific-grade nutrition data from the USDA FoodData Central API, logs it to a Supabase database, and calculates your progress toward daily recommended goals (RDI). It specifically highlights "Gaps" in your nutrition so you know what to eat next.
How we built it
Frontend: Built with Node.js for a responsive, mobile-first chat experience.
Backend: Leveraged Next.js API Routes to handle logic and Axios to communicate with external APIs.
Data Source: Integrated the USDA FoodData Central API to ensure nutrient accuracy.
Database: Used Supabase (PostgreSQL) for real-time data storage and lightning-fast retrieval of food logs.
Challenges we ran into
We hit the "Hackathon Wall" multiple times. Initially, we struggled with folder structures and path aliases in Next.js. We also faced a major pivot when our initial AI quota ran out, forcing us to quickly transition from a general AI model to a specialized scientific API (USDA). Managing the asynchronous flow between the user input, the API response, and the database insertion required careful debugging of our server-side logic.
Accomplishments that we're proud of
The Pivot: Successfully migrating our entire database backend from MongoDB to Supabase and our "brain" from OpenAI to the USDA API in record time.
The Logic: Creating a "Status" algorithm that doesn't just show totals, but identifies specific nutritional deficiencies (The "Missing" nutrients).
The UI: Building a clean, chat-based interface that makes food logging feel like texting a friend.
What we learned
We learned that "Perfect is the enemy of Done." When our first API failed, we learned how to pivot to a new technology without losing our momentum. We also gained deep experience in relational database management with Supabase and the complexities of parsing large-scale scientific data from government APIs.
What's next for NutraBuddy
Photo Recognition: Using Computer Vision to let users take a picture of their plate instead of typing.
Smart Suggestions: An AI coach that looks at your "Missing" nutrients and suggests specific local restaurants or recipes to fill that gap.
Wearable Sync: Connecting with Apple Health or Fitbit to see how those nutrients are affecting the user's sleep and heart rate.
Built With
- api
- gemini
- javascript
- json
- next
- node.js
- supabase
Log in or sign up for Devpost to join the conversation.