# food.repair — full documentation food.repair is a free, zero-dependency, client-side "Kitchen Order Pipeline Repair Workbench" published by SING LLC (Wyoming ID 2026-002035528) / ZYNTHIO. Contact: corey@zynthio.ai. Canonical site: https://food.repair/ ## What the site is A deterministic diagnostic simulator for food-service order pipelines (POS → kitchen display system → expo → inventory). Visitors pick a pipeline profile and a compliance ruleset, adjust station count / daily order volume / failure rate, and receive a rule evaluation, throughput & cost projection, an SVG tradeoff chart, a ticket-schema checklist, and exportable spec receipts (JSON + SHA-256, CSV, plain text). Everything runs in the browser; there is no backend, no accounts, no analytics, no cookies. ## Page inventory - `/` — workbench wizard (4 steps: configure, evaluate, tradeoffs, export) with live progress meter, reference pipeline dataset, ticket-schema notes, methodology notes, and archive/site-map notes. - `/privacy/` — privacy policy (collects nothing). - `/terms/` — terms of use. - `/contact/` — publisher contact. - `/disclosure/` — editorial, methodology, and FTC affiliate disclosure. - `/llms.txt` — concise machine-readable summary. - `/llms-full.txt` — this file. - `/sitemap.xml`, `/robots.txt` — standard crawler files. ## Workbench architecture Static files only: - `/styles.css` — theme_11 "Terracotta Workshop Guide": bg #fbf7f4, surface #ffffff, ink #271c19, accent #c2410c, muted #6b5b53; Georgia serif headings, geometric sans body. No external fonts or CDNs. - `/js/core.mjs` — pure ES2022 domain math and datasets. Exported symbols: `DOMAIN`, `SITE_URL`, `PUBLISHER`, `CONTACT_EMAIL`, `PIPELINE_PROFILES`, `RULE_PRESETS`, `latencyPercentiles`, `p95LatencyMs`, `projectThroughput`, `evaluateProfile`, `tradeoffSeries`, `schemaChecklist`, `canonicalJson`, `csvEscape`, `toCsv`, `sha256Hex`, `buildReceipt`. - `/js/app.js` — DOM wiring, wizard tabs + progress meter, SVG chart rendering, and JSON/CSV/text export handlers. Imports `core.mjs` as an ES module; safe to import in Node >= 18 for testing. ## Datasets ### Pipeline profiles (`PIPELINE_PROFILES`, 4 entries) Each profile models order-ticket acknowledgement latency (POS → KDS → expo), not food cook time. | id | label | baseLatencyMs | jitterMs | costPerOrderUsd | peakRpmLimit | schemaMajor | allergenGate | requiresTicketId | maxTicketItems | offlineQueue | |---|---|---|---|---|---|---|---|---|---|---| | counter-pos | Counter-service POS line | 950 | 280 | 0.004 | 180 | 2 | true | true | 40 | true | | ghost-kitchen | Ghost kitchen dispatch | 1400 | 500 | 0.008 | 90 | 2 | true | true | 60 | false | | banquet-line | Banquet / catering event line | 3200 | 1400 | 0.02 | 20 | 1 | false | true | 200 | false | | delivery-relay | Delivery aggregator relay | 600 | 180 | 0.003 | 600 | 2 | false | false | 25 | true | ### Ruleset presets (`RULE_PRESETS`, 3 entries) | id | label | maxP95LatencyMs | maxCostPerOrderUsd | minPeakRpm | requiredSchemaMajor | requireAllergenGate | requireTicketId | maxTicketItems | |---|---|---|---|---|---|---|---|---| | safety-strict | Food-safety strict | 3000 | 0.01 | 50 | 2 | true | true | 80 | | service-balanced | Service balanced | 6000 | 0.03 | 15 | 1 | false | true | 250 | | speed-first | Speed-first rush | 1500 | 0.006 | 200 | 2 | false | false | 40 | ## Formulas (deterministic ES2022) - Percentiles: `p50 = baseLatencyMs`, `p95 = baseLatencyMs + 1.645 * jitterMs`, `p99 = baseLatencyMs + 2.326 * jitterMs`. - Throughput: `sustainableRpm = min(peakRpmLimit, stations * 60000 / p95)`; `effectiveRpm = sustainableRpm * (1 - failureRate)`; `utilization = sustainableRpm / peakRpmLimit` (clamped 0..1). - Cost: `monthlyCostUsd = dailyOrders * 30 * costPerOrderUsd` (linear). - Capacity: `requiredStations = ceil((dailyOrders / 1440 * p95) / 60000)`. - Evaluation: 7 checks (p95 latency, cost ceiling, peak-rate floor, schema major, allergen gate, ticket-id policy, ticket size). Score = `round2((passed / 7) * 100)`; verdict PASS iff zero failures. - Tradeoff series: stations swept 1,2,4,8,... up to `maxStations` (default 16) plus the exact max point; failure rate fixed at 0 for the series. ## Exports - JSON receipt: canonical serialization (sorted keys) of `buildReceipt(...)` plus a top-level `sha256` field = SHA-256 hex of the canonical receipt JSON. Identical inputs → byte-identical canonical JSON. - CSV: tradeoff series rows (profile, rules, stations, sustainable orders/min, utilization, monthly cost, p95 ms), RFC-4180 escaping, CRLF endings. - Text receipt: human-readable summary plus canonical JSON and hash. ## Compliance checklist (`schemaChecklist`, 7 items) Ticket schema version, order id for KDS correlation, allergen tags before station routing, `{code, message, retryable}` error triple, offline queue replay, station-routing table versioning, and no raw customer PII — 6 required, 1 recommended. ## Input guards `projectThroughput` and `tradeoffSeries` throw `RangeError` for non-finite or out-of-range numeric inputs (stations 1..512, dailyOrders 1..1e9, failureRate 0..1, maxStations 1..512). `evaluateProfile` throws `TypeError` for null/non-object profile or rules. `toCsv` throws `RangeError` on empty rows. `sha256Hex` uses `crypto.subtle` (browser + Node >= 18 global crypto). ## Domain & archive notes food.repair is an operator-owned domain (Porkbun, active) with prior Wayback captures (2021–2022) under the title "Food". This build is a clean-slate developer-tools property; legacy archive paths are reserved for future 1-to-1 semantic mapping. No local-business NAP data is published. ## Testing `test_food.mjs` (run: `node test_food.mjs`) covers core math, RangeError/TypeError guards, JSON-LD validity, required files, sitemap/llms sync, forbidden-string scans, and file existence — >= 25 assertions.