6ef11db2026-07-14initial scaffold (estimate-instant) via web-dev accelerator
Authors
Steve14
Agents used
none detected
Skills used
/cart3
/catalog-meta2
/pull-rollspecs2
/shopify-catalog1
/proxy1
/lead1
/www1
/behavior1
/leads1
/embed-demo1
/rolls1
Creative ideas + design notes
Commits with substantial prose (≥120 chars) — the rationale behind each move.
646c3eb · 2026-07-16 · shopify: add Buy N rolls CTA + TEST banner to calculator UI
- Email capture still first (POST /api/lead with created_at — unchanged)
- After estimate: green "Buy N rolls on Designer Wallcoverings" button appears
linking to https://www.designerwallcoverings.com/cart/<variant_id>:<N>
where N = rolls-needed from the estimate math
- Real per-roll price and total shown in button pills
- TEST-MODE banner below CTA: "hands off to LIVE Shopify checkout for N rolls;
PayPal shows when enabled; roll specs are sample; production reads metafields"
- Stand-in note shown when shopify_match=false (all 8 current entries)
- Embed iframe compatibility preserved (postHeight still fires)
- All existing styles/behavior unchanged; only result block extended
4349f95 · 2026-07-16 · shopify: wire server to static catalog — estimate returns cart_url + /api/catalog-meta
- loadCatalog() reads shopify-catalog.json (no token, static pull)
- estimate() now accepts checkout_domain, builds cart permalink
https://<checkout_domain>/cart/<variant_id>:<rolls_needed>
- estimate response includes shopify_variant_id, shopify_match, cart_url, checkout_domain
- pricePerRoll uses shopify_price from rolls.json (falls back to price_per_roll)
- New public /api/catalog-meta endpoint exposes checkout_domain for embed consumers
- No Shopify token ever lives in this server
1abb45d · 2026-07-16 · shopify: enrich rolls.json with real Shopify variant_ids + prices (0/8 SKU matches, 8/8 stand-ins)
All 8 prototype SKUs (DW-GRAS-01 etc.) are pre-production and have no match in the
live Shopify catalog. Each entry gets shopify_variant_id + shopify_price from a real
distinct DW catalog product, shopify_match=false, and a _note documenting the seam.
Price_per_roll now mirrors the real Shopify price for each stand-in variant.
PRODUCTION seam: roll_width_in / roll_length_ft / pattern_repeat_in must be pulled
from Shopify metafields keyed by variant_id — documented in each _note field.
Read-only copy of the live DW Shopify store — no token in the app.
Contains variant_id + price per SKU and checkout_domain for cart permalinks.
Cart permalink format: https://<checkout_domain>/cart/<variant_id>:<qty>
- server.js: BASIC_AUTH now gates /admin + /api/leads ONLY — estimator stays
public so it works when embedded cross-origin on 200+ sister sites
- /admin route properly serves admin.html (was falling through to 404 via
basename mismatch); added CORS preflight headers for iframe embed POSTs
- public/admin.html: added sort <select> (Newest/Oldest/Email/Price↑↓) +
density slider, both persisted to localStorage — house rule compliance
- public/embed-demo.html: mock retailer page showing the widget embedded via
embed.js <script> snippet with copy-paste code block
- scripts/pull-rollspecs.sql: one-liner to swap sample data → real dw_unified
products (psql "host=/tmp dbname=dw_unified" -Atq -f scripts/pull-rollspecs.sql > data/rolls.json)
- Verified: 12/12 checks pass (rolls API, roll math, half-drop, lead capture,
admin 401→200 auth gate, embed pages, bad-email 400)
File tree
11 files tracked. Click any to browse the source at HEAD.