The Cafe Waste Insight System is a full-stack web application that helps cafe administrators track food preparation, consumption, and waste in real time — boosting operational efficiency, reducing costs, and supporting sustainability through one easy-to-use platform.
- Only one admin login is supported.
- Features:
- Secure login/logout functionality.
- Reset password option.
- Auth handled with JWT stored in cookies.
The dashboard is the heart of the system, offering multiple data visualizations and controls.
- Input form to add or update dish records.
- Captures:
- Dish name
- Quantity
- Whether it’s Prepared or Consumed
- Displays data for the current day by default.
- Features:
- Bar graph: Total Prepared, Consumed, and Wasted quantities.
- Pie chart per dish: Insightful visualization of waste per item.
- Smart Suggestions based on trends.
- WhatsApp alert: Sends to the admin if waste exceeds a set threshold using Twilio API.
- Input a specific date to view insights.
- Visuals:
- Bar graph: Daily prep, cons, and waste.
- Pie chart per dish
- Suggestions with a dedicated button.
- Aggregates data from Sunday to Saturday.
- Visuals:
- Bar graph: Weekly overview of prep, cons, and waste.
- Pie chart per dish
- Suggestions with a button.
- Node.js
- Express.js
- MongoDB (Mongoose)
- JWT (JSON Web Token) for authentication
- Twilio API (for WhatsApp alerting)
- React.js
- Tailwind CSS
- Chart.js
- DaisyUI
git clone https://github.com/Dev-CodeBox/Cafe-Waste-Insight-System.git
cd cafe-waste-insightcd backend
npm install
npm run devcd frontend
npm install
npm startSetup .env in the backend with:
JWT_SECRET=your_secret_key
MONGO_URI=your_mongodb_connection_string
TWILIO_ACCOUNT_SID=your_twilio_sid
TWILIO_AUTH_TOKEN=your_twilio_auth
TWILIO_PHONE=your_twilio_number
ADMIN_PHONE=admin_whatsapp_numberWhenever waste exceeds a specific threshold, the system:
- Automatically sends a WhatsApp alert to the admin
- Helps reduce food waste and improve decision-making
Pull requests are welcome. For major changes, please open an issue first.


