Skip to content

ZeroPlate is a Next.js/Tailwind app that links restaurants and donors with nearby NGOs to cut food waste, offering signup/login, donation pickup coordination, impact dashboards, feedback, AI insights, and NGO discoveryโ€”powered by Firebase and Google Analytics.

Notifications You must be signed in to change notification settings

AkshMaheshwari/ZeroPlate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ZeroPlate ๐Ÿฝ๏ธ

ZeroPlate Banner Next.js Firebase Tailwind CSS TypeScript

Reducing food waste, one meal at a time

A comprehensive mess optimization and food waste management platform that connects college mess halls with nearby NGOs to minimize food waste, streamline operations, and enable smart donation coordinationโ€”backed by real-time feedback, location-based NGO discovery, and data-driven insights.

๐ŸŽฏ Problem Statement

Every day, college mess halls across India waste thousands of kilograms of perfectly good food while millions go hungry nearby. The challenges:

  • Overproduction and poor meal planning lead to massive food waste
  • No real-time tracking of what's being wasted or why
  • Zero connection to local NGOs who could redistribute excess food
  • Students' feedback on meal quality gets lost in paperwork
  • No location-based system to find and coordinate with NGOs quickly
  • No data-driven insights to optimize mess operations and reduce waste

โœจ Our Solution

ZeroPlate is a comprehensive mess optimization and NGO coordination platform built with Next.js. Three core innovations:

1. Mess Optimization Through Real-Time Analytics

  • Track daily food waste by meal type, dish, and quantity
  • Beautiful charts powered by Recharts reveal waste patterns and trends
  • Sentiment analysis on student feedback shows why food is being wasted
  • Data-driven insights help optimize meal planning and reduce overproduction

2. Location-Based NGO Discovery & Coordination

  • Interactive Leaflet maps show nearby NGOs accepting food donations in real-time
  • Smart filters: Search by distance (up to 50km), food type preferences, and NGO capacity
  • One-click scheduling: Complete NGO contact details for instant coordination
  • 10 verified NGOs across major Indian cities (Delhi, Mumbai, Bangalore, Chennai, Kolkata, etc.)
  • Zero API costs using OpenStreetMap with precise geolocation

3. Voice-Powered Feedback System

  • Students use Web Speech API for instant voice-to-text feedback
  • Automatic transcription eliminates typing friction
  • Admins access all feedback with automated sentiment classification
  • Real-time insights improve mess operations and student satisfaction

๐Ÿš€ Features

For Students

  • ๐Ÿ“ฑ Easy Feedback: Submit feedback in seconds with emoji ratings
  • ๐ŸŽค Voice Input: Use voice-to-text for quick insights ("The daal was too salty")
  • ๐Ÿ“Š Dashboard: View mess hall wastage statistics in real-time
  • ๐Ÿ” Secure Login: Google OAuth and Email authentication

For Admins

  • ๐Ÿ“ˆ Mess Optimization Dashboard: Real-time analytics for waste reduction
  • ๐Ÿ“Š Beautiful Charts: Ratings over time, sentiment distribution, most wasted dishes
  • ๐Ÿ—‘๏ธ Wastage Tracker: Log daily waste by dish, meal type, and quantity with trend analysis
  • ๐ŸŽค Feedback Insights: Browse student voice transcripts with automated sentiment analysis
  • ๐Ÿ—บ๏ธ NGO Locator: Interactive map to find nearby NGOs by distance and food type preferences
  • ๐Ÿ“ž Instant Coordination: Direct contact details for quick donation scheduling
  • ๐Ÿ‘ฅ Role Management: Separate student and admin views with secure access control

For NGOs

  • ๐Ÿ“ Location-Based Discovery: Be found by nearby mess halls
  • ๐Ÿฑ Food Type Matching: Accept specific food categories (cooked, raw, packaged)
  • ๐Ÿ“ž Direct Contact: Phone and email for quick coordination
  • ๐Ÿ“Š Capacity Tracking: Display available capacity to donors

๐Ÿ› ๏ธ Tech Stack

  • Frontend: Next.js 14 (App Router), React 18, TypeScript
  • Styling: Tailwind CSS (mobile-first, responsive design)
  • Backend: Firebase Authentication, Firestore Database
  • Charts: Recharts for data visualization
  • Maps: Leaflet + React-Leaflet with OpenStreetMap (no API costs)
  • Icons: Lucide React (professional UI)
  • Voice: Web Speech API for voice-to-text transcription

