How daraanjali/mealmap works
MealMap is a community food-sharing and meal-event application: visitors find nearby food and events, then can volunteer or donate; organizers manage events and donation requests through authenticated accounts. The React client routes users to these workflows and calls an Express API, whose domain controllers operate on MongoDB models. Mapping and geolocation support discovery. The README is empty, so capabilities and relationships here are grounded in the supplied source index and excerpts; unsampled modules are represented only where the index names them or the tree establishes their paths.
Main entry points: App.jsx Page routing · api.js HTTP client · MapView.jsx Map display · event.routes.js Event routes
Components 28
Client experience
- Page routing
client/src/App.jsx - Home discovery
client/src/pages/Home.jsx - Find food
client/src/pages/FindFood.jsx - Events
client/src/pages/Events.jsx - Donations
client/src/pages/Donate.jsx - Volunteering
client/src/pages/Volunteer.jsx - Organizer dashboard
client/src/pages/Dashboard.jsx - Account access
client/src/pages/Login.jsx - Event details
client/src/components/events/EventDetails.jsx - Map display
client/src/components/map/MapView.jsx - Session state
client/src/context/AuthContext.jsx
API integration
- HTTP client
client/src/utils/api.js
Server domain
- API mounting
server/src/app.js - Event routes
server/src/routes/event.routes.js - Event operations
server/src/controllers/event.controller.js - Account operations
server/src/controllers/auth.controller.js - Donation requests
server/src/controllers/donationRequest.controller.js - Volunteer operations
server/src/controllers/volunteer.controller.js - Food discovery
server/src/controllers/food.controller.js - Token guard
server/src/middlewares/auth.middleware.js
Persistence
- Event records
server/src/models/Event.model.js - User records
server/src/models/User.model.js - Donation requests
server/src/models/DonationRequest.model.js - Food locations
server/src/models/FoodLocation.model.js - MongoDB connection
server/src/config/db.js
Other components
- Community visitor
- Browser location
- OpenStreetMap tiles
Connections 29
- Community visitor → Page routing: opens
- Page routing → Home discovery: routes
client/src/App.jsx - Page routing → Find food: routes
client/src/App.jsx - Page routing → Events: routes
client/src/App.jsx - Page routing → Donations: routes
client/src/App.jsx - Page routing → Volunteering: routes
client/src/App.jsx - Page routing → Organizer dashboard: protects
client/src/App.jsx - Page routing → Account access: routes
client/src/App.jsx - Find food → HTTP client: requests data
client/src/pages/FindFood.jsx - Events → HTTP client: requests data
client/src/pages/Events.jsx - Donations → HTTP client: requests data
client/src/pages/Donate.jsx - Organizer dashboard → HTTP client: requests data
client/src/pages/Dashboard.jsx - Event details → HTTP client: deletes event
client/src/components/events/EventDetails.jsx - Event details → Map display: renders
client/src/components/events/EventDetails.jsx - Home discovery → Map display: renders
client/src/pages/Home.jsx - Map display → Browser location: reads location
client/src/components/map/MapView.jsx - Map display → OpenStreetMap tiles: loads tiles
client/src/components/map/MapView.jsx - Page routing → Session state: provides session
- HTTP client → Event routes: calls event endpoints
client/src/utils/api.js - API mounting → Event routes: mounts
server/src/app.js - API mounting → MongoDB connection: connects
server/src/app.js - Event routes → Event operations: dispatches
server/src/routes/event.routes.js - Event routes → Token guard: guards requests
server/src/routes/event.routes.js - Event operations → Event records: reads and writes
server/src/controllers/event.controller.js - Account operations → User records: reads and writes
server/src/controllers/auth.controller.js - Token guard → User records: loads user
server/src/middlewares/auth.middleware.js - Donation requests → Donation requests: reads and writes
server/src/controllers/donationRequest.controller.js - Volunteer operations → Event records: updates events
server/src/controllers/volunteer.controller.js - Food discovery → Food locations: reads food