How tanvir-hannan-anik/foodbridge works
FoodBridge is a Dhaka surplus-food platform connecting donors, NGOs, volunteers, and administrators. Its central workflow posts a donation, allocates it to an NGO through direct requests or system matching, dispatches a volunteer for pickup and delivery, and lets the NGO record meals served. The graph also preserves administration, maps and live location, notifications, chat integrations, reporting, and the AI assistant. The main workflow is documented in the README; several service relationships are visible in excerpts or SOURCE INDEX references. Unsampled routes and service wiring are not inferred.
Main entry points: index.ts Postgres Data · donations/service.ts Donation Lifecycle · (app) Role Portals · requests/service.ts Requests And Needs
Components 24
Role Portals
- Role Portals
src/app/(app) - Admin Controls
src/lib/admin/service.ts
Food Allocation
- Donation Lifecycle
src/lib/donations/service.ts - Requests And Needs
src/lib/requests/service.ts - Matching Allocation
src/lib/matching/service.ts - Food Safety
src/lib/safety/service.ts
Pickup Delivery
- Volunteer Dispatch
src/lib/dispatch/service.ts - Volunteer Tasks
src/lib/volunteer/service.ts - Live Location
src/lib/location/service.ts - Maps
src/components/map
Platform Services
- Session Authorization
src/lib/auth/dal.ts - Postgres Data
src/db/index.ts - Domain Schema
src/db/schema.ts
Communication Insights
- Notifications
src/lib/notifications/service.ts - Chat Integrations
src/lib/integrations/service.ts - Assistant API
src/app/api/assistant/route.ts - Assistant Workflow
src/lib/ai/graph.ts - AI Providers
src/lib/ai/provider.ts - Reports And Export
src/lib/reports
Other components
- Donor
- NGO
- Volunteer
- Admin
- Messaging Channels
Connections 35
- Donor → Role Portals: posts food
- NGO → Role Portals: requests food
- Volunteer → Role Portals: accepts tasks
- Admin → Role Portals: manages platform
- Role Portals → Session Authorization: checks identity
src/app/(app)/volunteer/tasks/[id]/image/route.ts - Role Portals → Donation Lifecycle: uses donation workflow
src/app/(app)/volunteer/tasks/[id]/image/route.ts - Donation Lifecycle → Postgres Data: reads writes
src/lib/donations/service.ts - Donation Lifecycle → Volunteer Dispatch: releases tasks
src/lib/donations/service.ts - Donation Lifecycle → Notifications: sends updates
src/lib/donations/service.ts - Requests And Needs → Matching Allocation: allocates requests
src/lib/requests/service.ts - Requests And Needs → Donation Lifecycle: notifies donors
src/lib/requests/service.ts - Requests And Needs → Postgres Data: reads writes
src/lib/requests/service.ts - Matching Allocation → Donation Lifecycle: transitions donation
src/lib/matching/service.ts - Matching Allocation → Postgres Data: reads writes
src/lib/matching/service.ts - Food Safety → Postgres Data: checks food
- Volunteer Dispatch → Postgres Data: offers tasks
src/lib/dispatch/service.ts - Volunteer Dispatch → Notifications: alerts admins
src/lib/dispatch/service.ts - Volunteer Tasks → Volunteer Dispatch: manages offers
src/lib/volunteer/service.ts - Volunteer Tasks → Donation Lifecycle: updates donation
src/lib/volunteer/service.ts - Live Location → Postgres Data: records positions
- Maps → Live Location: shows live position
- Admin Controls → Donation Lifecycle: transitions records
src/lib/admin/service.ts - Admin Controls → Postgres Data: reads writes
src/lib/admin/service.ts - Postgres Data → Domain Schema: uses tables
src/db/index.ts - Session Authorization → Postgres Data: checks account
src/lib/auth/dal.ts - Notifications → Messaging Channels: delivers optionally
- Chat Integrations → Donation Lifecycle: creates donations
src/lib/integrations/service.ts - Chat Integrations → Requests And Needs: matches needs
src/lib/integrations/service.ts - Chat Integrations → Messaging Channels: receives chat events
- Assistant API → Session Authorization: checks user
src/app/api/assistant/route.ts - Assistant API → Assistant Workflow: runs assistant
src/app/api/assistant/route.ts - Assistant Workflow → AI Providers: selects provider
src/lib/ai/graph.ts - Assistant API → Postgres Data: stores conversation
- Reports And Export → Postgres Data: queries reports
- Admin → Reports And Export: reviews exports