NutriSync is a comprehensive full-stack nutrition tracking application designed to simplify and enhance the way users manage their dietary health. The platform combines intelligent meal logging with AI-powered food recognition, personalized nutrition tracking, and intermittent fasting support to create an all-in-one health management solution.
Users can effortlessly log meals by uploading food photos for instant AI analysis or searching through a database of over 400,000 foods from the USDA FoodData Central. The application calculates personalized calorie and macro targets based on individual body metrics, activity levels, and fitness goals (weight loss, maintenance, or muscle gain) using industry-standard BMR and TDEE formulas. Progress is tracked through interactive visualizations, daily nutrition reports, and streak-based achievements to encourage consistent logging habits.
For users practicing intermittent fasting, NutriSync offers built-in fasting timers with support for popular schedules including 16:8, 18:6, 20:4, and OMAD, complete with real-time progress tracking and hydration reminders. The platform also respects dietary preferences and restrictions (Halal, Kosher, Vegan, Vegetarian, Gluten-Free, Dairy-Free, Nut-Free, and more) by flagging incompatible foods during meal logging.
Core Functionality
-
AI food recognition via photo upload (Google Gemini AI)
-
Comprehensive food database search (USDA FoodData Central - 400,000+ foods)
-
Customizable nutrition goals with BMR/TDEE calculations
-
Intermittent fasting tracking (16:8, 18:6, 20:4, OMAD schedules)
-
Progress visualization with interactive charts
-
Personalized daily reports, saved across each logging day
-
Dietary restriction support (Halal, Kosher, Vegan, Vegetarian, Gluten-Free, etc.)
- Google OAuth authentication with email/password fallback
- Email infrastructure with Resend SMTP (custom domain with SPF/DKIM/DMARC compliance)
- Password reset, email change verification, and secure account deletion workflows
- Row Level Security (RLS) policies ensuring complete data privacy
- Real-time meal photo storage with Supabase Storage
- AI nutrition assistant chatbot for dietary guidance
- Responsive design with dark mode theming
- Comprehensive testing suite with coverage tracking via Codecov flags
- CI/CD pipeline with GitHub Actions
demov1.mp4
Frontend: React 18, Vite, Tailwind CSS, Plotly.js, Supabase Client
Backend: Supabase Edge Functions (Deno/TypeScript), Google Gemini AI, USDA API
Infrastructure: Supabase (PostgreSQL + Auth + Storage + Edge Functions), Vercel (Frontend), GitHub Actions (CI/CD)
Complete setup instructions: docs/README.md
- Prerequisites - Required software and accounts
- Database Setup - Supabase and migrations
- API Configuration - External APIs
- Running Locally - Development setup
- Google OAuth - Optional OAuth setup
- Testing - Running tests
- Deployment - Production deployment
- Troubleshooting - Common issues and solutions
Backend (Supabase CLI, for Edge Functions):
# https://supabase.com/docs/guides/cli/getting-started
supabase functions serveFrontend:
cd frontend
npm installSet Edge Function secrets (once, via Supabase CLI - SUPABASE_URL and
SUPABASE_SERVICE_ROLE_KEY are injected automatically, you don't set them):
supabase secrets set GOOGLE_API_KEY=your_gemini_api_key
supabase secrets set USDA_API_KEY=your_usda_keyCreate frontend/.env.local:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_anon_key
VITE_API_URL=http://localhost:54321/functions/v1Backend (Edge Functions, local emulator):
supabase functions serveFrontend:
cd frontend
npm run devAccess at http://localhost:5173
nutrisync/
├── supabase/
│ ├── functions/ # Edge Functions - API routes (12 endpoints)
│ │ ├── _shared/ # Shared CORS, Gemini REST client, helpers
│ │ └── <name>/index.ts
│ └── config.toml
├── backend/ # Historical DB migrations only (no app code)
│ └── migrations/ # Database migrations (8 files)
├── frontend/ # React application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page routes
│ │ └── services/ # API clients
│ └── tests/ # Frontend tests (137 tests, 60.4% coverage)
├── docs/ # Setup documentation
└── .github/workflows/ # CI/CD configuration
Frontend:
cd frontend
npm test # Run all tests
npm run test:coverage # With coverage reportTest Organization:
- Frontend: (contexts, components, pages, charts)
- Backend: no automated tests currently (the old FastAPI pytest suite was retired along with the FastAPI app; Edge Functions would use
deno test)
CI/CD: Automated testing on every push via GitHub Actions
Backend: Supabase Edge Functions via supabase functions deploy
Frontend: Vercel with automatic GitHub integration
See Deployment Guide for detailed instructions.
MIT License - see LICENSE file
- Fork the repository
- Create a feature branch (
git checkout -b feature/name) - Commit changes (
git commit -m 'Add feature') - Push to branch (
git push origin feature/name) - Open a Pull Request
Run tests before submitting:
- Frontend:
npm test
Note: This monorepo combines frontend and backend. Original separate repositories (frontend, backend) are archived.






