How akankshawish24-maurya/foodconnect works
FoodConnect is a role-based food donation and redistribution application. Donors list food; receivers browse available food or request smart matches; claims and volunteer pickups carry donations through delivery, with notifications and administrative oversight. Donors can also submit consumption data for demand predictions. The frontend routes users to role-specific screens, while the Express server mounts API routes backed by controllers and MongoDB models. Source excerpts confirm food, pickup, matching, notification, and admin interactions; several other controller implementations and frontend API calls were not sampled, so those links are not asserted.
Main entry points: App.jsx Frontend router · pickupController.js Pickup lifecycle · server.js API server · adminController.js Administration
Components 29
User experience
- Frontend router
frontend/src/App.jsx - Donor screens
frontend/src/pages/donor - Receiver screens
frontend/src/pages/receiver - Volunteer screens
frontend/src/pages/VolunteerPickups.jsx - Admin screens
frontend/src/pages/AdminDashboard.jsx
API workflows
- API server
backend/server.js - Food routes
backend/routes/foodRoutes.js - Pickup routes
backend/routes/pickupRoutes.js - Admin routes
backend/routes/adminRoutes.js - Demand routes
backend/routes/demandRoutes.js
Domain logic
- Food listings
backend/controllers/foodController.js - Pickup lifecycle
backend/controllers/pickupController.js - Smart matching
backend/controllers/matchingController.js - Demand prediction
backend/controllers/demandController.js - Claims
backend/controllers/claimController.js - Analytics
backend/controllers/analyticsController.js - Notifications
backend/controllers/notificationController.js - Administration
backend/controllers/adminController.js - Urgency scoring
backend/utils/urgency.js - Match scoring
backend/utils/matching.js
Persistent data
- Food listings
backend/models/foodListing.js - Pickups
backend/models/Pickup.js - Claims
backend/models/claim.js - Notifications
backend/models/Notification.js - Consumption data
backend/models/ConsumptionData.js
Other components
- Donor
- Receiver
- Volunteer
- Administrator
Connections 31
- Donor → Frontend router: uses
- Receiver → Frontend router: uses
- Volunteer → Frontend router: uses
- Administrator → Frontend router: uses
- Frontend router → Donor screens: routes to
- Frontend router → Receiver screens: routes to
- Frontend router → Volunteer screens: routes to
- Frontend router → Admin screens: routes to
- API server → Food routes: mounts
- API server → Pickup routes: mounts
- API server → Admin routes: mounts
- API server → Demand routes: mounts
- Food routes → Food listings: dispatches
- Pickup routes → Pickup lifecycle: dispatches
- Admin routes → Administration: dispatches
- Demand routes → Demand prediction: dispatches
- Food listings → Food listings: reads/writes
- Food listings → Urgency scoring: calculates
- Pickup lifecycle → Pickups: reads/writes
- Pickup lifecycle → Food listings: updates
- Pickup lifecycle → Claims: updates
- Pickup lifecycle → Notifications: creates
- Smart matching → Food listings: reads/updates
- Smart matching → Match scoring: scores
- Smart matching → Urgency scoring: calculates
- Demand prediction → Consumption data: reads/writes
- Claims → Claims: reads/writes
- Notifications → Notifications: reads/writes
- Administration → Food listings: reads
- Administration → Pickups: reads
- Administration → Claims: reads