FeedForward is a food donation platform built using the MERN stack, designed to bridge the gap between surplus food and those in need. The platform enables donors to share excess food, recipients to request food. QR codes and email notifications streamline the food distribution process.
username: cityadmin-demo
password: cityadmin123
username: donor-demo
password: donor123
username: recipient-demo
password: recipient123
- Admin: Assigns city admins to different cities.
- City Admin: Verifies and approves recipients who wish to join the platform.
- Donor: Posts surplus food or fulfills recipient food requests.
- Recipient: Requests available food from donors or requests food requests based on their needs.
- Once a donation is made, a QR code is generated and sent via email to the donor. The recipient must scan this QR code to mark the donation as completed.
- Donors receive alerts about recipient requests.
- Recipients are notified about available food.
- Both parties receive confirmation emails regarding donation transactions.
- Uses BullMQ to queue email notifications.
- JWT-based authentication with protected routes on both frontend and backend.
- React Query is used for efficient API calls.
- The Admin assigns a City Admin to a specific city. The platform will not be available in a city unless a City Admin has been assigned.
- Once the platform is available, both Donors and Recipients can sign up.
- The City Admin receives notifications for every recipient signup and must verify their credentials and authenticity to prevent misuse of the platform.
- Donors can either post about surplus food they have or fulfill a recipient’s food request.
- Recipients can either request food from an existing donor post or create a new food request based on their needs.
- When a donor fulfills a food request or a recipient claims available food, the donation is set to In-Progress on a First-Come, First-Served (FCFS) basis.
- Both the Donor and Recipient receive notifications with essential details regarding the donation.
- The Recipient must collect the donation from the specified location and scan the QR Code (sent to the Donor via email) to mark the donation as Completed.
In order to run this container you'll need,
- Docker installed
- Add
public/temp
folders in backend - Setup .env in both frontend and backend
# frontend
VITE_API_URL=http://localhost:5000/api/v1/ or <backend_url>
# backend
PORT=5000
MONGODB_URL=<your_mongodb_cluster_url or local_url>
CORS_ORIGIN=http://localhost:5173 or <domain_url>
ADMIN_EMAIL=<admin_email>
TOKEN_SECRET=<your_token_secret>
EMAIL_USER=<email>
EMAIL_APP_PASS=<email_app_pass>
CLOUDINARY_CLOUD_NAME=<cloudinary_cloud_name>
CLOUDINARY_API_KEY=<api_key>
CLOUDINARY_API_SECRET=<api_key_secret>
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
- Deploy frontend using AWS S3 & CloudFront
- URL:
/api/v1/users/donor-signup
- Method:
POST
- Body (form-data):
avatar: [file]
username: [string]
email: [string]
phoneNo: [string]
password: [string]
coordinates: [latitude, longitude]
address: [string]
state: [string]
city: [string]
pincode: [string]
donorType: [individual/organization]
- URL:
/api/v1/users/recipient-signup
- Method:
POST
- Body (form-data):
avatarImage: [file]
username: [string]
email: [string]
phoneNo: [string]
password: [string]
coordinates: [latitude, longitude]
address: [string]
state: [string]
city: [string]
pincode: [string]
organizationType: [string]
registrationNo: [string]
- URL:
/api/v1/users/get-user-profile
- Method:
GET
- URL:
/api/v1/users/create-city-admin
- Method:
POST
- Body (form-data):
username: [string]
email: [string]
phoneNo: [string]
password: [string]
coordinates: [latitude, longitude]
address: [string]
state: [string]
city: [string]
pincode: [string]
- URL:
/api/v1/users/login
- Method:
POST
- Body (form-data):
email: [string]
password: [string]
- URL:
/api/v1/users/get-dashboard-data
- Method:
GET
- URL:
/api/v1/users/logout
- Method:
POST
- URL:
/api/v1/cityAdmin/verify-recipient/
- Method:
PATCH
- URL:
/api/v1/cityAdmin/get-food-requests
- Method:
GET
- URL:
/api/v1/cityAdmin/get-food-posts
- Method:
GET
- URL:
/api/v1/cityAdmin/get-verification-list
- Method:
GET
- URL:
DELETE /api/v1/cityAdmin/verify-recipient/
- Method:
DELETE
- URL:
/api/v1/foodPost/add-post
- Method:
POST
- Body (form-data):
images: [file(s)]
title: [string]
description: [string]
quantity: [number]
quantityUnit: [string]
foodType: [veg/non-veg]
bestBefore: [date]
useUserLocation: [true/false]
coordinates: [latitude, longitude]
address: [string]
state: [string]
city: [string]
pincode: [string]
- URL:
/api/v1/foodPost/update-post/:postId
- Method:
PATCH
- Body (form-data):
images: [file(s)]
title: [string]
description: [string]
quantity: [number]
quantityUnit: [string]
foodType: [veg/non-veg]
bestBefore: [date]
useUserLocation: [true/false]
coordinates: [latitude, longitude]
address: [string]
state: [string]
city: [string]
pincode: [string]
- URL:
/api/v1/foodPost/delete-post/:postId
- Method:
DELETE
- URL:
/api/v1/foodPost/get-donor-posts
- Method:
GET
- URL:
/api/v1/foodPost/get-available-posts
- Method:
GET
- URL:
/api/v1/foodPost/request-food/
- Method:
POST
- Body (form-data):
title: [string]
description: [string]
quantity: [number]
quantityUnit: [string]
foodType: [veg/non-veg]
bestBefore: [date]
useUserLocation: [true/false]
coordinates: [latitude, longitude]
address: [string]
state: [string]
city: [string]
pincode: [string]
- URL:
/api/v1/foodRequest/add-request
- Method:
POST
- Body (form-data):
title: [string]
description: [string]
quantity: [number]
quantityUnit: [string]
foodType: [veg/non-veg]
requiredBy: [date]
- URL:
/api/v1/foodRequest/update-request/
- Method:
PATCH
- Body (form-data):
title: [string]
description: [string]
quantity: [number]
quantityUnit: [string]
foodType: [veg/non-veg]
requiredBy: [date]
- URL:
/api/v1/foodRequest/delete-request/:requestId
- Method:
DELETE
- URL:
/api/v1/foodRequest/get-requests
- Method:
GET
- URL:
/api/v1/foodRequest/get-recipient-requests
- Method:
GET
- URL:
/api/v1/foodRequest/fulfill-request/
- Method:
POST
- Body (form-data):
title: [string]
description: [string]
quantity: [number]
quantityUnit: [string]
foodType: [veg/non-veg]
requiredBy: [date]
- URL:
/api/v1/admin/get-city-admins
- Method:
GET
- URL:
/api/v1/admin/remove-city-admin/:id
- Method:
DELETE