Store Builder as a WhatsApp-style chat: the owner's voice note of 5 Oct 2026. The step-wise Store Builder flow
(store-builder-v5), asked one question at a time by the FoodBridge Assistant, plus products read from any file, the
store summed up, and what to do next. A module of its own (modules/assistant), independent of
store-builder and customer-success. assistant-v5 — published for feedback
Serve over HTTP (a service worker stands in for the bridge and for Claude; it does not run from file://):
python3 -m http.server 8790 --directory modules/assistant/discovery. Nothing leaves the browser.
?vasu=<url> points the next actions and the tower at another copy of mock-platform v7 (default: the published one).
Start fresh: the chat's ⋯ → Start again.
Every Store Builder v5 question, in its order, one at a time; the owner's additions marked ★. Every answer lands in
Store Builder's own state (screens/sb/model.js), so the Excel the team receives is Store Builder's.
| # | Node | Asks | Answered by | Writes |
| 0 | (welcome) | He says hi → Namaste, I'm your FoodBridge Assistant | reply buttons: Onboarding: set up my store · How it works | — |
| 1 | name ★ | What's your name? | typing | store.owner |
| 2 | mobile | Your mobile number? (login) | typing (tel keypad); 10 digits, 6–9 | store.mobile → GET /api/draft |
| 2a | sync | A store is saved for this number — carry on from it? (only if one is) | buttons | the whole saved state (v5 Sync) |
| 3 | contacts | Your people — no typing | phone: Choose from contacts (the address book); computer: QR → the phone page; any: 📎 a Tally/Busy/Excel list or .vcf, or pasted rows | people, order |
| 4 | sort | Who is who? (guessed from names) | buttons Looks right / Check the list → a sheet with a radio per person (Customer · Supplier · Staff · Not needed) | people[].type |
| 5 | type (+ typeOther) | What is your business? | radio list (WhatsApp list), or typed / a number | store.type |
| 6 | warehouses | How many warehouses (godowns)? | dropdown, or typed | store.warehouses |
| 7 | gst | GST number? (optional) | typing (checked), or I'll add it later | store.gst |
| 8–10 | routes, selfOrder, partPay | Fixed route days? Customers order on the phone? Pay a bill in parts? | Yes / No buttons, or haan / nahi | rules.* |
| 11 | payMethods (+ payOther) | How do customers pay you? | ticks + Done, or typed “cash, UPI” | rules.payMethods |
| 12–13 | returns, morning (+ Other) | Damaged goods come back… / First thing each morning | radio lists | rules.returns, rules.morning |
| 14 | note | Anything else about your day? | typing, or Nothing more | rules.note |
| 15 | products ★ | Send anything — rate list, photo, Tally export | 📎 → POST /api/extract (Claude; stand-in here) → the rows shown back → Add all / Check them (an editable form) | items, customItems, companies; the file kept as raw/ |
| 16 | files | Anything on paper — khata, route chart, bills? | 📎, or photos from the phone (QR on a computer) | papers (to the team as they came) |
| 17 | summary ★ | Here's your store (a card + the facts worded) | Create my store / Change something (a list of sections → back here) | — |
| 18 | done ★ | ✅ Your store is created — sent to the FoodBridge team | if ≥ 1 customer and ≥ 1 product: what next (below); else Add customers / Add products | the build (POST /api/stores) |
| # | Decision (owner, 5 Oct 2026) | Here | Feeds |
| D1 | Create my store still sends the build to the customer success team; the next actions open over the Vasu demo | build = Store Builder's (sb/outbox.js); next actions → mock-platform v7 | SSOT-5, SSOT-7 |
| D2 | A page of its own that opens on hi; the Control Tower's assistant is the same chat in a panel | chat.html, tower.html — one engine, one conversation | SSOT-3, SSOT-4 |
| D3 | The Claude API key is tech debt | TD-1 below; the contract is claude/extract-products.md | SSOT-7 |
| D4 | A simple campaign now: pick customers, a WhatsApp message, held in the outbox | cmp.* nodes; sent.html outbox | SSOT-1, SSOT-5 |
| D5 | A new module in the module repo, not part of store-builder; discovery first, development after the freeze | modules/assistant; Store Builder code is copied, never linked | parent addendum-009 |
| # | What | Now |
| v2 | The desktop as WhatsApp Web (owner, 5 Oct 2026: “enterprise grade”) | at 900 px and wider: the chat list (the Assistant; FoodBridge Team = his store as FoodBridge received it, and Outbox = his held campaigns — only once his mobile has one), a light header, the conversation edge to edge, a flat message bar, centred dialogs, the store-setup drawer (ⓘ). v3: nothing without a job — no rail, search, filters or decorations. Narrower: the phone layout, unchanged |
| TD-1 | Claude is not called (no API key) | spreadsheets are read by the stand-in for real; photos/PDFs come back “can't read yet — kept for the team” + a labelled sample read; the summary is a template |
| TD-2 | No WhatsApp sender | campaigns are held in this browser's outbox (as the Control Tower's reminders are) |
| Q-1 | Hindi | Store Builder is bilingual; the chat is English in v1 (it understands typed Hinglish: haan, nahi, paisa, udhaar…). Ask the owner before adding हिंदी |
| Q-2 | Products and Warehouse stock are hidden in Store Builder (1 Oct 2026) | the owner asked for products again, so they are asked here; warehouse stock stays out |
| Files | Copied from | Changed |
screens/sb/ (model, catalogue, export, import, outbox, icons, gcontacts, send/, vendor/qrcode) | store-builder-v5 prototype (frozen) | only outbox.js's IndexedDB names (fb-assistant-sb*), so the two modules never share data |
discovery-bridge.js | store-builder-v5's stand-in bridge | own cache; the picker serves sb/send/; + /api/extract |
screens/chat/shell.css, mascot/ | mock-platform v7 Control Tower assistant @ 2a7ead3 | none (widgets.css adds to it) |
screens/chat/tower-brain.js | mock-platform v7 assets/ct/chat.js @ 2a7ead3 | + Production; local rupees(); hands unknown words back (marked in the file) |
seed-data/tower-snapshot.json | the live v7 Control Tower (Vasu Foods), 5 Oct 2026 | 6 rows a tile, 8 events a day |