detail
WHAT IT IS: Single-file HTML/JS dough calculator at frontend/80-Kitchen/apps/DoughCalc/index.html. Live URL: https://yttcom.net/frontend/80-Kitchen/apps/DoughCalc/index.html. Linked from Kitchen home nav grid and from the Bake Journal page.
BUILD HISTORY:
v1 (08/03/26) — Initial build: flour input drives all other ingredients via baker's percentages (hydration, salt, oil, yeast, starter %, starter hydration, malt). Pizza and Bread mode toggle buttons pre-fill ratio presets. Pan size selector shows oz/sq-in coverage guidance. Reference card lists typical loaf sizes. Dark chalkboard/bakery visual theme (JetBrains Mono for numbers, Zilla Slab display font, Inter body text). JS syntax validated with node --check before each deploy.
v2 (08/03/26) — Added: crust-style selector (thin/regular/deep-dish) paired with pan selector; 'Set flour amount for this pan' button that reverse-solves the baker's-percentage math backward from a target total dough weight to the required flour amount (derived a constant C = total dough weight per gram of flour, algebraically solved from all the ratio settings, so C = total/flour and flour = total/C). Loaf reference card rebuilt to show flour grams alongside total weight instead of just total (was confusing - total alone doesn't tell you what to weigh out).
v3 (08/03-04/26) — Added: Yeast timeline dropdown (Quick 2-3hr = 1.25%, Same day 4-6hr = 0.6%, Overnight 24-48hr = 0.25%) that auto-fills the yeast % field. Auto-behavior: zeroing the Starter field automatically switches the timeline to Overnight and sets yeast to 0.25%, since a slow cold rise is the best flavor substitute for skipping the starter. Later added two Hybrid options that set starter % AND yeast % together: Hybrid-bread (starter 15%, yeast 0.3%) and Hybrid-pizza (starter 12%, yeast 0.6%, matching recipe #23's actual ratios).
v4 (08/03/26) — Added: Saved dough recipes feature. Dropdown + name field + Save button at the top of the page. Saves current flour/hydration/salt/oil/yeast/starter%/starter-hydration/malt as a JSON blob into the Kitchen items table, tagged with subject prefix Dough Preset: [name] and detail prefix [DOUGHPRESET] followed by the JSON. Loads on page open via fetch() to get_items, filtered client-side by the [DOUGHPRESET] tag prefix. Selecting a saved recipe from the dropdown repopulates every field instantly. Tested with a round-trip save/load/delete before shipping to confirm the JSON survives the DB write/read intact.
v5 (08/04/26) — Changed default: page now opens in Bread/Sourdough mode instead of Pizza (75 percent hydration, no oil, no yeast, 20 percent starter, 365g flour matching the actual standard boule amount used in real bakes) since sourdough is the more established, frequently-baked recipe.
v6 (08/04/26) — Split the single shared pan/crust-style selector into two independent cards: Bread mode gets a "Dutch oven" selector (Small 4qt round ~650g target, Large 6qt oval ~950g target), Pizza mode keeps the original pan+crust-style selector. Mode switching now toggles which card is visible instead of both modes sharing one selector. "Set flour amount for this pan/oven" button logic split to match (fillFromPanPizza / fillFromPanBread), same reverse-solve math underneath.
v7 (08/04/26) — Added "Standard recipes" optgroup to the saved-recipe dropdown, ahead of the user's own saved presets. Sourdough entries (No malt / With malt) use exact baker's percentages backed out of recipe #19 (375g flour / 265g water / 100g starter / 9g salt -> 74% hydration, 27% starter, 2.1% salt). Regular (non-sourdough) entries - White sandwich loaf and Artisan overnight loaf - are standard baker's-percentage starting points, not yet tested against a real bake here.
v8 (08/04/26) — Added a big Bake Temp / Bake Time display at the top of the page, under the Total Dough Weight readout. Values are keyed per mode/standard recipe (sourdough entries pull real numbers from recipe #19: 475F lid on 20min, then 450F lid off 20-25min; regular/pizza entries are general guides flagged as not-yet-tested). Auto-updates on mode switch and standard-recipe selection.
v9 (08/04/26) — Bake time now scales with how far today's total dough weight is from each entry's reference size (sourdough referenced at 750g, matching recipe #19's actual total). Scaling is sub-linear (bigger dough needs more time, but not proportionally more) and widens the displayed range the further the current batch departs from the reference, with a note reminding to go by internal temp (205-210F) rather than the clock once the deviation passes 15%. Added a standing altitude note (always visible, not tied to any one recipe): above 5,000ft the Dutch oven floor runs hotter and bakes often run longer than the printed time at the same temp - watch color at the lid-off stage and check internal temp rather than trusting the clock, consistent with the platform's own recurring bottom-burn findings at 5,500ft.
v10 (08/04/26) — Added a standalone "Common Measurements" reference card near the bottom of the page: general kitchen conversions (cup/tbsp/tsp of flour, water, salt, sugar, oil, yeast to grams; oz and lb) with the box titled "Common measurements" at top. Static reference, not tied to the current recipe.
v11 (08/04/26) — Moved common-measurement conversions INTO the Total Dough Weight box itself, computed live for whatever's actually in the bowl right now: Flour/Water rows show a cup equivalent, Salt/Oil rows show a tbsp equivalent, next to their gram amounts (helper functions cupsEq/tbspEq, hidden below a small threshold so trace amounts don't show a meaningless "~0 cup"). Also added a recipe-name label at the top of that box (id=recipeName) showing which mode or standard/saved recipe is currently loaded - e.g. "Sourdough — No malt (recipe #19 standard)" - so the box reads as "[recipe name] → [total] → [breakdown with common measurements]" instead of just a bare number. The standalone Common Measurements card from v10 stays as-is for general reference (oz/lb, sugar, yeast-packet conversions that aren't part of any specific breakdown row).
v12 (08/04/26) — Fixed layout: common-measurement equivalents moved into their own dedicated third grid column (breakdown grid changed from 2 to 3 columns) so they line up straight down the box instead of running inline after the grams. Rounded to whole numbers first (per feedback), then refined in v13.
v13 (08/04/26) — Rounding refined to real measuring increments instead of whole numbers: cups round to the nearest 1/4, tablespoons round to the nearest 1/2 (falling back to 1/4 precision when a half-tbsp rounding would erase a small-but-real amount down to nothing). Added fracStr() to format as actual fractions (1/4, 1/2, 3/4) the way a recipe card would, not decimals.
v14 (08/04/26) — Ingredient breakdown rows now appear/disappear based on whether that ingredient is actually used in the current recipe. Flour and Water always show (every dough has them); Starter/Salt/Oil/Yeast/Malt only show when their computed gram amount is above a trivial threshold (>0.1g) - a lean sourdough with 0 oil/yeast/malt no longer shows empty "0g" rows for ingredients that don't apply. Also fixed a sourced error: the static Common Measurements card listed 1 tbsp sugar as ~12g, corrected to ~12.5g (verified against King Arthur/USDA-sourced conversion charts).
v15 (08/04/26) — Added "Sweet bread / enriched rolls" to Standard recipes: 500g flour, 55% hydration, 1.5% salt, 12% oil (standing in for butter), 1.5% yeast. Bakes 350F, 25-30min (sugar-heavy dough browns faster, flagged in the note). Important limitation: the calculator has no sugar, egg, or milk fields, so this preset only approximates a real enriched dough - it's missing the sugar % and egg content that a genuine sweet bread recipe always has. Flagged to USR369 as a real gap; a Sugar % (and possibly Egg) field would need to be added for this to be accurate rather than approximate.
v16 (08/04/26) — Added tap-to-edit on Bake Temp/Time (contenteditable, with a bakeOverridden flag to stop ingredient-field changes from silently clobbering a manual edit mid-bake) plus a new Bake Notes card (textarea + Save-to-log button, posting to the same Kitchen items table as saved presets, tagged [BAKENOTE] with recipe/temp/time context baked into the saved detail).
v17 (08/04/26) — REVERTED v16's tap-to-edit on Bake Temp/Time per USR369 feedback - those boxes go back to being calculated/read-only. The Bake Notes textarea (kept from v16) is now the sole place to record what was actually baked at what temp/time; placeholder text updated to say so explicitly. Removed the bakeOverridden flag and its event listeners/reset calls entirely - clean revert, not just hidden.
v18 (08/04/26) — Added a local-storage "remember where I left off" layer (LOCAL_STATE_KEY = doughcalc_last_state_v1), separate from the deliberate DB-backed Save buttons. Every render() call now silently persists current mode/recipe/ingredient values/pan-oven selection to localStorage; on page load, restoreLocalState() checks for a saved state first and only falls back to the Bread default if none exists. This is explicitly groundwork for USR369's stated plan to eventually package this as an installed Play Store app - the DB stays the permanent cross-device record (recipes, saved presets, bake notes), while localStorage becomes the on-device "continue where you left off" layer the way any installed app behaves. Confirmed localStorage is safe to use here (unlike Claude.ai's own artifact sandbox, which blocks it) since this is a real deployed page on USR369's own server, not a Claude-hosted artifact.
Also built and saved a standalone Python error-checker (check_doughcalc.py) that validates JS syntax (node --check), checks every getElementById() call resolves to a real id, flags duplicate ids, and checks <div> tag balance - run against every version from v15 onward before deploy, confirmed clean each time.
KEY TECHNICAL NOTES:
- All ingredient math is pure client-side JS, no server calls needed for the calculator itself - only the saved-recipes feature talks to the Kitchen items API.
- Every deploy this build went through: edit locally, extract script blocks and run node --check for syntax validation, confirm platform reachability (503/timeout outages were frequent during this build), upload via file_write_web.php, verify live with a curl fetch, then BACKUP.php to snapshot the file.
- Known real bugs found and fixed along the way: recipe add/update API needs title= not subject= for the title field (K188); Kitchen items API get_items only returns status=open by default, closed items are silently excluded (K189).
Recipe: Sourdough Bread - Thick Crust (ID:19).