Inspiration

In Lahore, it's normal to see restaurants and bakeries throw away good food at closing time. At the same time, there are shelters and community kitchens nearby that never have enough. When we talked to people about why this food isn't donated, the answer wasn't that nobody cares. It's that nobody has time to figure out which NGO can take it, whether they can come before it goes bad, and whether it actually reaches anyone. We wanted to fix that coordination problem.

What it does

SharePlate AI lets a restaurant list its leftover food in a minute. They can sell it at a discount, donate it, or split it between both. For the donated part, our AI suggests which NGO should get it, based on whether the NGO accepts that type of food, how much they can take, how far away they are and whether they can arrive before the food expires. It also explains why it picked each NGO.

When the NGO comes to collect, the restaurant shows a 6 digit code and the NGO enters it, so we know the food was really handed over. After that, the NGO confirms how much they received and how many meals they served. If a pickup is about to be missed, everyone gets an alert an hour before. Admins can see every problem in one place, like missed pickups or food safety complaints, and fix them.

How we built it

We used Next.js and React for the website, Supabase (Postgres) for the database and logins, and Google Gemini for the AI. There are four types of accounts: business, NGO, customer and admin, and each one only sees and does what it should.

The matching works in two steps. First, a simple scoring formula gives each NGO a score out of 100 using food type, capacity, distance and time. We kept this part transparent on purpose, so you can see exactly why an NGO scored what it did. Then Gemini looks at the top NGOs and can change the order if it has a good reason, like choosing an NGO with a fridge for chilled food. It also writes the explanation. It is not allowed to change scores or pick an NGO that doesn't qualify. If Gemini is down, the app just uses the formula, so nothing breaks.

Challenges

Our biggest issue was the AI being slow. The first Gemini model we used was often busy and took over 20 seconds, which is too long when food is about to expire. We switched to a faster model and added a backup, and now it answers in a few seconds.

Another challenge was moving from a single-user prototype to real accounts. A lot of buttons stopped making sense. For example, a restaurant shouldn't be able to accept an offer on behalf of an NGO. We had to go through every action and decide who is allowed to do it.

We also realised that "accepted" doesn't mean "delivered". That's why we added the pickup code and the step where the NGO confirms the meals actually reached people.

What we learned

We learned that AI works best here when it helps people decide instead of deciding alone, which is why we kept the scoring visible and let the AI explain itself. We also learned that for something like food donation, trust matters as much as features. We learned a lot about working as a team of three on one codebase under a tight deadline.

What's next

We'd like to test it with a few real restaurants and NGOs in Lahore, add a map for pickups, and add SMS or WhatsApp alerts for NGOs that don't use smartphones much.

All the businesses, NGOs and numbers in our demo are made up for testing.

Built With

Share this project:

Updates

Submission history