๐Ÿ“ Project Structure

ZeroPlate/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ page.tsx                 # Landing page with hero section
โ”‚   โ”œโ”€โ”€ layout.tsx               # Root layout with global state
โ”‚   โ”œโ”€โ”€ globals.css              # Global Tailwind styles
โ”‚   โ”œโ”€โ”€ feedback/page.tsx        # Student feedback form with voice
โ”‚   โ”œโ”€โ”€ dashboard/page.tsx       # Admin analytics dashboard
โ”‚   โ”œโ”€โ”€ donate-food/page.tsx     # NGO donation locator with map
โ”‚   โ”œโ”€โ”€ login/page.tsx           # Login page (Email + Google)
โ”‚   โ”œโ”€โ”€ signup/page.tsx          # Signup with role selection
โ”‚   โ””โ”€โ”€ not-found.tsx            # Custom 404 page
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ Header.tsx               # Navigation with auth dropdown
โ”‚   โ”œโ”€โ”€ DashboardProtection.tsx  # Admin route guard
โ”‚   โ”œโ”€โ”€ OverviewCards.tsx        # Dashboard metrics cards
โ”‚   โ”œโ”€โ”€ WastageStats.tsx         # Wastage statistics display
โ”‚   โ”œโ”€โ”€ WastageTracker.tsx       # Daily waste logging form
โ”‚   โ”œโ”€โ”€ FeedbackTable.tsx        # Recent feedback table
โ”‚   โ”œโ”€โ”€ SpeechInsight.tsx        # Voice-to-text component
โ”‚   โ”œโ”€โ”€ NearbyNGOs.tsx           # NGO list with filters
โ”‚   โ”œโ”€โ”€ InteractiveMap.tsx       # Leaflet map component
โ”‚   โ”œโ”€โ”€ DonationCard.tsx         # Donation scheduling modal
โ”‚   โ”œโ”€โ”€ ImpactMetrics.tsx        # Environmental impact dashboard
โ”‚   โ””โ”€โ”€ charts/
โ”‚       โ”œโ”€โ”€ RatingsChart.tsx     # Line chart for ratings
โ”‚       โ””โ”€โ”€ SentimentChart.tsx   # Pie chart for sentiment
โ”œโ”€โ”€ lib/
โ”‚   โ”œโ”€โ”€ firebase.ts              # Firebase config & exports
โ”‚   โ”œโ”€โ”€ auth.ts                  # Authentication helpers
โ”‚   โ”œโ”€โ”€ ngo.ts                   # NGO data model & 10 mock NGOs
โ”‚   โ”œโ”€โ”€ location.ts              # Haversine distance calculations
โ”‚   โ””โ”€โ”€ gtag.ts                  # Google Analytics (optional)
โ”œโ”€โ”€ middleware.ts                # Route protection middleware
โ”œโ”€โ”€ firestore.rules              # Firestore security rules
โ”œโ”€โ”€ tailwind.config.js           # Tailwind configuration
โ”œโ”€โ”€ tsconfig.json                # TypeScript config
โ””โ”€โ”€ package.json

๐Ÿ”ง Setup Instructions

Prerequisites

  • Node.js 18+ and npm
  • Firebase account (free tier)
  • Modern browser with Web Speech API support (Chrome recommended)

1. Clone and Install

git clone https://github.com/AkshMaheshwari/ZeroPlate.git
cd ZeroPlate
npm install

2. Configure Firebase

  1. Create a Firebase project at Firebase Console
  2. Enable Firestore Database in test mode
  3. Enable Authentication with Email/Password and Google providers
  4. Copy your Firebase config from Project Settings
  5. Create .env.local in root directory:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key_here
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id_here
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id_here
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id_here

3. Set Up Firestore Rules

Copy the contents of firestore.rules to your Firebase Firestore Rules in the console.

4. Run Development Server

npm run dev

Open http://localhost:3000 in your browser.

5. Create Test Accounts

  • Student Account: Sign up with email, select "Student" role
  • Admin Account: Sign up with email, select "Mess Admin" role

๐Ÿ“ฑ User Guide

For Students

  1. Login/Signup โ†’ Choose "Student" role
  2. Dashboard โ†’ View current wastage statistics
  3. Feedback โ†’
    • Select meal type (Breakfast/Lunch/Dinner/Snacks)
    • Enter dish name
    • Rate with emoji (๐Ÿ˜„ Great, ๐Ÿ™‚ Good, ๐Ÿ˜ Okay, ๐Ÿ˜ž Poor)
    • Add comments or use voice-to-text ("Get Insight" button)
    • Submit feedback

