Inspiration
In Canada, 5 million meals are wasted per day. While 10 million people lived in food-insecure households in 2024. As you can see there exists high food waste and rising food insecurity in our cities. Traditional food donation systems are often slow, manual, and logistically complex, leading to edible food expiring before it reaches those in need. We wanted to build a real-time, data-driven solution to solve this problem.
Vendor (Restaurant) Side
Restaurants can instantly post surplus food with details like quantity, expiry, and pickup address. Using Leaflet and geolocation, our system automatically finds and displays the three closest food banks, making donation faster and more convenient than ever.
Charity (Food Bank) Side
Food banks see a live, constantly updating feed of available posts. They can claim donations with one click, making the pickup process smoother and reducing the chance that good food goes to waste.
How We Built It
We built our web app using Vite, React, and TypeScript, and integrated both the Leaflet Maps API and Google’s Gemini AI API to create a real-time, two-sided marketplace for surplus food.
The core innovation is our use of Gemini for smart logistics. For each vendor post, we send the AI the food details, expiry, and the coordinates of nearby food banks. Gemini returns instant, context-aware guidance, ridging the gap for restaurants that have never donated food before.
We also incorporated real-world food insecurity datasets to power our map’s heat layer, highlighting high-need communities so charities can prioritize their efforts.
Data Analysis
We analyzed two key datasets:
Ontario Food Insecurity by Public Health Unit (PHU)
We cleaned and filtered the dataset to focus on the 34 PHU regions that cover Ontario. We extracted each region’s food insecurity percentage and matched them to their corresponding geographic boundaries in our GeoJSON map. This allowed us to generate a color-graded heatmap that visually highlights the most food-insecure areas.
Food Bank Locations Dataset
We standardized the dataset to include name, address, latitude, and longitude. These coordinates power our nearest-food-bank calculations and allow restaurants to instantly see where their donations can make the greatest impact.
Challenges
Our main challenge was integrating real-time geolocation, map rendering, and AI responses while keeping everything fast. We also had to clean, normalize, and restructure both datasets before uploading them into BigQuery, which meant fixing formatting issues, missing coordinates, and inconsistent region names. Getting all data sources to work smoothly together in the map and AI pipelines was both complex and crucial for the final product.
What We Learned
We learned how to work with messy real-world datasets, resolve formatting problems, and build clean BigQuery tables for geospatial queries. We also gained experience combining multiple systems—maps, AI, databases—and making them operate together in a real-time, user-friendly workflow.
Built With
- ai
- gemini
- leaflet.js
- node.js
- react
- tailwind-css
- typescript
- vite
Log in or sign up for Devpost to join the conversation.