cd /news/artificial-intelligence/pantrybridge · home topics artificial-intelligence article
[ARTICLE · art-121531] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Pantrybridge

A developer built PantryBridge, an AI-powered food donation toolkit that uses Google's Gemini to analyze photos of pantry shelves, identify items, and generate recipes, kindness notes, and printable donation manifests. The app, created for the DEV Weekend Challenge: Generosity Edition, also connects users to real food banks via Feeding America's locator and gracefully falls back to mock data without an API key.

read5 min views1 publishedSep 7, 2026

This is a submission for Weekend Challenge: Generosity Edition

I wanted to build something for this challenge that didn't just talk about generosity but actually meant something, and felt beneficial. This tool can make it easier to go from "I have food to donate" to "I'm donating food".

You take a picture of your pantry shelf, Gemini figures out what's actually in it, and the app turns that into a recipe for whoever receives it, a handwritten-style note of kindness, a real way to find a food bank near you, and a printable manifest to hand over at drop-off.

PantryBridge is a small AI-powered toolkit for food donation. The flow is:

Upload a photo (or pick one of three one-click sample hauls if you don't have a pantry photo handy). Gemini does multimodal image analysis and returns a structured inventory: item names, categories, estimated quantities, dietary tags, urgency, and packaging condition.

(Sorry, GIPHY messed up my gif)

Everything shows up in a clean table with donation-readiness stats and a volunteer tip generated specifically for that haul. (If you need to, you can delete or add items!)

Enter your zip code and the app confirms your city/state (via a real geocoding lookup) and links you straight to Feeding America's actual food bank locator, so you're finding a real place to donate, not a mock one.

Gemini writes a short recipe using mostly what you're donating, plus a genuinely warm, non-patronizing note to include with the box.

A little printable card with the itemized contents and a mock barcode/QR for quick intake logging, with confetti when you pledge or print.

If you'd rather run it yourself:

git clone https://github.com/780s/pantrybridge.git
cd pantrybridge
npm install
npm run dev

Drop a GEMINI_API_KEY into .env.local to hit the real Gemini API. Without one, every route quietly falls back to realistic mock data instead of erroring out, so the app is never actually broken, it's just running on canned data until you add a key.

AI-powered food donation and mutual-aid toolkit built for the DEV Weekend Challenge: Generosity Edition (Best Use of Google AI).

Snap a photo of your pantry shelf and PantryBridge uses Gemini to detect items, match them against local food bank shortages, generate a family recipe from the donated staples, write a heartfelt kindness note, and produce a printable donation manifest.

npm install
npm run dev

Open http://localhost:3000.

Add your key to .env.local:

GEMINI_API_KEY=your_gemini_api_key_here

Without a key, both API routes (/api/analyze-pantry, /api/generate-kit) gracefully fall back to realistic mock data, so the app is always fully demoable.

src/app/api/analyze-pantry — multimodal pantry photo analysis (Gemini 3.6 Flash)src/app/api/generate-kit — recipe + kindness note generationsrc/components — UI building blocks (up, inventory table, matcher, recipe/kindness cards, printable manifest)src/lib — Gemini client, mock data/fallbacks, food-bank matching logic It's a Next.js 16 (App Router) app with Tailwind v4 and shadcn/ui, talking to Gemini through @google/generative-ai.

A few decisions I'm actually proud of, past the obvious "call Gemini with a prompt" version:

The vision prompt is opinionated, not just "list the items."

Early on, Gemini would miss stacked items, double-count identical products, or slap dietary tags on things it couldn't actually justify. I rewrote the prompt as an explicit rulebook: scan the whole frame including backgrounds, group identical products into one entry with an accurate count instead of five duplicate rows, only tag something "Gluten-Free" if the packaging says so or it's an unambiguous fact about that exact product, and never invent an item that isn't visible. I also switched to Gemini's structured responseSchema instead of just asking nicely for JSON, so the output is actually guaranteed to match the app's types instead of occasionally almost matching them.

The food bank feature used to be fake, and I fixed that.

My first pass had three made-up local food banks with made-up addresses and a distance calculator that computed real mileage to those fictional places. It looked great in a demo and was completely wrong. I ripped it out and replaced it with something smaller but honest: a real zip-code geocode (via a free public API) to confirm your city, and a direct link to Feeding America's actual food bank locator. Less flashy, but it doesn't quietly lie to anyone who actually tries to use it.

Nothing is allowed to hard-fail during a demo.

Both Gemini routes fall back to curated mock data if the API key is missing or a call errors out, so judges (or anyone without a key) never hit a broken screen. The three sample pantry photos resolve to hand-written mock analyses instantly rather than round-tripping through the model, which makes the one-click demo path fast and consistent.

The UI went through a real design pass, not just "add Tailwind classes."

I migrated the hand-rolled components over to shadcn/ui, then deliberately stripped out the stuff that makes modern websites look the same: sparkle icons, gradient-filled icon boxes, numbered circle badges, bouncy hover animations on things that aren't even clickable. What's left is flatter, quieter, and has an actual typographic hierarchy (Space Grotesk for headings, Inter for body, a handwritten font just for the kindness note).

Deployment took a couple of tries.

This has three server-side API routes calling Gemini and a geocoding API, so it needed somewhere that actually runs a Node server, not a static host. It landed on Railway: connect the repo, add the env var, done.

I am submitting to the Best Use of Google AI subcategory.

Gemini does two distinct jobs here: multimodal vision (reading a photo and returning structured, schema-validated inventory data) and creative generation (the recipe and the kindness note), both through the same API key with no other AI provider involved.

(...and no, this post was not written by AI)

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @pantrybridge 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/pantrybridge] indexed:0 read:5min 2026-09-07 ·