SMART CALORIE TRACKER
AI-Powered Nutrition Tracker with Gemini Meal Analysis
The Problem Statement
“Most calorie tracking apps burden users with manual nutritional lookup — requiring them to search databases, weigh food, and enter values for every meal. Smart Calorie Tracker eliminates this friction by accepting a plain-text meal description (with optional photo), sending it to Google Gemini for nutritional analysis, and returning a breakdown of calories, macros, and personalised feedback calibrated to the user's health profile. The app acts as the intelligent middle ground between a generic food diary and a personalised nutrition counsellor, with IST-aware daily summaries and a 7-day trend dashboard.”
Project Gallery
The Architecture Layout
The backend is a FastAPI Python application using Beanie ODM (Motor async driver) for MongoDB Atlas access. User authentication uses JWT with protected route middleware. The onboarding flow collects health profile data (age, height, weight, activity level, goals) and auto-computes a personalised daily calorie target using a BMR formula. On meal submission, the Gemini service sends the text description (and optional base64 image) to Google Generative AI, parsing the structured JSON response into a MealLog document. Meal logs are timestamped in IST using pytz, enabling accurate day-boundary grouping for daily summaries. The React Vite frontend uses Chart.js to render a 7-day calorie trend chart on the dashboard. An admin approval gate controls new user registration, requiring admin verification before account activation.