Inspiration
We built NutriSnap AI because staying healthy shouldn't require a degree in nutrition science. Most people want to eat better and exercise more, but tracking calories, understanding macros, and planning meals feels overwhelming. We envisioned a single app where you snap a photo of your food and instantly get everything you need — nutrition facts, health insights, a personalized plan, and motivation to keep going. The goal was to remove friction from healthy behavior change.
What It Does
NutriSnap AI is a comprehensive health platform built on four core pillars:
- AI Food Scanner — Snap any meal photo and get instant analysis: food name, calories, protein, carbs, fats, sugar, sodium, vitamins, minerals, ingredient quality, cooking method, a health score (0–100), personalized insights, and allergen warnings. No typing, no searching databases.
- Personalized Plans — Generate AI-crafted 7-day diet plans and workout routines tailored to age, weight, goals, dietary restrictions, fitness level, and equipment. Plans include meal schedules, shopping lists, macro targets, and progressive exercise routines.
- Tracking & Analytics — Log workouts, track daily nutrition, visualize trends with rich charts, monitor calorie burn vs. intake, and watch your health score evolve over time.
- Gamification & Community — Earn points and badges for healthy meals and workouts, maintain streaks, join challenges (Clean Eating, Sugar Detox, Step Master), compete on leaderboards, and share progress in community groups.
How We Built It
- Frontend: React 18 + TypeScript + Vite, styled with Tailwind CSS and shadcn/ui for a clean, modern, dark-mode-ready UI.
- Backend: Supabase — PostgreSQL, Row Level Security (RLS), Auth (email/OTP/social), Storage for meal photos, and Edge Functions for secure API calls.
- AI Engine: Google Gemini 3.0 Flash handles all intelligence — food image recognition (Vision), nutrition extraction, diet plan generation, workout plan generation, and health insight creation.
- Data Layer: Comprehensive schema with 12+ tables (meals, workouts, challenges, rewards, streaks, plans, preferences, groups, health reports, etc.).
- Resilience: Offline-first fallback system with a 35-food nutrition database and 18-workout library so the app works seamlessly even when AI quotas are exhausted — perfect for demos.
- Demo System: One-click Load Demo Data button seeds 39 meals, 14 workouts, badges, active challenges, personalized plans, and streaks across 18 days of history.
Challenges We Ran Into
- AI Rate Limits: We hit 429 errors from the Gemini free tier during development. We solved this by building a complete offline fallback — a searchable food picker with 35 real foods and a workout library — so the app never breaks and demos run smoothly without any API key.
- Database Schema Evolution: As features grew (challenges, rewards, streaks, plans), keeping the schema in sync required careful migration management. We learned to plan schema-wide before coding.
- Complex State Management: Cross-page data dependencies (challenges affecting rewards, streaks affecting dashboard scores) required thoughtful data flow design.
- Image Handling: Balancing real photo uploads with fallback image URLs for demo data required a flexible image pipeline.
Accomplishments We're Proud Of
- Zero-dependency Demo Mode — The app is fully functional for demos without any API key. Every core feature works via local data.
- Comprehensive AI Integration — A single photo triggers 10+ AI-generated data points (nutrition, health score, insights, allergens, recommendations).
- End-to-End Gamification — From meal logging → points → badges → streaks → challenges → leaderboard, a complete motivational loop.
- Production-Grade Architecture — RLS policies, upsert guards, idempotent seeders, and Edge Functions for secure API routing.
- Beautiful UX — shadcn/ui components, Tailwind theming, dark mode, responsive design, loading skeletons, and toast notifications throughout.
What We Learned
- AI isn't always available — building graceful fallbacks is essential for real-world reliability.
- Schema-first design saves hours of refactoring when adding gamification layers.
- Supabase Edge Functions are the right place to hide API keys and handle sensitive AI calls securely.
- Demo data matters — judges and users engage 10x more when they see a populated, realistic dashboard.
What's Next for NutriSnap AI
- Wearable Integration — Sync with Apple Health and Google Fit for automatic workout and step tracking.
- Meal Prep Mode — AI-generated weekly shopping lists with Instacart or grocery API integration.
- Social Feed — Community photo feed where users share meals and get peer health tips.
- Progress Photos — Side-by-side body transformation tracking with AI-powered body composition estimates.
- Subscription Tiers — Freemium model with advanced AI coaching, custom challenges, and family plans.
Built With
- 2.0
- analytics
- auth
- backend
- context
- css
- custom
- data
- edge
- gateway
- gemini
- lucide
- netlify
- news
- oauth
- otp
- platform
- postgresql
- radix
- react
- realtime
- responsive
- shadcn
- storage
- storageroom
- supabase
- tailwind
- typescript
- ui
- vercel
- vite
- weather
- with
Log in or sign up for Devpost to join the conversation.