# Bodega simulation — one-stop scorecard for ZES-QRE

Role-play: **Corner bodega** (deli fridge + dry goods + lottery traffic), one owner, two part-time cashiers, one backroom PC with a label printer. Goal: decide if ZES-QRE replaces “Square + Excel + handwritten dates + Instagram recipes.”

Also see Fortune-50 limits context in [`ENTERPRISE-RETAIL-SIMULATION.md`](./ENTERPRISE-RETAIL-SIMULATION.md).

---

## Day-in-the-life (acted)

| Moment | Job | Module | Result |
|---|---|---|---|
| 6:45 | Receive milk + prepared foods | Incoming Storage → Storage | Qty up; **still must set best-before on SKU or reprint QR with ExpDat** |
| 7:00 | Print shelf QR for yogurt lot | QR Labels / Storage preview | ExpDat auto-selected when expiry exists |
| 7:10 | Publish “overnight oats” tip | Product Studio → Recipes | Lives on page; no reprint needed |
| 8:00 | Open register | Checkout + PIN shift | Scan / cash / card |
| 11:30 | Customer scans yogurt QR | `product.html` | Sees **Best before** + **recipes** (decoder fixed) |
| 14:00 | Staff Expiry Check with shelf QR | Storage → Expiry Check | Parses full URL; shows batch ExpDat |
| 18:00 | Scan nearly-expired item at POS | Checkout | Warns ≤2 days; confirms if past date |
| 21:00 | Spoilage write-off | Storage → Waste | Ledger + Dashboard waste KPI |

---

## Experience rating (bodega owner lens)

| Area | Score | Notes |
|---|---|---|
| POS speed (scan → cash) | **8.5 / 10** | Shift lock is serious; fine for compliance, slight friction vs Square Go |
| Shelf QR → phone story | **9 / 10** after fixes | Recipes + ExpDat now actually apply on the public page |
| Perishable control | **9 / 10** | Lot/FIFO on receive + sell; SKU expiry syncs to earliest lot; QR ExpDat override; unlimited places |
| Waste / spoilage | **9 / 10** | Manual waste + **Sweep expired lots** into waste ledger (Dashboard KPI) |
| Supplier EDI / BOPIS | **6 / 10** for bodega | Overkill for most corners; unused tiles are skippable |
| One-stop vs tool sprawl | **8.5 / 10** | Can drop Square+Excel+sticky-notes for this shop size |
| **Overall bodega fit** | **9 / 10** | Yes as the daily OS — 730-day sim clears FIFO, auto-waste, and BOPIS hold leaks |

---

## Problems found → fixes in this iteration

| # | Gripe | Fix |
|---|---|---|
| P1 | Customer QR ignored `ExpDat` | Load `qr-payload-builder.js` on `product.html` |
| P2 | Expiry Check / POS choked on full QR URLs | `QrPayloadBuilder.parseScanCode` in Storage + Checkout |
| P3 | Empty “Best before” / empty recipes looked broken | Prune empty sections in `ProductExperience.renderTemplate` |
| P4 | Allergens on QR stayed hidden (visibility gate) | URL-encoded fields force customer visibility |
| P5 | Easy to print perishable QR without ExpDat | Auto-select `__expiry__` + auto-check “link custom data” |
| P6 | Studio Live preview omitted expiry | Live/copy URL uses `defaultSelectedFields` |
| P7 | Sold expired milk silently | POS confirm if past best-before; soft warn ≤2 days |
| P8 | Docs/FAQ used wrong expiry tags | Canonical `ExpDat` + `{{expiryDate}}` / `{{recipe_suggestions}}` |
| P9 | No lot / FIFO — wrong milk sold first | `batches[]` + Incoming Storage lot/best-before + FIFO deduct |
| P10 | Expired stock lingered without a job | Storage **Sweep expired lots** client ritual |
| P11 | BOPIS no-show holds starved available qty | Available − HELD; Release button; 48h TTL purge |

Two-year executable scorecard: [`730-DAY-SIMULATION.md`](./730-DAY-SIMULATION.md) · roadmap: [`FUTURE-OPTIMIZATION.md`](./FUTURE-OPTIMIZATION.md)

---

## Limits — can we clear them?

### Cleared or nearly cleared (product work)

| Limit | Status | Path |
|---|---|---|
| Broken QR expiry override | **Cleared** | Decoder on public page |
| Scan shelf QR into staff tools | **Cleared** | `parseScanCode` |
| Empty recipe/expiry chrome | **Cleared** | Template prune |
| Promo / BOPIS / EDI “missing forever” | **Shipped** (prior) | Mid-market complete; bodega optional |
| Lot / FIFO expiry on receive | **Cleared** | `PerishableOps` batches + Incoming Storage fields |
| Auto-waste expired stock | **Cleared** (attended stores) | Storage sweep UI; optional Cloud Function later |
| BOPIS soft-reserve leak | **Cleared** | TTL + Release + available qty math |

### Closable with more engineering (not done yet)

| Limit | Why it exists | How to get closer |
|---|---|---|
| Unattended nightly expiry job | Attended sweep covers most bodegas | Optional scheduled function — see FUTURE-OPTIMIZATION |
| Structured allergens (EU 14) | Free-text Studio blocks | Checklist field → allergen chip widget on product page |
| Multi-currency / tax packs | Single default VAT | Region packs — clearable, not philosophical |
| Named Cloudflare hostname UX | Token field exists; CF dashboard external | In-app Zero Trust wizard — clearable |

### Structural — do not promise “clear”

| Limit | Why not (honest) |
|---|---|
| Full SAP replacement | Fortune-50 financial spine is decades of FI/CO/MM; we **connect** via EDI/IDoc-lite |
| 3D planogram CAD | Different product category (Blue Yonder / DotActiv); we do **ops placement** |
| Global labor-law packs | Legal content business, not a retail OS core |
| Carrier-grade ship-from-store across 500 nodes | Needs custom allocation science + SLA contracts |

**Strategy:** Dominate the “one article number from fridge sticker → POS → phone recipe → spoilage” loop. Stay the operational soul; let SAP/ERP remain finance for enterprises that already have them.

---

## Bodega verdict

**Yes — ZES-QRE can be the one-stop app** for a serious bodega that wants branded shelf QR (recipes + best-before), real POS with shifts, waste tracking, and optional private storage — without five SaaS seats.

**Keep Excel only if** you need supplier ASN EDI with case-level GS1 logistics beyond our lot fields — day-to-day FIFO recall now lives in Storage batches.
