Store Activation — Discovery Prototype (wiring hub)

Working copy: v1 (frozen in versions/activation-v1/) plus addenda 003–029 — the earlier chat on the store link, titles only on Getting started, and step 1 redesigned: four ways in, one flow (choose → processing → check & save) and the products sheet.

Iteration goal: can a new owner who has never seen FoodBridge get from the store link to running their business (items, customers, first order, delivery, payment, daily plan) on one page, with the floating assistant only pointing the way? Everything works end to end in this browser; progress is kept in localStorage.

▶ Start fresh (the store link on WhatsApp)

Continue where you left off

Screens

RouteScreenWhere it lives
#wa-linkThe store linkOwner's WhatsApp
#homeGetting started: a headline goal, a three-part stage tracker, and the current stage as a setup guide (the current step open with one short line and a named button)Platform (the activation page)
#productsThe platform's Products page: search, product cards, Export · Import · + Product · Bulk ActionPlatform
#itemsImport products (step 1): four ways (drop files here on a computer)Products → Import
#items-fileUpload files: the chosen files, add more, ProcessActivation page
#items-photoPhotoshoot: shutter, shot after shot (live camera or a demo shelf)Activation page
#items-galleryThe shots as a gallery: remove, shoot more, from the phone's gallery, ProcessActivation page
#items-voiceSpeak (or type) your products: name, pack, rateActivation page
#items-catalogSearch products: type, pick from FoodBridge's list and live Open Food Facts results (India, food only), ProcessActivation page
#processingProcessing, for every way: live stages, products as they are found (never blocks the next step)Activation page
#reviewCheck & save: on a phone, a plain rate list, name and rate per row (fix one question at a time, edit a line); on a computer, the Excel-like sheetActivation page
#customersStep 2: customers from phone contactsActivation page
#orderStep 3: first orderActivation page
#placedOrder placedActivation page
#deliverStep 4: deliver itActivation page
#paidStep 5: get paidActivation page
#planStep 6: daily plan on WhatsAppActivation page
#doneAll setActivation page
#dashboardThe platform's dashboard: avatar ring, profile menu, Getting started card, floating assistantPlatform
#wa-nudgeA morning nudge (links to the page, never into a step)Owner's WhatsApp
#wa-customerWhat the customer gets: invoice, payment link, PayCustomer's WhatsApp
#driverThe driver's link: DeliveredDriver's phone (a link, no app)
#wa-letgoLetting a quiet store goOwner's WhatsApp

The floating assistant (bottom-right) is on Getting started, All set and the dashboard. Tap it and ask "how do I deliver?": it answers with a pointer to the page and never runs a step.

Discovery aids

An uploaded file or photo is not read: the seed's rate list stands in for files and photos. Speaking uses the browser's own speech recognition where it has one (Chrome sends the audio to its speech service); elsewhere the mic types an example. No message is sent anywhere; WhatsApp screens show what each person would see.

One real call: Search products asks Open Food Facts (world.openfoodfacts.org, India only, food only) as you type — the search words leave the browser. Live results: Open Food Facts contributors, ODbL. If the service is busy or offline, FoodBridge's own list still answers.

The sheet works like Excel or Google Sheets: tap or click a cell, type to replace it, Enter moves down, Tab moves right, arrows move, Delete clears, Ctrl/⌘+Z undoes. On a phone, tap a cell twice to edit it in the formula bar.

Transition map (→ SSOT-1 state-machine / SSOT-5 workflow)

From screen / stateEventTo
#wa-linkOpen my store#home (0 of 6)
#homeNext step's button (always the first open, unlocked, not-waiting step)that step's screen; Add your products → #products
#productsImport (bottom bar, or the empty state's button)#items
#itemsA way's tilethat way's Choose screen (#items-file, #items-photo, #items-voice, #items-catalog)
Any Choose screenProcess …#processing · a job runs in the background
#processingthe job finishes#review (Check & save) opens by itself
#processingAdd customers meanwhile#customers · the job keeps going; when done, #home suggests "Fix n products, then save"
#reviewFix next / a one-tap fixthe next cell that needs a fix
#reviewSave n products (nothing to fix)#products · items done (any product saved); the assistant: "n products saved. Step 1 of 6 done." → Back to Getting started
#reviewSave n now, fix m later#products, as above; on #home, "n products · m to fix" links back
#customersAdd n customers#home · customers = done
#order (unlocks after items + customers)Place order#placed · order made; paid at once if cash/UPI
#placedNext: deliver it#deliver
#deliverSend to driver / Mark it delivered#home · delivery = sent / delivered
#driverDelivereddelivery = delivered; owner sees it on #home
#paidSend payment link / They paid cash#home · payment = link / cash
#wa-customerPay by UPIpayment received; owner sees it on #home
#planTurn it on#done if 6 of 6, else #home
Any pageAssistant → Open Getting started#home (the assistant never runs a step)
Any step 2–6✕#home
Import screens←#products (a way's screen: back to #items)

Data for every screen comes from seed-data/seed.json. Rules: screens/activation/engine.js, tested by tests/engine.test.js (node --test tests/engine.test.js).