AI-powered fridge inventory app that scans your fridge with a photo and catalogs everything inside.
Pantrio is a combination of user built scaffolding and pieces of Claude Code to help tighten the loose ends. It demonstrates how quickly you can go from zero to a working, production-quality web app using AI-assisted development.
The app lets you take a photo of your fridge, upload it, and have Claude's vision model automatically identify every food item inside — categorizing each one, estimating its condition, and saving your inventory locally. From there, a dashboard gives you a breakdown of what you have and compares estimated retail prices across popular grocery stores.
- AI Fridge Scanner — drag & drop or browse to upload a fridge photo; Claude (
claude-sonnet-4-6) identifies every visible item and returns structured data - Smart Categorisation — items are tagged with a category (dairy, produce, meat, beverages, condiments, leftovers, frozen, other) and a condition (fresh, expiring soon, unknown)
- Card & List Views — toggle between a visual card grid and a compact list layout
- Edit & Delete — manually correct any item's name, quantity, category, condition, or price via an inline dialog
- Persistent Inventory — your fridge data is saved to
localStorageand survives page refreshes - Dashboard & Analytics — see at-a-glance stats (total items, fresh vs expiring, categories) and a price comparison table across Walmart, Kroger, and Whole Foods
- Dark Mode — full light/dark theme support via
next-themes
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 |
| UI Library | Chakra UI v3 |
| Styling | Emotion (CSS-in-JS) |
| AI / Vision | Anthropic SDK — claude-sonnet-4-6 |
| Theming | next-themes |
| Icons | react-icons |
| Package Manager | pnpm |
| Testing | Jest + Testing Library |
| Linting & Formatting | ESLint + Prettier |
- Node.js 18+
- pnpm
- An Anthropic API key
git clone https://github.com/your-username/pantrio.git
cd pantrio
pnpm installCreate a .env.local file in the project root:
ANTHROPIC_API_KEY=your_anthropic_api_key_hereOptionally override the prompts sent to Claude:
FRIDGE_SYSTEM_PROMPT="<example_prompt>..."
FRIDGE_USER_PROMPT="<example_prompt>..."pnpm devOpen http://localhost:3000 in your browser.
pantrio/
├── app/
│ ├── api/
│ │ └── scan-fridge/route.ts # Next.js API route — calls Claude vision API
│ ├── dashboard/page.tsx # Analytics dashboard + price comparison
│ ├── fridge/page.tsx # Fridge scanner + inventory management
│ └── layout.tsx # Root layout with Chakra + theme providers
├── components/
│ ├── Navbar.tsx # Top navigation
│ └── ui/ # Shared UI primitives (Provider, Toaster, Tooltip)
└── lib/
└── fridge.ts # Inventory types + localStorage helpers
- You upload a photo of your fridge (JPEG, PNG, or WEBP)
- The image is resized client-side (max 1568px) and base64-encoded
- It's sent to
/api/scan-fridge, which passes it to Claudeclaude-sonnet-4-6with a structured prompt - Claude returns a JSON array of every visible food item with name, quantity, category, and condition
- The inventory is saved to
localStorageand displayed on screen - Navigate to
/dashboardto see stats and estimated price comparisons across major grocery stores
- Expiry date tracking — let Claude attempt to read visible best-before dates, with manual override
- Real grocery pricing — integrate a live price API (e.g. Kroger API) to replace simulated estimates
- Recipe suggestions — use the current inventory to suggest meals via Claude
- Multi-fridge support — manage pantry, fridge, and freezer as separate inventories
- Shopping list generator — automatically flag low or expiring items and build a shopping list
- User accounts & cloud sync — replace
localStoragewith a database so inventory persists across devices - Mobile camera integration — take a photo directly in the browser on mobile rather than uploading from gallery
- Nutrition insights — estimate macros and nutritional balance of the current fridge contents
- Weekly history — track how your fridge changes over time with scan history
MIT
