SaaS2024
Calorie Tracker
AI-powered nutrition tracker with photo & barcode food parsing.
A passion project: a production-ready, full-stack calorie & macro tracker built with Next.js 16, React 19 and Supabase. Users log meals, water and weight against personalized, science-based targets (Mifflin–St Jeor BMR/TDEE).
I integrated Google Gemini AI for natural-language and photo-based food parsing, barcode scanning, and the USDA FoodData Central database for verified nutrition data.
Architecture
- Core: Next.js 16 (App Router, RSC, Server Actions) + React 19 + TypeScript, backed by Supabase (PostgreSQL, Auth, Row-Level Security).
- AI: Google Gemini for natural-language and image food recognition, with a hybrid USDA matching layer for verified data and reduced API cost.
- Features: barcode scanning (@zxing), email + Google OAuth, Mifflin–St Jeor goal calculation with safety guardrails.
- Analytics: Recharts macro breakdowns, weight trends and calorie-adherence heatmaps, plus rule-based coaching suggestions; Vitest unit tests on core nutrition logic.
Tech stack
Next.js 16React 19TypeScriptSupabasePostgreSQLRLSGoogle GeminiUSDA API@zxingTailwind v4shadcn/uiRechartsZod