How zaraimran03/ai-recipe-generator- works
SaaDish AI turns user ingredients and preferences into AI-generated recipes, then supports saving, adapting, cooking, and tracking them alongside pantry, family-recipe, nutrition, and account features. The principal path is browser route → recipe API route/controller → Groq generation, with authenticated recipes and history persisted in MongoDB. The README documents additional product capabilities whose detailed wiring is not visible in the sampled source; those are represented as subsystems without speculative call edges.
Main entry points: App.jsx Web routes · recipeController.js Recipe workflows · server.js Express server · authController.js Auth workflows
Components 25
Web experience
- Web routes
frontend/src/App.jsx - Recipe generation
frontend/src/pages/GenerateRecipe.jsx - Recipe details
frontend/src/pages/RecipeDetails.jsx - Family recipes
frontend/src/pages/FamilyRecipes.jsx
Identity and profiles
- Account access
frontend/src/context/AuthContext.jsx - Auth client
frontend/src/services/auth.js - Auth endpoints
backend/routes/auth.js - Auth workflows
backend/controllers/authController.js - User records
backend/models/User.js - Profile workflows
backend/controllers/userController.js
Recipe workflows
- Recipe endpoints
backend/routes/recipes.js - Recipe workflows
backend/controllers/recipeController.js - Groq recipe AI
backend/services/groqService.js - Recipe records
backend/models/Recipe.js - Family recipe workflows
backend/controllers/familyRecipeController.js - Family recipe records
backend/models/FamilyRecipe.js
Personal cooking data
- Pantry manager
backend/controllers/pantryController.js - Pantry records
backend/models/Pantry.js - Favorites and history
backend/models/Favorite.js - Nutrition analytics
backend/routes/nutrition.js
Backend platform
- Admin operations
backend/routes/admin.js - Express server
backend/server.js - Email delivery
backend/services/email.js
Other components
- Cook
- EmailJS
Connections 24
- Cook → Web routes: uses
README.md - Web routes → Recipe generation: routes to
frontend/src/App.jsx - Web routes → Recipe details: routes to
frontend/src/App.jsx - Web routes → Family recipes: routes to
frontend/src/App.jsx - Web routes → Account access: provides context
frontend/src/App.jsx - Account access → Auth client: calls
frontend/src/context/AuthContext.jsx - Auth endpoints → Auth workflows: dispatches
backend/routes/auth.js - Auth workflows → User records: reads and writes
backend/controllers/authController.js - Auth workflows → Email delivery: sends OTP
backend/controllers/authController.js - Email delivery → EmailJS: delivers email
README.md - Express server → Auth endpoints: mounts
backend/server.js - Express server → Recipe endpoints: mounts
backend/server.js - Express server → Nutrition analytics: mounts
backend/server.js - Express server → Admin operations: mounts
backend/server.js - Recipe endpoints → Recipe workflows: dispatches
backend/routes/recipes.js - Recipe workflows → Groq recipe AI: generates and adapts
backend/controllers/recipeController.js - Recipe workflows → Recipe records: reads and writes
backend/controllers/recipeController.js - Recipe workflows → User records: reads preferences
backend/controllers/recipeController.js - Recipe workflows → Favorites and history: records activity
backend/controllers/recipeController.js - Family recipe workflows → Family recipe records: reads and writes
backend/controllers/familyRecipeController.js - Family recipe workflows → Groq recipe AI: modernizes recipe
backend/controllers/familyRecipeController.js - Pantry manager → Pantry records: reads and writes
backend/controllers/pantryController.js - Profile workflows → User records: reads and writes
backend/controllers/userController.js - Nutrition analytics → Recipe records: reads recipes
backend/routes/nutrition.js