Zarfo is an AI-powered platform that reduces food waste from hotels and restaurants by deciding whether surplus food should be sold at a discounted price or donated to NGOs and shelters before expiry. The system combines Machine Learning, dynamic pricing, and food redistribution to ensure surplus food is utilized efficiently.
Restaurants generate large amounts of surplus food daily which often goes to waste due to:
- Lack of demand prediction
- No pricing strategy for near-expiry food
- Poor coordination with donation networks
Zarfo solves this using AI-based decision making and automated redistribution.
Predicts whether food should be:
- SELL (discounted price)
- DONATE (to NGOs or shelters) based on expiry time, demand probability, quantity, and price.
Food prices automatically decrease as expiry approaches to increase chances of selling.
| Time Left | Price |
|---|---|
| 3 hours | ₹100 |
| 2 hours | ₹80 |
| 1 hour | ₹50 |
An AI agent continuously monitors items and updates decisions:
SELL → PRICE REDUCTION → DONATE
Unsold food is redirected to:
- NGOs
- Orphanages
- Old-age homes
- Food shelters
Frontend (React + Vite)
|
Node.js Express Backend
|
FastAPI ML Service
|
MongoDB Database
- Frontend: React, Vite, Tailwind CSS
- Backend: Node.js, Express.js
- AI / ML: Python, FastAPI, Scikit-learn, RandomForest Pandas, NumPy
- Database: MongoDB
Predicts whether food should be SELL or DONATE.
Inputs:
- Shelf Life
- Time Left
- Quantity
- Original Price
- Food Category
- Demand Probability
Output:
SELL or DONATE
If the item is SELL, the model predicts the optimal discounted price.
Inputs:
- Time Left
- Shelf Life
- Demand Probability
- Quantity
- Original Price
Output:
Suggested Discounted Price
life_ratio = time_left / total_shelf_life
new_price = original_price * life_ratio
Certain rules override ML predictions:
If time_left <= 2.5 hours:
decision = DONATE
- Route optimization for food donation
- Demand prediction using historical sales
- Reinforcement learning for pricing
- Mobile app for NGOs and volunteers
- Google Maps API integration
Clone repository:
git clone https://github.com/farhat-1203/zarfo.git
Backend:
cd backend
npm install
npm start
ML Service:
cd models
pip install -r requirements.txt
uvicorn main:app --reload
Frontend:
cd frontend
npm install
npm run dev