Pantry
What you have, what goes first, what to buy. Expiry is not a column here — it is the order the app works in.
Open Pantry
Status
Built and working offline: items with quantity, unit, place and expiry; a “use first” list ordered by expiry (a past
date sits at the top, which is the mechanic, not an error); a shopping list built from what is finished; bulk paste;
locked rules (allergies, Jain, no onion-garlic, Ekadashi and Navratri fasts, diabetic); and a small bundled dish index
matched strictly against the pantry.
Not built: reading ingredients from a photo (that needs an on-device vision model, which this build does not ship), and any model or key — the dish list is fixed, small and offline.
Release: Windows EXE, Android APK and Linux binary, built from this source in CI — app-latest.
Not built: reading ingredients from a photo (that needs an on-device vision model, which this build does not ship), and any model or key — the dish list is fixed, small and offline.
Release: Windows EXE, Android APK and Linux binary, built from this source in CI — app-latest.
What it does
- Orders by expiry, so what is about to go is at the top — a past date first of all.
- Builds the shopping list from what is finished, plus what you add by hand. Nothing else.
- Filters a small bundled dish index against rules you set once, and shows those rules as locked chips.
- Matches dishes strictly: an ingredient you do not have is named, never swapped for something similar.
- Says why a dish fits your rules — and says plainly that this is not a nutritional or medical judgement.
- Keeps everything on the device and exports it as Markdown.
What it will not do
- Become a recipe app. The dishes are a fixed list of twelve; nothing is generated, composed or fetched.
- Substitute a near-miss. “Tomato ketchup” in the pantry does not satisfy “tomato” — a dish you cannot cook is worse than an honest gap.
- Use a model, a key or a network. No
fetch, no endpoint, no API key; CSPconnect-src 'none'. - Reset your pantry when the saved file is unreadable. It reports it and offers an export, because an empty pantry would also empty the shopping list built from it.
When things go wrong
| Case | What happens |
|---|---|
| Bad input | An item with no name, or a quantity that is not a number, is refused with the field named. A date in the past is accepted and goes to the top of “use first”. |
| No network | Nothing changes — the inventory, the list and the dishes are on the device. |
| Storage full or unavailable | The item is not added, the failure is announced, and it does not reach the shopping list. |
| Corrupt saved state | Reported rather than reset, with an export of the unreadable file and an explicit “start an empty pantry”. |
How to run it
- Here: play/index.html, or install it from your browser's menu.
- Offline file: open
docs/play/index.htmlstraight from disk. - Tests:
node tests/self-tests.js— the spec's “done means” (past date at the top, and still there after a reload) is asserted there.