-
b5bcaddd baseline: 3 to 7 portions, with exact fractions beside originals. Synthetic example; later fixes not shown.
-
b5bcaddd baseline: preview JSON before replacement. Later backup-size and leaving-page fixes are not shown.
-
b5bcaddd baseline: confirm before discarding recipe edits. This is not the later leaving-page warning.
-
b5bcaddd baseline: zero is rejected and the applied seven-portion sheet stays intact. Later fixes not shown.
What it does
PortionLab is a local kitchen worksheet for resizing recipes with exact fractions. Original measurements remain visible beside the scaled batch. Units are preserved as text, without density inference or conversion between mass and volume.
Set target portions, edit a separate recipe draft, undo the last applied change, and export or preview a JSON backup before replacing the recipe. Applied recipes use browser local storage when available; unfinished drafts use tab-scoped session storage. Storage failures remain visible. Keep JSON backups because browser storage and leave-warning prompts are not guaranteed.
How it is built
The app uses static HTML, CSS and JavaScript, exact BigInt rational arithmetic, and a loopback-only Node server. It has no runtime dependencies, accounts, analytics or AI API calls. OpenAI Codex assisted with design, implementation, synthetic sample text, tests and review.
Challenges and learning
Preserving the original quantity spelling, incomplete drafts and a useful Undo step mattered as much as arithmetic. Strict whole-file validation rejects malformed imports rather than guessing. The backup limit covers every valid exported recipe. The latest reviewed source requests a best-effort leaving warning for dirty drafts; browsers may suppress it.
Evaluation and limits
The v0.1.2 judge packet contains exact ec949263 source, run instructions, a synthetic example and seven labeled earlier-baseline screenshots. Source/restoration checks passed 43 Node tests, 15 simulated-DOM groups and 48 independent checks. Earlier native browser checks are separate evidence, not acceptance of every later correction. Actual native leave-warning display, broad browser/device and assistive-technology acceptance remain unverified. No nutrition, allergen, cooking-safety or unit-conversion claims are made.
Try it
Download the v0.1.2 judge packet, read START-HERE.txt, and run npm start with Node.js 22 or later. Open http://127.0.0.1:4186/. No install step is needed. Source and validation scope are in the repository.
Project work began during IdeaLab Hacks on November 4, 2026. This is an original AI-assisted prototype, with synthetic recipe fixtures.