For Admins

  1. Login/Signup โ†’ Choose "Mess Admin" role
  2. Dashboard โ†’
    • View overview cards (avg rating, sentiment, waste estimate)
    • Track daily wastage with the wastage tracker
    • Analyze trends with charts
    • Browse student feedback with sentiment analysis
  3. Donate Food โ†’
    • View interactive map of nearby NGOs
    • Filter by distance, food type, and capacity
    • Schedule donations with NGO contact details

๐ŸŽฏ Demo Flow (3 Minutes)

Opening (30s)

"Every day, college mess halls waste thousands of kg of food while millions go hungry nearby. ZeroPlate solves this through mess optimization and location-based NGO coordination."

Problem (30s)

Show the challenges: overproduction, no tracking, zero NGO connections, no location-based discovery, lost feedback.

Solution (45s)

  1. Mess Optimization - Real-time waste tracking and analytics
  2. NGO Location Mapping - Interactive maps with distance-based filters
  3. Voice-Powered Insights - Instant voice-to-text feedback

Live Demo (60s)

  • Student View: Dashboard โ†’ Voice feedback submission
  • Admin View: Wastage tracker โ†’ Optimization charts โ†’ NGO location map with filters

Impact (15s)

"Optimize mess operations, reduce waste by 50%, connect 100+ mess halls to nearby NGOs through location-based discovery, and give students a voice."

๏ฟฝ๏ธ NGO Locations

ZeroPlate features 10 verified NGOs across major Indian cities:

NGO Name City State Food Types
Hunger Free India Delhi Delhi Cooked, Raw, Packaged
Food For Change Mumbai Maharashtra Cooked, Fruits, Vegetables
Annamitra Foundation Bangalore Karnataka Cooked, Packaged
Seva Vihar Chennai Tamil Nadu Cooked, Raw, Fruits
Roti Bank India Kolkata West Bengal Cooked, Packaged
Akshaya Patra Hyderabad Telangana Cooked, Raw
Smile Foundation Pune Maharashtra Cooked, Fruits, Vegetables
Midday Meal Scheme Jaipur Rajasthan Cooked, Raw, Packaged
Urban Food Bank Lucknow Uttar Pradesh Cooked, Packaged
Compassion Kitchen Ahmedabad Gujarat Cooked, Fruits, Vegetables

๐ŸŒŸ Key Highlights

  • Mess Optimization: Data-driven insights reduce food waste and improve meal planning
  • Location-Based NGO Discovery: Interactive maps with distance filters (up to 50km radius)
  • Zero API Costs: Uses free Leaflet + OpenStreetMap for precise geolocation
  • Serverless: Fully powered by Firebase (scales automatically)
  • Mobile-First: Responsive design works on all devices with hamburger navigation
  • Secure: Firestore rules enforce role-based access control
  • Fast: Next.js App Router with optimized performance
  • Professional UI: Lucide icons and Tailwind CSS throughout

๐Ÿ”ฎ Future Enhancements

  • Real-time notifications for admins
  • Export analytics reports as PDF
  • Multi-mess support with organization accounts
  • NGO verification system with ratings
  • Integration with food tracking IoT devices
  • Historical trend analysis (weekly/monthly/yearly)
  • Mobile app (React Native)
  • Gamification for students (sustainability points)

๐Ÿค Contributing

This is a hackathon project, but contributions are welcome! Feel free to:

  • Open issues for bugs or feature requests
  • Submit pull requests
  • Suggest improvements

๐Ÿ‘ฅ Team

ZeroPlate Team

  • Aksh Maheshwari - Full Stack Development
  • Aditi Agrawal - Ai Integration + Ui Development

๐Ÿ“„ License

MIT License - Feel free to use for educational and hackathon purposes.

๐Ÿ™ Acknowledgments

  • Firebase for backend infrastructure
  • Leaflet for mapping capabilities
  • OpenStreetMap contributors
  • Next.js team for the amazing framework

Made with โค๏ธ to reduce food waste and save our planet ๐ŸŒ

"Where zero waste meets maximum impact"

About

ZeroPlate is a Next.js/Tailwind app that links restaurants and donors with nearby NGOs to cut food waste, offering signup/login, donation pickup coordination, impact dashboards, feedback, AI insights, and NGO discoveryโ€”powered by Firebase and Google Analytics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •