SavePlate
The Unacceptable Truth: The Food Waste Crisis
Created on 28th October 2025
•
SavePlate
The Unacceptable Truth: The Food Waste Crisis
The problem SavePlate solves
SavePlate is a full-stack, real-time food rescue platform built on the MERN stack. It directly tackles the massive problem of urban food waste, where restaurants are forced to discard perfectly edible surplus food daily. This creates a lose-lose situation: restaurants suffer financial losses, and potential customers miss out on affordable, high-quality meals.
Our solution is a three-sided marketplace that connects restaurants, customers, and delivery partners. Restaurants use a dedicated dashboard to post surplus meals at a heavy discount. Customers browse these deals, place orders, and track their delivery in real-time on a live map. Delivery partners get their own app featuring a Google Maps-powered heat map, which analyzes live order data to guide them to high-demand zones, optimizing their efficiency and earnings. By using Socket.IO for instant updates and MongoDB for location data, SavePlate turns food waste into a win-win-win: restaurants recover costs, customers save money, and partners earn flexibly.
Challenges we ran into
The project's initial hurdles were primarily in configuration and build-tooling. We first had to debug a broken package.json file that was missing the dev script and critical dependencies like react and vite, which prevented the server from starting. We also fixed a build error from invalid JavaScript in a component. A key challenge was configuring Tailwind CSS; the standard npx command failed, requiring a direct path, and we integrated PostCSS directly into the vite.config.js file. The most critical error was auth/api-key-not-valid, which we traced back to the .env file, solving it by adding the VITE_ prefix to all environment variables as required by Vite.
Backend logic and data flow presented the next set of challenges. We resolved a SyntaxError that crashed the server, caused by a simple import mismatch between the requireAuth function that was exported and the authMiddleware name that was being imported. The most significant architectural challenge was realizing our Order model had no location data, making delivery features impossible. This forced us to re-engineer the schema, adding a deliveryLocation field to both the Order and Restaurant models and updating our API routes to capture and save this crucial GeoJSON data.
Finally, the most complex task was converting static UI mockups into dynamic, real-time features. We integrated Socket.IO into the Express server to emit events when an order's status changed, allowing the tracking page to update live. We also built a new API endpoint to aggregate order locations for the heat map. On the frontend, this required installing the Google Maps API and socket.io-client, fetching data from our new heatmap-data endpoint, and connecting the OrderTracking component to the socket to listen for live status updates, successfully bringing the app's core features to life.
Tracks Applied (1)
Business & Entrepreneurship
Technologies used