How kris-zar/nutritrack-pro works
NutriTrack PRO is a React nutrition-tracking app backed by a FastAPI REST service. Users enter through the SPA, then view daily calorie and macro totals, configure profile-based targets, browse dated food logs, or log meals manually and optionally analyze a food photo. The backend supports in-memory demo storage or MongoDB persistence, with optional Gemini image analysis. Planner, recipes, progress charts, and fasting are documented as coming soon. The README identifies frontend/ as canonical; backend internals were not excerpted, so backend relationships are limited to documented capabilities and observed API calls.
Main entry points: App.js App shell · server.py FastAPI service · LogMeals.js Meal entry · Dashboard.js Daily dashboard
Components 11
Nutrition UI
- App shell
frontend/src/App.js - Daily dashboard
frontend/src/components/Dashboard.js - Profile targets
frontend/src/components/Profile.js - Food log
frontend/src/components/Foods.js - Meal entry
frontend/src/components/LogMeals.js - Planned features
frontend/src/App.js
API and persistence
- FastAPI service
backend/server.py - Demo or MongoDB storage
backend/server.py
External services
- Gemini analysis
- MongoDB
Other components
- User
Connections 14
- User → App shell: uses
README.md - App shell → Daily dashboard: renders
frontend/src/App.js - App shell → Profile targets: renders
frontend/src/App.js - App shell → Food log: renders
frontend/src/App.js - App shell → Meal entry: renders
frontend/src/App.js - App shell → Planned features: shows placeholders
frontend/src/App.js - App shell → FastAPI service: loads profile
frontend/src/App.js - Profile targets → App shell: submits updates
frontend/src/App.js - Daily dashboard → FastAPI service: loads stats
frontend/src/components/Dashboard.js - Meal entry → FastAPI service: posts meals
frontend/src/components/LogMeals.js - Meal entry → FastAPI service: requests analysis
frontend/src/components/LogMeals.js - FastAPI service → Demo or MongoDB storage: reads and writes
README.md - Demo or MongoDB storage → MongoDB: persists in production
README.md - FastAPI service → Gemini analysis: analyzes images
README.md