How yuzzaf/dietary works
Dietary is a full-stack nutrition and calorie-tracking app. Users sign in, set profile details and goals, find foods by search or image recognition, log meals, and review dashboard insights, chat coaching, and weekly PDF reports. The graph follows evidenced UI-to-service and server call paths; major features documented in the README are retained where their source wiring was not sampled. Some routing and domain links are therefore omitted rather than inferred.
Main entry points: app.js Express API · AppRoutes.jsx App routes · food.service.js Food search and detection · index.js Sequelize models
Components 29
Client experience
- App routes
client/src/routes/AppRoutes.jsx - Sign-in and registration
client/src/pages/auth/Login.jsx - Dashboard and reports
client/src/pages/dashboard/Dashboard.jsx - Food search and detect
client/src/pages/food/Detect.jsx - Meal history
client/src/pages/logs/Logs.jsx - Profile and goals
client/src/pages/profile/Profile.jsx - Nutrition chatbot
client/src/components/common/Chatbot.jsx - Auth API client
client/src/services/authService.js - Food API client
client/src/services/foodService.js - Log API client
client/src/services/logService.js - Insight API client
client/src/services/insightService.js - HTTP client
client/src/services/api.js
API and domain
- Express API
server/app.js - Authentication
server/controllers/authController.js - Food operations
server/controllers/foodController.js - Meal logging
server/controllers/logController.js - User profile
server/controllers/userController.js - Goal operations
server/controllers/goalController.js - Food search and detection
server/services/food.service.js - Edamam search
server/services/edamam.service.js - FatSecret search
server/services/fatsecret.service.js
Nutrition intelligence
- Insights, chat, export
server/controllers/aiController.js - Nutrition calculations
server/services/nutrition.service.js - Gemini AI
server/services/ai/gemini.service.js - Hugging Face vision
server/services/ai/detect.service.js
Persistence
- Sequelize models
server/models/index.js
Other components
- User
- Google OAuth
- GitHub OAuth
Connections 34
- User → App routes: uses
client/src/routes/AppRoutes.jsx - App routes → Sign-in and registration: routes to
client/src/routes/AppRoutes.jsx - App routes → Dashboard and reports: routes to
client/src/routes/AppRoutes.jsx - App routes → Food search and detect: routes to
client/src/routes/AppRoutes.jsx - App routes → Meal history: routes to
client/src/routes/AppRoutes.jsx - App routes → Profile and goals: routes to
client/src/routes/AppRoutes.jsx - Sign-in and registration → Auth API client: calls
client/src/pages/auth/Login.jsx - Auth API client → HTTP client: sends requests
client/src/services/authService.js - Food search and detect → Food API client: calls
client/src/pages/food/Detect.jsx - Food search and detect → Log API client: creates logs
client/src/pages/food/Detect.jsx - Meal history → Log API client: loads logs
client/src/pages/logs/Logs.jsx - Nutrition chatbot → Insight API client: sends chat
client/src/components/common/Chatbot.jsx - Dashboard and reports → Insight API client: loads insights
client/src/pages/dashboard/Dashboard.jsx - Insight API client → HTTP client: sends requests
client/src/services/insightService.js - Express API → Authentication: routes requests
- Express API → Food operations: routes requests
- Express API → Meal logging: routes requests
- Express API → User profile: routes requests
- Express API → Goal operations: routes requests
- Express API → Insights, chat, export: routes requests
- Authentication → Sequelize models: reads and writes
server/controllers/authController.js - Authentication → Google OAuth: verifies identity
server/controllers/authController.js - Authentication → GitHub OAuth: fetches identity
server/controllers/authController.js - Food operations → Food search and detection: searches and detects
server/controllers/foodController.js - Food operations → Sequelize models: reads and writes
server/controllers/foodController.js - Meal logging → Sequelize models: reads and writes
server/controllers/logController.js - User profile → Sequelize models: reads and writes
server/controllers/userController.js - Insights, chat, export → Sequelize models: reads and writes
server/controllers/aiController.js - Insights, chat, export → Nutrition calculations: calculates calories
server/controllers/aiController.js - Insights, chat, export → Gemini AI: generates and streams
server/controllers/aiController.js - Food search and detection → Edamam search: searches
server/services/food.service.js - Food search and detection → FatSecret search: searches
server/services/food.service.js - Food search and detection → Hugging Face vision: detects first
server/services/food.service.js - Food search and detection → Gemini AI: fallback detection
server/services/food.service.js