How subashkatta01-commits/nutri-ai-trackeer works
Nutri-AI-Tracker lets users record meals, analyze descriptions or photos with an AI provider, and track nutrition against personal goals. The main flow runs from the browser through the Express API: authenticated meal analysis produces a nutrition result that is saved and later displayed in daily history and analytics. The app also supports profiles, weight, water, and progress-photo tracking. The excerpts show only some routes and calls; other capabilities are represented where supported by the README or sampled module responsibilities.
Main entry points: server.js API server · db.js Nutrition database · insights.js Progress insights · app.js Tracker UI
Components 12
User interface
- Tracker UI
frontend/public/app.js
API and analysis
- API server
server.js - Request validation
backend/middleware.js - Auth utilities
backend/authUtils.js - Meal analysis
server.js
Nutrition features
- Target calculator
backend/nutritionCalculator.js - Progress insights
backend/insights.js - Diet suggestions
backend/suggestions.js
Data storage
- Nutrition database
backend/db.js
Other components
- User
- Groq API
- Gemini API
Connections 11
- User → Tracker UI: uses
frontend/public/app.js - Tracker UI → API server: sends API requests
frontend/public/app.js - API server → Request validation: uses middleware
server.js - API server → Auth utilities: uses utilities
server.js - API server → Nutrition database: reads and writes
server.js - API server → Meal analysis: handles analysis
server.js - Meal analysis → Groq API: calls provider
server.js - Meal analysis → Gemini API: supports provider
README.md - Progress insights → Nutrition database: reads nutrition data
backend/insights.js - Progress insights → Target calculator: calculates targets
backend/insights.js - Diet suggestions → Nutrition database: reads eating data
backend/suggestions.js