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: FastAPI, Google Gemini AI, USDA API, Supabase
Infrastructure: Supabase (PostgreSQL + Auth + Storage), Digital Ocean (Backend), 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:
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtFrontend:
cd frontend
npm installCreate backend/.env:
SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
SUPABASE_KEY=your_anon_key
GOOGLE_API_KEY=your_gemini_api_key
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:8000Backend:
cd backend
uvicorn app.main:app --reloadFrontend:
cd frontend
npm run devAccess at http://localhost:5173
nutrisync/
├── backend/ # FastAPI application
│ ├── app/
│ │ ├── main.py # API routes (13 endpoints)
│ │ └── services/ # Gemini AI integration
│ ├── tests/ # Backend tests (85 tests, 74.5% coverage)
│ ├── migrations/ # Database migrations (8 files)
│ └── deploy.sh # Deployment script
├── 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
Backend:
cd backend
pytest tests/ -v # Run all tests
pytest tests/ --cov=app --cov-report=html # With coverage reportFrontend:
cd frontend
npm test # Run all tests
npm run test:coverage # With coverage reportTest Organization:
- Backend: (API endpoints, AI services, user management, fasting, edge cases)
- Frontend: (contexts, components, pages, charts)
CI/CD: Automated testing on every push via GitHub Actions with separate coverage tracking for backend and frontend
Backend: Digital Ocean App Platform via backend/deploy.sh
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:
- Backend:
pytest tests/ - Frontend:
npm test
Note: This monorepo combines frontend and backend. Original separate repositories (frontend, backend) are archived.






