Engineering
pantry.ai
- Role
- Meal planning and shopping list; co-built the kitchen wall UI
- Period
- Apr 2026
- Award
- 1st Place, Desert Dev Lab Hackathon
- Repository
- github.com/christufur/PantryAI
- Stack
- Next.js
- TypeScript
- SQLite
- Drizzle ORM
- Google Gemini API
- ZXing
Context#
Food gets thrown out because nobody remembers what is at the back of the fridge. pantry.ai photographs a pantry, identifies what is in it, tracks what is closest to expiring, and builds meal plans that use those items first.
We built it over a weekend at the Desert Dev Lab Hackathon and it took first place out of 27 teams statewide. Around twelve thousand lines, thirteen screens, sixteen API routes, in about forty-eight hours.
How it works#
A photo goes to Gemini Vision, which returns identified items; ZXing handles barcodes for packaged goods. Everything lands in SQLite through Drizzle.
Expiry dates come from two sources rather than one. When the vision model can read a printed use-by date off the packaging, the app uses it. When it cannot, the item falls back to a 59-row shelf-life table keyed by category and storage location, so refrigerated spinach and pantry rice get very different defaults. The model covers the case a lookup table cannot, and the table covers everything else.

What I built#
Three of us split the app. I owned meal planning and the shopping list, and co-built the kitchen wall, which is the main screen. Christopher Meraz built the vision pipeline and the local-produce data, 77 curated New Mexico producer swaps across 43 producers. Antonio Luna built barcode scanning, recipe generation, and the impact dashboard.
The planner reads current inventory, weights it toward whatever expires soonest, and generates a week against a stored dietary profile. I wrote the prompts and the routes behind them.

The shopping list reconciler#
The planner prompt asks Gemini to subtract what the pantry already holds before listing what to buy. It does not do that reliably, so the list gets reconciled a second time in code: strip the 28 cosmetic words that stop two ingredients matching ("fresh", "organic", "boneless"), singularize, compare head nouns, then subtract what is already on the shelf.
The reconciler only subtracts when the units match exactly. Four cups against a quantity in ounces is left alone rather than converted. That is deliberate. Under-correcting leaves a spare item on the list, which a shopper notices and ignores; a wrong conversion sends someone to the shop for something they already have.

What this shows#
The app installs as a PWA and works end to end: photograph a shelf, get an inventory with expiry dates, get a week of meals weighted toward what expires first.
The split between the model and the code is what I would reuse. Gemini proposes the plan, and the reconciler checks the arithmetic afterwards, because the arithmetic has a correct answer and the plan does not.
The vision step was never benchmarked. There is no accuracy figure for item identification, because nobody measured one inside forty-eight hours.