A Full-Stack Sustainable Food Waste Reduction Platform
GreenPlate is a scalable, full-stack platform designed to reduce food waste by connecting surplus cafeteria food with students and staff. It combines real-time food listing, intelligent reservation systems, and behavior-driven incentives to minimize waste and improve accessibility.
Institutional cafeterias generate large amounts of food waste due to:
- Unpredictable demand
- Order cancellations & no-shows
- Lack of redistribution systems
GreenPlate solves this with a real-time surplus food marketplace + behavioral incentive system.
GreenPlate follows a modular, API-driven architecture:
GreenPlate is a full-stack web application designed to minimize food waste by connecting users with surplus food from cafeterias. It enables users to discover, reserve, and manage discounted food deals while providing staff with tools to efficiently handle surplus inventory.
GreenPlate follows a modular full-stack architecture:
- Frontend: React + Vite + TypeScript
- Backend: FastAPI (Python-based) API server
- Database & Authentication: Firestore Database & Firebase Authentication
- Containerization: Docker support
- Browse available surplus food deals
- Reserve meals at discounted prices
- View order history and status
- Create and manage food listings
- Track incoming reservations
- Manage food distribution workflow
- REST API communication between frontend and backend
- Firebase integration for authentication and storage
- Responsive UI optimized for mobile devices
⚠️ Note: Some advanced features (AI analysis, map view, carbon tracking) may be incomplete or under development.
GreenPlate/
├── backend/ # Python backend
│ ├── app/ # Core backend logic
│ ├── main.py # Entry point
│ ├── requirements.txt # Python dependencies
│ └── README.md
│
├── frontend/ # User-facing React app
│ ├── Pages/ # Page components
│ ├── Layouts/ # Layout wrappers
│ ├── context/ # Global state management
│ ├── assets/ # Static assets
│ ├── package.json
│ └── vite.config.ts
│
├── admin-dashboard/ # Admin/staff interface
│
├── Dockerfile # Docker configuration
├── compose.yaml # Multi-container setup
└── README.md
- Node.js (v18+ recommended)
- Python (v3.8+)
- npm or yarn
- Git
git clone https://github.com/AkibDa/GreenPlate.git
cd GreenPlatecd backend
pip install -r requirements.txt
python main.py👉 Backend will run at:
http://localhost:8080
Clients (Web + Mobile)
│
▼
Frontend (React + Vite + TypeScript)
│
▼
Backend API (Python)
│
▼
Firebase (Auth + Firestore + Storage)
- Separation of concerns (Frontend / Backend / Admin)
- Scalable authentication via Firebase
- Backend-controlled business logic
- Mobile-first UI design
- Extensible for AI & analytics
Handles all user interactions.
Features:
- Browse surplus food deals
- Reserve discounted meals
- Track orders & history
- View cafeteria locations (Map view)
- Authentication & onboarding
Platform control layer for administrators.
Features:
- Manage food stalls
- Manage student/user data
- Domain-based access control
- Monitor platform activity
- Role-based authentication
Central business logic layer.
Responsibilities:
- Handle food listings & reservations
- Process EcoPoints logic
- Detect waste & trigger resale
- Manage demand control system
- Communicate with Firebase
A behavior-based reward system designed to reduce food waste.
| Action | EcoPoints |
|---|---|
| Order completed successfully | ➕ +10 |
| Accepts “Rescue Meal” (delayed food) | ➕ +20 |
| Early cancellation | 0 |
| Late cancellation / no-show | ➖ -15 |
| Repeated no-shows | Additional penalties |
- Early access to high-demand items
- Exclusive discounts
- Priority in reservation queue
- Lower reservation priority
- Limited access to premium deals
- Possible temporary restrictions
Prevents food from being discarded.
-
Backend detects:
- Delayed orders OR unclaimed food
-
Food is re-listed as:
- 🔖 “Rescue Meal”
- Discounted price
-
Buyers who purchase:
- Receive bonus EcoPoints
Handles high-demand scenarios for limited food items.
-
Real-time demand tracking via backend
-
Queue-based reservation system
-
Priority based on:
- EcoPoints score
- User reliability (cancellation history)
👉 Ensures fair distribution and prevents system abuse.
System continuously analyzes:
- Order patterns
- Cancellation behavior
- Peak demand times
- Waste trends
- Better recommendations
- Smart deal prioritization
- Future AI-based predictions
- React 18 / 19
- TypeScript
- Vite
- Tailwind CSS
- Framer Motion
- Axios
- React + Vite
- Tailwind CSS
- Firebase Authentication
- Context API
- Python (REST API)
- Firebase (Auth, Firestore, Storage)
- Google Gemini (optional AI features)
- Razorpay (optional payments)
- Docker
cd frontend
npm install
npm run dev👉 Frontend will run at:
GreenPlate/
│
├── backend/ # Python API server
│ ├── app/
│ ├── main.py
│ └── requirements.txt
│
├── frontend/ # User application
│ ├── Pages/
│ ├── Layouts/
│ ├── context/
│ ├── assets/
│ └── services/
│
├── admin-dashboard/ # Admin panel
│ ├── components/
│ ├── pages/
│ ├── services/
│ └── context/
│
├── Dockerfile
├── compose.yaml
└── README.md
git clone https://github.com/AkibDa/GreenPlate.git
cd GreenPlatecd backend
pip install -r requirements.txt
python main.pyRuns on:
http://localhost:8080
cd frontend
http://localhost:8000cd admin-dashboard
npm install
npm run devRuns on:
http://localhost:5173
cd admin-dashboard
npm install
npm run devCreate a .env file inside the frontend directory:
VITE_API_URL=http://localhost:8080
VITE_FIREBASE_API_KEY=
VITE_FIREBASE_AUTH_DOMAIN=
VITE_FIREBASE_PROJECT_ID=
VITE_FIREBASE_STORAGE_BUCKET=
VITE_FIREBASE_MESSAGING_SENDER_ID=
VITE_FIREBASE_APP_ID=
# Optional
VITE_API_KEY=
VITE_RAZORPAY_KEY_ID=npm install @capacitor/core @capacitor/cli
npx cap init
npx cap add android
npm run build
npx cap sync
npx cap open androidlocalhost for mobile testing.
docker-compose up --buildUser → Frontend → Backend API → Firebase
↓
Response → UI
- Firebase handles authentication securely
- Sensitive data via environment variables
- Role-based access control (admin)
- Backend validation required (partial) VITE_FIREBASE_API_KEY=your_api_key VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id VITE_FIREBASE_APP_ID=your_app_id
> ⚠️ Never commit `.env` files to version control.
Run the entire project using Docker:
docker compose up --buildnpm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm run type-check # TypeScript validation-
Missing static assets (
vite.svg,react.svg) -
Backend not fully production-ready
-
Some features partially implemented:
- AI analysis
- Carbon tracking
-
Admin student module incomplete
- AI-based food waste prediction
- Real-time notifications (WebSockets)
- Advanced queue optimization
- Full payment integration
- CI/CD deployment pipeline
- Some static assets (e.g.,
react.svg,vite.svg) may be missing - Firebase setup is required manually
- Backend API endpoints may require additional configuration
- Certain features may be incomplete
- Do not expose API keys publicly
- Use environment variables for all sensitive configurations
- Validate all user inputs on backend
git checkout -b feature/your-feature
git commit -m "feat: add feature"
git push origin feature/your-featureOpen a Pull Request.
-
Fork the repository
-
Create a feature branch
git checkout -b feature/your-feature
-
Commit changes
-
Push to your fork
-
Open a Pull Request
To build a sustainable food ecosystem where surplus food is efficiently redistributed using technology and behavioral incentives.
Now this is actually solid.
Before:
- Disconnected features
- No system thinking
Now:
- Clear architecture
- Real incentive model
- Scalable logic
Still missing (don’t ignore this):
- Deployment (this is BIG)
- API documentation
- Backend structure cleanup This project is licensed under the terms specified in the LICENSE file.
GreenPlate aims to reduce food waste and promote sustainability by leveraging technology to connect surplus food with people who need it.