How medi-meal/apex works
Medimeal is a health-focused meal recommendation web app. Users enter health and dietary details, request AI-generated meal plans or food-safety checks, and can review saved activity and profile information. The React app routes users through landing, authentication, profile, and recommendation screens; the Express API handles authentication, AI requests, and persistence. README-documented features such as email notifications and meal tracking are included, though their implementation is not visible in the excerpts. Backend relationships are shown only where excerpts or README documentation support them.
Main entry points: App.jsx App routing · GeminiRecommend.jsx Meal planner · index.js Authentication routes · UserProfile.jsx Profile dashboard
Components 21
Web application
- React entry
client/src/main.jsx - App routing
client/src/App.jsx - Navigation
client/src/components/Navbar.jsx - Landing page
client/src/pages/Landing.jsx - Login
client/src/pages/Login.jsx - Signup
client/src/pages/Signup.jsx - Meal planner
client/src/pages/GeminiRecommend.jsx - Profile dashboard
client/src/pages/UserProfile.jsx - Feedback
client/src/pages/Feedback.jsx
Backend API
- Express routes
server/index.js - Authentication routes
server/index.js - Meal and safety API
server/index.js - Profile and stats API
server/index.js - Input history API
server/index.js
Persistence
- User record
server/models/User.js - Input history record
server/models/UserInput.js
External services
- MongoDB
- Google Gemini
- Google OAuth
- Email service
Other components
- Visitor
Connections 26
- Visitor → React entry: opens
README.md - React entry → App routing: renders
client/src/main.jsx - App routing → Navigation: renders
client/src/App.jsx - App routing → Landing page: routes to
client/src/App.jsx - App routing → Login: routes to
client/src/App.jsx - App routing → Signup: routes to
client/src/App.jsx - App routing → Profile dashboard: routes to
client/src/App.jsx - App routing → Meal planner: routes to
client/src/App.jsx - App routing → Feedback: routes to
client/src/App.jsx - Login → Authentication routes: submits credentials
README.md - Signup → Authentication routes: registers account
README.md - Authentication routes → User record: reads and writes
server/index.js - Authentication routes → Google OAuth: verifies identity
server/index.js - Meal planner → Meal and safety API: requests meal plan
client/src/pages/GeminiRecommend.jsx - Meal planner → Profile and stats API: saves profile
client/src/pages/GeminiRecommend.jsx - Meal planner → Input history API: saves inputs
client/src/pages/GeminiRecommend.jsx - Meal planner → Meal and safety API: checks food safety
client/src/pages/GeminiRecommend.jsx - Meal and safety API → Google Gemini: requests generation
server/index.js - Input history API → Input history record: reads and writes
server/index.js - Profile dashboard → Input history API: loads history
client/src/pages/UserProfile.jsx - Profile dashboard → Profile and stats API: loads statistics
client/src/pages/UserProfile.jsx - Profile and stats API → Input history record: reads activity
server/index.js - Profile and stats API → User record: reads user
server/index.js - User record → MongoDB: persists in
- Input history record → MongoDB: persists in
- Express routes → Email service: sends notifications
README.md