# tanish-29005/feedinghands architecture

> Architecture diagram of the GitHub repository tanish-29005/feedinghands, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tanish-29005/feedinghands
- Repository: https://github.com/tanish-29005/feedinghands

## Overview

Feeding Hands is a food-donation coordination platform for donors, NGOs, and volunteers. Its main workflow is user access, donation creation, NGO/volunteer coordination, and donation tracking; additional product branches cover biogas donations, freshness detection, event forecasting, route optimization, and learning/rewards. The sampled runtime shows a React frontend calling an Express backend with Mongo-style models. The README instead describes Supabase and a Python AI layer; those implementation details are documented capabilities, not verified connections in the sampled source.

Main entry points: [`frontend/src/components/App.js`](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/App.js) (Web application), [`frontend/src/api/client.js`](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/api/client.js) (API client), [`frontend/src/components/Donate.js`](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/Donate.js) (Food donation), [`backend/server.js`](https://github.com/tanish-29005/feedinghands/blob/main/backend/server.js) (API server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React product"]
  node_webapp["Web application<br/>[App.js]"]
  node_access["Signup and signin<br/>[SignUp.js]"]
  node_donate["Food donation<br/>[Donate.js]"]
  node_donationstate["Donation state<br/>[DonationContext.js]"]
  node_trackingstate["Tracking state"]
  node_ngotracking["NGO tracking"]
  node_dashboards["Role dashboards"]
  node_volunteerform["Volunteer coordination<br/>[VolunteerForm.js]"]
  node_volunteermap["Volunteer map<br/>[VolunteerMap.js]"]
  node_delivery["Delivery tracking"]
  node_freshness["Freshness detection"]
  node_forecast["Event forecasting"]
  node_routing["Route optimization"]
  node_biogasui["Biogas donation<br/>[BiogasDonation.js]"]
  node_learning["Learning and rewards<br/>[LearnerCorner.js]"]
  node_api["API client<br/>[client.js]"]
end

subgraph group_backend["Express services"]
  node_server["API server<br/>[server.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_donationroutes["Donation routes<br/>[donationRoutes.js]"]
  node_bioroutes["Biogas routes<br/>[biogasRoutes.js]"]
  node_orgcontroller["Organization service"]
  node_volcontroller["Volunteer service"]
  node_authcontroller["Authentication service<br/>[authController.js]"]
  node_donationcontroller["Donation service"]
  node_biocontroller["Biogas service"]
  node_authmiddleware["Token verification<br/>[auth.js]"]
end

subgraph group_data["Backend data"]
  node_userstore[("User records<br/>[User.js]")]
  node_donationstore[("Donation records<br/>[Donation.js]")]
  node_orgstore[("Organization records<br/>[Organization.js]")]
  node_volstore[("Volunteer records<br/>[Volunteer.js]")]
  node_biostore[("Biogas records<br/>[BiogasDonation.js]")]
end

node_user(("Donor / NGO / Volunteer"))

node_user -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_access
node_webapp -->|"routes to"| node_donate
node_webapp -->|"routes to"| node_dashboards
node_webapp -->|"routes to"| node_volunteerform
node_webapp -->|"routes to"| node_volunteermap
node_webapp -->|"routes to"| node_delivery
node_webapp -->|"routes to"| node_freshness
node_webapp -->|"routes to"| node_forecast
node_webapp -->|"routes to"| node_routing
node_webapp -->|"routes to"| node_biogasui
node_webapp -->|"routes to"| node_learning
node_donate -->|"uses"| node_donationstate
node_donate -->|"uses"| node_trackingstate
node_dashboards -->|"uses"| node_trackingstate
node_delivery -->|"uses"| node_trackingstate
node_donate -->|"requests"| node_api
node_dashboards -->|"requests"| node_api
node_delivery -->|"requests"| node_api
node_access -->|"requests"| node_api
node_volunteermap -->|"requests"| node_api
node_biogasui -->|"requests"| node_api
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_donationroutes
node_server -->|"mounts"| node_bioroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_authroutes -->|"protects"| node_authmiddleware
node_donationroutes -->|"dispatches"| node_donationcontroller
node_donationroutes -->|"protects"| node_authmiddleware
node_bioroutes -->|"dispatches"| node_biocontroller
node_authcontroller -->|"reads / writes"| node_userstore
node_authcontroller -.->|"generates tokens"| node_authmiddleware
node_donationcontroller -->|"reads / writes"| node_donationstore
node_orgcontroller -->|"reads / writes"| node_orgstore
node_volcontroller -->|"reads / writes"| node_volstore
node_biocontroller -->|"reads / writes"| node_biostore

click node_webapp "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/App.js"
click node_access "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/SignUp.js"
click node_donate "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/Donate.js"
click node_donationstate "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/DonationContext.js"
click node_trackingstate "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/FoodTrackingContext.js"
click node_ngotracking "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/NgoFoodTrackingContext.js"
click node_dashboards "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/VolunteerDashboard.js"
click node_volunteerform "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/VolunteerForm.js"
click node_volunteermap "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/VolunteerMap.js"
click node_delivery "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/DeliveryTrackingPage.js"
click node_freshness "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/ImageRecognition.js"
click node_forecast "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/Event_prediction.js"
click node_routing "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/Route_Optimization.js"
click node_biogasui "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/BiogasDonation.js"
click node_learning "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/LearnerCorner.js"
click node_api "https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/api/client.js"
click node_server "https://github.com/tanish-29005/feedinghands/blob/main/backend/server.js"
click node_authroutes "https://github.com/tanish-29005/feedinghands/blob/main/backend/routes/authRoutes.js"
click node_donationroutes "https://github.com/tanish-29005/feedinghands/blob/main/backend/routes/donationRoutes.js"
click node_bioroutes "https://github.com/tanish-29005/feedinghands/blob/main/backend/routes/biogasRoutes.js"
click node_orgcontroller "https://github.com/tanish-29005/feedinghands/blob/main/backend/controllers/organizationController.js"
click node_volcontroller "https://github.com/tanish-29005/feedinghands/blob/main/backend/controllers/volunteerController.js"
click node_authcontroller "https://github.com/tanish-29005/feedinghands/blob/main/backend/controllers/authController.js"
click node_donationcontroller "https://github.com/tanish-29005/feedinghands/blob/main/backend/controllers/donationController.js"
click node_biocontroller "https://github.com/tanish-29005/feedinghands/blob/main/backend/controllers/biogasController.js"
click node_authmiddleware "https://github.com/tanish-29005/feedinghands/blob/main/backend/middleware/auth.js"
click node_userstore "https://github.com/tanish-29005/feedinghands/blob/main/backend/models/User.js"
click node_donationstore "https://github.com/tanish-29005/feedinghands/blob/main/backend/models/Donation.js"
click node_orgstore "https://github.com/tanish-29005/feedinghands/blob/main/backend/models/Organization.js"
click node_volstore "https://github.com/tanish-29005/feedinghands/blob/main/backend/models/Volunteer.js"
click node_biostore "https://github.com/tanish-29005/feedinghands/blob/main/backend/models/BiogasDonation.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_access,node_donate,node_donationstate,node_trackingstate,node_ngotracking,node_dashboards,node_volunteerform,node_volunteermap,node_delivery,node_freshness,node_forecast,node_routing,node_biogasui,node_learning,node_api toneBlue
class node_server,node_authroutes,node_donationroutes,node_bioroutes,node_orgcontroller,node_volcontroller,node_authcontroller,node_donationcontroller,node_biocontroller,node_authmiddleware toneAmber
class node_userstore,node_donationstore,node_orgstore,node_volstore,node_biostore toneMint
class node_user toneIndigo
```

## Components

### React product

- [Web application](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/App.js): `frontend/src/components/App.js`
- [Signup and signin](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/SignUp.js): `frontend/src/components/SignUp.js`
- [Food donation](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/Donate.js): `frontend/src/components/Donate.js`
- [Donation state](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/DonationContext.js): `frontend/src/components/DonationContext.js`
- [Tracking state](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/FoodTrackingContext.js): `frontend/src/components/FoodTrackingContext.js`
- [NGO tracking](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/NgoFoodTrackingContext.js): `frontend/src/components/NgoFoodTrackingContext.js`
- [Role dashboards](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/VolunteerDashboard.js): `frontend/src/components/VolunteerDashboard.js`
- [Volunteer coordination](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/VolunteerForm.js): `frontend/src/components/VolunteerForm.js`
- [Volunteer map](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/VolunteerMap.js): `frontend/src/components/VolunteerMap.js`
- [Delivery tracking](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/DeliveryTrackingPage.js): `frontend/src/components/DeliveryTrackingPage.js`
- [Freshness detection](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/ImageRecognition.js): `frontend/src/components/ImageRecognition.js`
- [Event forecasting](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/Event_prediction.js): `frontend/src/components/Event_prediction.js`
- [Route optimization](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/Route_Optimization.js): `frontend/src/components/Route_Optimization.js`
- [Biogas donation](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/BiogasDonation.js): `frontend/src/components/BiogasDonation.js`
- [Learning and rewards](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/components/LearnerCorner.js): `frontend/src/components/LearnerCorner.js`
- [API client](https://github.com/tanish-29005/feedinghands/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### Express services

- [API server](https://github.com/tanish-29005/feedinghands/blob/main/backend/server.js): `backend/server.js`
- [Auth routes](https://github.com/tanish-29005/feedinghands/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Donation routes](https://github.com/tanish-29005/feedinghands/blob/main/backend/routes/donationRoutes.js): `backend/routes/donationRoutes.js`
- [Biogas routes](https://github.com/tanish-29005/feedinghands/blob/main/backend/routes/biogasRoutes.js): `backend/routes/biogasRoutes.js`
- [Organization service](https://github.com/tanish-29005/feedinghands/blob/main/backend/controllers/organizationController.js): `backend/controllers/organizationController.js`
- [Volunteer service](https://github.com/tanish-29005/feedinghands/blob/main/backend/controllers/volunteerController.js): `backend/controllers/volunteerController.js`
- [Authentication service](https://github.com/tanish-29005/feedinghands/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Donation service](https://github.com/tanish-29005/feedinghands/blob/main/backend/controllers/donationController.js): `backend/controllers/donationController.js`
- [Biogas service](https://github.com/tanish-29005/feedinghands/blob/main/backend/controllers/biogasController.js): `backend/controllers/biogasController.js`
- [Token verification](https://github.com/tanish-29005/feedinghands/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`

### Backend data

- [User records](https://github.com/tanish-29005/feedinghands/blob/main/backend/models/User.js): `backend/models/User.js`
- [Donation records](https://github.com/tanish-29005/feedinghands/blob/main/backend/models/Donation.js): `backend/models/Donation.js`
- [Organization records](https://github.com/tanish-29005/feedinghands/blob/main/backend/models/Organization.js): `backend/models/Organization.js`
- [Volunteer records](https://github.com/tanish-29005/feedinghands/blob/main/backend/models/Volunteer.js): `backend/models/Volunteer.js`
- [Biogas records](https://github.com/tanish-29005/feedinghands/blob/main/backend/models/BiogasDonation.js): `backend/models/BiogasDonation.js`

### Other components

- **Donor / NGO / Volunteer**

## Connections

- Donor / NGO / Volunteer → Web application: uses (evidence: `frontend/src/components/App.js`)
- Web application → Signup and signin: routes to (evidence: `frontend/src/components/App.js`)
- Web application → Food donation: routes to (evidence: `frontend/src/components/App.js`)
- Web application → Role dashboards: routes to (evidence: `frontend/src/components/App.js`)
- Web application → Volunteer coordination: routes to (evidence: `frontend/src/components/App.js`)
- Web application → Volunteer map: routes to (evidence: `frontend/src/components/App.js`)
- Web application → Delivery tracking: routes to (evidence: `frontend/src/components/App.js`)
- Web application → Freshness detection: routes to (evidence: `frontend/src/components/App.js`)
- Web application → Event forecasting: routes to (evidence: `frontend/src/components/App.js`)
- Web application → Route optimization: routes to (evidence: `frontend/src/components/App.js`)
- Web application → Biogas donation: routes to (evidence: `frontend/src/components/App.js`)
- Web application → Learning and rewards: routes to (evidence: `frontend/src/components/App.js`)
- Food donation → Donation state: uses (evidence: `frontend/src/components/Donate.js`)
- Food donation → Tracking state: uses (evidence: `frontend/src/components/Donate.js`)
- Role dashboards → Tracking state: uses (evidence: `frontend/src/components/VolunteerDashboard.js`)
- Delivery tracking → Tracking state: uses (evidence: `frontend/src/components/DeliveryTrackingPage.js`)
- Food donation → API client: requests (evidence: `frontend/src/components/Donate.js`)
- Role dashboards → API client: requests (evidence: `frontend/src/components/VolunteerDashboard.js`)
- Delivery tracking → API client: requests (evidence: `frontend/src/components/DeliveryTrackingPage.js`)
- Signup and signin → API client: requests (evidence: `frontend/src/components/SignUp.js`)
- Volunteer map → API client: requests (evidence: `frontend/src/components/VolunteerMap.js`)
- Biogas donation → API client: requests (evidence: `frontend/src/components/BiogasDonation.js`)
- API server → Auth routes: mounts (evidence: `backend/server.js`)
- API server → Donation routes: mounts (evidence: `backend/server.js`)
- API server → Biogas routes: mounts (evidence: `backend/server.js`)
- Auth routes → Authentication service: dispatches (evidence: `backend/routes/authRoutes.js`)
- Auth routes → Token verification: protects (evidence: `backend/routes/authRoutes.js`)
- Donation routes → Donation service: dispatches (evidence: `backend/routes/donationRoutes.js`)
- Donation routes → Token verification: protects (evidence: `backend/routes/donationRoutes.js`)
- Biogas routes → Biogas service: dispatches (evidence: `backend/routes/biogasRoutes.js`)
- Authentication service → User records: reads / writes (evidence: `backend/controllers/authController.js`)
- Authentication service → Token verification: generates tokens
- Donation service → Donation records: reads / writes (evidence: `backend/controllers/donationController.js`)
- Organization service → Organization records: reads / writes (evidence: `backend/controllers/organizationController.js`)
- Volunteer service → Volunteer records: reads / writes (evidence: `backend/controllers/volunteerController.js`)
- Biogas service → Biogas records: reads / writes (evidence: `backend/controllers/biogasController.js`)
