Skip to content

Repository files navigation

PANTRY.EXE

A Windows desktop app (Electron) for running a home kitchen: a recipe library, a weekly meal planner, grocery inventory across fridge / freezer / pantry, a shopping list, and a receipt scanner. Neon-terminal UI, imported from Claude Design (digidelic Design System → ui_kits/pantry), wired to a real persistent backend.

library view

What it does

  • Library — browse/search recipes; each card shows whether you can make it now from current stock, or how many ingredients are missing.
  • Planner — a 7-day dinner plan with a diet filter (vegetarian / ≤30 min / use what I have) and one-click auto-build week.
  • Inventory — every ingredient by location, staple vs. not, in-stock vs. out. Toggle stock with a click.
  • Shopping — a list grouped by aisle. Check items off and restock → inventory in one move. Missing ingredients flow here straight from a recipe.
  • Cook it — cooking a recipe deducts its non-staple ingredients from stock.
  • Receipt scanner — a simulated OCR pass over a receipt fixture; matched line items restock inventory.

Everything persists between launches.

Architecture

No build step for the UI — it's the imported React (via Babel-in-browser), kept faithful to the design export. The "backend" is the Electron main process.

electron/
  main.js         # frameless window + loopback static server + IPC handlers (the backend)
  preload.js      # contextBridge → window.api (IPC, contextIsolation on)
  store.js        # JSON persistence in app.getPath('userData')/pantry-db.json
renderer/
  index.html      # imported shell; loads vendored React/Babel (offline) + the scripts below
  data.js         # imported seed (dual-runtime: window.PANTRY in browser, module.exports in Node)
  ui.jsx          # imported design-system components (Btn, Panel, Tag, Toggle, …)
  views-a.jsx     # imported: Library, RecipeDetail, RecipeForm
  views-b.jsx     # imported: Inventory, Shopping, Planner, Scanner
  app.jsx         # App shell, rewired so all state round-trips through window.api
  pantry-core.js  # domain logic (cook / restock / plan / …) — UMD, shared by main & browser
  web-shim.js     # browser fallback for window.api (localStorage) so the UI runs sans Electron
  vendor/         # react, react-dom, @babel/standalone (vendored for offline use)
scripts/
  test-core.js    # backend logic smoke tests (plain Node)
  serve.js        # static server for a browser preview of the renderer
android/          # WebView port that reuses the renderer/ React app
android-native/   # separate Kotlin + Jetpack Compose scaffold (see its own README)

One source of truth for behavior: pantry-core.js is a pure state-transition module. The Electron main process runs it against the on-disk store; the browser fallback runs the same module against localStorage. The UI never branches on which one it's talking to.

Run

npm install          # installs Electron (downloads its binary on your machine)
npm start            # launch the desktop app

npm test             # backend domain-logic tests (no Electron needed)
npm run serve        # preview the UI in a browser at http://127.0.0.1:4173

Build a Windows executable

npm run dist         # electron-builder --win  → dist/pantry.exe (portable) + NSIS installer

build.win.target is ["nsis", "portable"] and artifactName is pantry.${ext}, so the portable build produces pantry.exe. Building the Windows target is easiest on Windows or in CI; on Linux/macOS it needs Wine.

Notes

  • Assets/fonts — the decorative ASCII/acid texture overlays and the Geist Mono font are not vendored here (they're binary assets in the design project). The app is fully functional without them; it falls back to the system monospace stack and skips the low-opacity overlays. See renderer/assets/README.md and renderer/fonts/README.md to restore the exact imported look.
  • Receipt scanner is a faithful port of the imported simulation (a fixture receipt + fake OCR progress). Wiring it to real OCR is the obvious next step.
  • android-native/ is an independent Kotlin + Jetpack Compose scaffold — not a build target of the desktop app and not sharing pantry-core.js. See android-native/README.md for its own build & run notes.

License

MIT

About

My pantry app

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages