EN-4 is a MERN (MongoDB, Express.js, React, Node.js) full-stack web application designed to connect surplus food sources with NGOs for real-time redistribution and waste reduction. The platform enables donors to list excess food, while NGOs can browse and accept donations efficiently.
- User Authentication: Secure sign-up and login system.
- Role Selection: Users register as either a Donor or an NGO.
- Food Donation: Donors can enter details such as food type, quantity, expiry date, contact information, and location.
- NGO Dashboard: NGOs can view available food donations and either Accept or Decline requests.
- Real-Time Updates: Instant updates on donation statuses.
- Integration with ML Model: Machine learning insights for optimizing food distribution.
- Frontend: React (Vite)
- Backend: Node.js, Express.js
- Database: MongoDB (Mongoose)
- Authentication: JWT (JSON Web Token)
- Deployment: Render, Vercel
- Clone the Repository
git clone https://github.com/your-username/en4.git cd en4 - Backend Setup
cd TEST1 # Backend folder npm install npm start
- Frontend Setup
cd frontend # Change to your frontend folder npm install npm run dev
- Environment Variables
- Create a
.envfile inTEST1(backend) with:MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key
- Create a
.envfile infrontend(React app) with:VITE_API_BASE_URL=http://localhost:5000
- Create a
- User Authentication
POST /api/auth/register- Register a new userPOST /api/auth/login- Login user
- Donor Actions
POST /api/donations- Create a food donationGET /api/donations- Get all donations
- NGO Actions
GET /api/donations- View available donationsPUT /api/donations/:id/accept- Accept a donationPUT /api/donations/:id/decline- Decline a donation
- Map Integration: Display real-time donation locations.
- Automated Expiry Alerts: Notify NGOs about expiring food.
- Chat System: Real-time communication between donors and NGOs.
- AI-Based Matching: Improve food distribution efficiency using ML.
This project is licensed under the MIT License.
Feel free to contribute and make a difference in reducing food waste!