TrayAway
About the project
Tray Away
Tagline: Photograph the leftover trays from a wedding, and nearby NGOs can pick the food up the same night.
Inspiration
Indian weddings and big events regularly cook for hundreds more guests than turn up. Most of the surplus is thrown away. That’s not because nobody wants it. It’s because there’s no quick way to say what’s left, whether it’s still safe, and who can come and get it.
What it does
- The host photographs the surplus, one dish at a time or the whole buffet in one shot.
- Gemma 4 looks at the photo. It names each dish, estimates portions, flags allergens and reads any printed date.
- Fixed safety rules, not the AI, decide whether each item can be shared and until when. They use the food category (meat, milk, rice, breads, produce), how it’s kept (hot, chilled or room temperature) and the current temperature. The rules are based on FSSAI temperature limits. The AI can suggest a shorter time limit for a dish but can never go past the cap.
- Nearby NGOs see the post first. The exact address is only shared after the host accepts a pickup request.
How we built it
- Expo / React Native app with Expo Router. The same Expo server also runs the API.
- POST /api/scan sends the photo to Gemma 4 (gemma-4-26b-a4b-it) through the Gemini API. Setting OLLAMA_URL runs the same endpoint on a local Gemma, so it works fully on open weights.
- Posts are stored in Node’s built-in SQLite. There’s no extra database to set up.
- The safety rules live in one file (src/rules.ts). The AI prompt, every screen and the share/block decision all read from it.
- Small self-check tests cover the model-reply parser, the safety rules and post validation.
Challenges
- Getting reliable structured output from one photo of a crowded buffet table.
- Keeping the AI out of the safety decision. It describes the food, and fixed rules decide whether it can be shared.
- Photos in iPhone formats and occasional Gemini 5xx errors. We convert photos to JPEG and retry failed calls.
What’s next
- Accounts and verified NGOs. Right now anyone who can reach the server can read posts, including addresses.
- Push notifications to nearby NGOs.
- Having the FSSAI rules checked by a food-safety expert.
Built with: Gemma 4, Gemini API, Ollama, Expo, React Native, TypeScript, SQLite, Node.js
Built with
gemmaclaudetypescriptreact-native
AI tools
Coded withClaude CodeClaude Haiku 5.5Claude Opus 5.5
Prize Categories Entered
- Submitted
Best Use of Gemma 4
- Submitted

Best Open-Source AI Project