← back to Sample Box
BRIEF.md
13 lines
# sample-box — brief
- **Client:** Designer Wallcoverings (internal product)
- **Outcome / "high value":** Paid curated swatch-box funnel that monetizes sample friction — the #1 wallcovering conversion killer. A $15 box (credited to first roll order) captures warm leads + shipping addresses + style preference data while sending real material. Converts "I'm not sure" browsers into warm, addressed leads.
- **Shape:** (a) vibe/style picker — 6 vibes (Modern, Traditional, Floral, Grasscloth, Bold Color, Geometric) → (b) curated swatch grid (sort + density) filtered to chosen vibe, select up to 8 swatches → (c) checkout capturing shipping + email → (d) confirmation with credit note.
- **Payment:** Stripe TEST MODE stub (no live keys used). Structurally mirrors Stripe — order total, fake card step. One-liner to wire real Stripe: set STRIPE_SECRET_KEY, call stripe.checkout.sessions.create() in POST /api/checkout.
- **Credit logic:** Box price ($15) credited to first roll order. Credit note stored on every order: "$15.00 credited toward your first roll order (ref: SB-XXXXX)"
- **Order store:** data/orders.json — vibe, swatches, address, email, price, credit note, payment_method, created_at.
- **Admin:** /admin (gate with BASIC_AUTH=user:pass) — fulfillment card grid with sort (Newest/Oldest) + density slider. HARD RULE: every card shows created date+time (toLocaleString).
- **Data:** 20 real DW products pulled from dw_unified (ACTIVE, image_url, style-tagged) + 2 representative seeds for gaps. SQL pull: `SELECT sku,title,vendor,image_url,tags,COALESCE(price,retail_price) FROM shopify_products WHERE status='ACTIVE' AND image_url!='' AND tags ILIKE ANY('{%modern%,%floral%,%grasscloth%,%geometric%,...}') ORDER BY RANDOM() LIMIT 25`
- **Constraints:** Zero-dep Node http. $0 local. No deploy/DNS/publish. PORT=3903. Build one switch from live and stop.
- **Start command:** `PORT=3903 node server.js` | `BASIC_AUTH=admin:DW2024! PORT=3903 node server.js`