nutri.ai
## Inspiration
Pregnancy makes everyday food decisions feel unexpectedly complicated. Ingredient lists are difficult to interpret, online advice can be contradictory, and most guidance is not personalized to someone’s pregnancy stage, health conditions, allergies, or dietary preferences.
We built nutri.ai to make those decisions calmer and clearer. Our goal was to create an educational assistant that explains what matters, why it matters, and what alternatives someone could consider—without replacing qualified medical advice.
Eat informed. Grow confidently.
## What it does
nutri.ai provides personalized, pregnancy-aware food guidance. Users can:
- Scan packaged-food barcodes
- Photograph meals or unpackaged foods
- Upload screenshots from shopping and restaurant websites
- Search for foods, drinks, ingredients, and supplements
- Receive ingredient-level explanations grounded in trusted guidance
- Ask concise follow-up questions
- Track consumed foods
- Generate weekly dietary-pattern summaries
Every result includes a clear status, relevant concerns, pregnancy-stage context, confidence, alternatives, limitations, and clickable sources.
## How we built it
We built nutri.ai as a responsive web application using:
- Next.js App Router
- React and TypeScript
- Google Gemini through Vertex AI
- Gemini multimodal image understanding
- Open Food Facts for barcode product data
- ZXing for browser-based barcode scanning
- Zod for validating structured AI responses
- Recharts for weekly visualizations
- Browser local storage for profiles, analyses, and food logs
The application sends user context, product information, image-derived details, and relevant public-health guidance to Gemini. Gemini acts as the reasoning and explanation layer, while our curated guidance library acts as the factual foundation.
Gemini powers four central features:
- Identifying foods and preparation details from images
- Extracting multiple products from screenshots
- Generating personalized, structured food analyses
- Finding patterns across a user’s weekly food log
All Gemini requests are handled server-side so the API credentials are never exposed to the browser.
## Challenges we faced
One major challenge was balancing helpful personalization with responsible health communication. Food guidance during pregnancy should acknowledge uncertainty and individual circumstances. We designed strict response schemas, supplied curated sources, restricted citations to known source IDs, and used statuses such as Use caution and Not enough information instead of making absolute safety guarantees.
Multimodal input introduced another challenge. A photograph may not show every ingredient, preparation method, or pasteurization label. We therefore included confidence scores and limitations so the application clearly communicates what it could not verify.
Browser camera behavior was also inconsistent across devices. We implemented explicit media-stream cleanup, camera selection persistence, invalid-frame detection, and manual barcode entry as a reliable fallback.
Finally, turning detailed AI output into a calm and readable interface required careful iteration. We organized results like an evidence- backed food label: the verdict appears first, followed by ingredient-level reasoning, personal context, alternatives, and sources.
## What we learned
We learned that trustworthy AI health experiences depend as much on information architecture as model capability. A strong model response is not enough—it must be validated, grounded, concise, and presented with appropriate uncertainty.
We also learned how valuable Gemini’s multimodal capabilities are when different input formats share one reasoning workflow. A barcode, meal photo, product screenshot, or text description can all become structured food context and flow through the same personalized analysis system.
Most importantly, we learned that AI is especially useful here as a synthesis layer. Gemini can connect product details, pregnancy stage, dietary preferences, and public-health guidance, while the underlying medical facts remain traceable to established organizations.
## What’s next
Our next step is a browser extension that analyzes visible products on grocery, restaurant, and shopping websites using the same screenshot- analysis API. We also envision native mobile applications, cloud synchronization, a larger multilingual guidance library, and optional collaboration with dietitians and prenatal-care professionals.
## Disclaimer
nutri.ai provides educational information and is not medical advice. Food safety and nutritional needs vary by person and pregnancy. Important decisions should be confirmed with a qualified healthcare professional.
Log in or sign up for Devpost to join the conversation.