How kathir-23/mealmesh works
Meal--Meash is a food-donation coordination app: donors and organizations register, authenticate, and use role-specific dashboards to post, accept, and record distribution of donations. The React client also provides public partner, food-safety, contact, and chatbot experiences; the Express API persists users, donations, and contacts in MongoDB. Edges show only relationships explicit in sampled code or the SOURCE INDEX; some frontend-to-API workflows are visible in dashboard excerpts, while unsampled routes and integrations are omitted.
Main entry points: App.jsx App routing · app.js HTTP API · AuthContext.jsx Auth state · db.js MongoDB connection
Components 23
Web client
- App routing
frontend/src/App.jsx - Navigation
frontend/src/components/Nav.jsx - Public information
frontend/src/pages/About.jsx - Partner directory
frontend/src/pages/Donors.jsx - Food safety
frontend/src/pages/FoodSafety.jsx - Contact form
frontend/src/pages/Contact.jsx - Chatbot
frontend/src/components/Chatbot.jsx
Identity
- Auth state
frontend/src/context/AuthContext.jsx - Login
frontend/src/pages/Login.jsx - Registration
frontend/src/pages/Register.jsx - Route guard
frontend/src/components/ProtectedRoute.jsx - Profile
frontend/src/pages/Profile.jsx
Donation lifecycle
- Donor dashboard
frontend/src/pages/DonorDashboard.jsx - Organization dashboard
frontend/src/pages/OrgDashboard.jsx
API and persistence
- HTTP API
backend/src/app.js - Token protection
backend/src/middleware/auth.js - Password and tokens
backend/src/utils/auth.js - Request validation
backend/src/middleware/validation.js - User records
backend/src/models/User.js - Donation records
backend/src/models/Donation.js - Contact records
backend/src/models/Contact.js - MongoDB connection
backend/src/db.js
Other components
- Visitor
Connections 36
- Visitor → App routing: opens
frontend/src/App.jsx - App routing → Navigation: renders
frontend/src/App.jsx - App routing → Public information: routes to
frontend/src/App.jsx - App routing → Partner directory: routes to
frontend/src/App.jsx - App routing → Food safety: routes to
frontend/src/App.jsx - App routing → Contact form: routes to
frontend/src/App.jsx - App routing → Chatbot: renders
frontend/src/App.jsx - App routing → Auth state: provides
frontend/src/App.jsx - App routing → Route guard: protects routes
frontend/src/App.jsx - App routing → Login: routes to
frontend/src/App.jsx - App routing → Registration: routes to
frontend/src/App.jsx - App routing → Donor dashboard: routes to
frontend/src/App.jsx - App routing → Organization dashboard: routes to
frontend/src/App.jsx - App routing → Profile: routes to
frontend/src/App.jsx - Navigation → Auth state: reads
frontend/src/components/Nav.jsx - Login → Auth state: uses
frontend/src/pages/Login.jsx - Route guard → Auth state: checks
frontend/src/components/ProtectedRoute.jsx - Profile → Auth state: uses
frontend/src/pages/Profile.jsx - Registration → HTTP API: submits
- Login → HTTP API: authenticates
- Donor dashboard → Auth state: reads
frontend/src/pages/DonorDashboard.jsx - Donor dashboard → HTTP API: requests donations
frontend/src/pages/DonorDashboard.jsx - Organization dashboard → Auth state: reads
frontend/src/pages/OrgDashboard.jsx - Organization dashboard → HTTP API: updates donations
frontend/src/pages/OrgDashboard.jsx - Contact form → HTTP API: submits
- Chatbot → HTTP API: asks
- HTTP API → Token protection: protects routes
backend/src/app.js - HTTP API → Request validation: validates requests
backend/src/app.js - HTTP API → Password and tokens: hashes and signs
backend/src/app.js - HTTP API → User records: reads and writes
backend/src/app.js - HTTP API → Donation records: reads and writes
backend/src/app.js - HTTP API → Contact records: creates
backend/src/app.js - HTTP API → MongoDB connection: connects at startup
backend/src/app.js - MongoDB connection → User records: exports model
backend/src/db.js - MongoDB connection → Donation records: exports model
backend/src/db.js - MongoDB connection → Contact records: exports model
backend/src/db.js