← back to Estimate Instant
BRIEF.md
17 lines
# estimate-instant — brief
- **Client:** Designer Wallcoverings (DW) + every sister microsite; the calculator is also an embeddable widget across the 200+ site fleet.
- **Outcome / "high value":** Remove the #1 pre-purchase bounce point — "how many rolls do I need?" Answer it instantly (rolls-needed with pattern-repeat + waste math) + show an instant price, and capture the shopper's email + intent on every use. Small AOV lift × huge traffic base; becomes the lead-capture layer for the other accelerator ideas.
- **Constraints (brand, domain, deadline):** DW house look (gold kicker / ink accent). House rules: admin cards show created date+time; preview gated behind `admin / DW2024!`. `$0-local`, zero-dependency Node. No deploy/DNS/publish without Steve's explicit go.
- **Reference / competitor URLs:** internal — mirrors the DW sort-skill / dw-site-build conventions.
## Build (v0 — approach A, committed by DTD)
- **Data:** `data/rolls.json` — representative DW roll specs (width, length, pattern-repeat, match, price). Real `dw_unified` roll-spec wiring is the planned NEXT increment.
- **Core logic (server-side, `server.js` `estimate()`):** trade-standard strip method — strips = ceil(wallWidth / rollWidth); cut length per strip = (wallHeight + 4" trim) rounded up to the next full pattern repeat; strips/roll = floor(rollLength / cutLength); rolls = ceil(strips / strips-per-roll); price = rolls × price/roll; plus est. waste %.
- **Surfaces:** `/` calculator (ft/in toggle, pattern picker, instant result + email capture) · `/admin.html` captured-quotes cards (created date+time) · `/api/rolls` · `POST /api/estimate` · `POST /api/lead` · `/api/leads`.
## Run
```bash
PORT=3900 node server.js # open
BASIC_AUTH="admin:DW2024!" PORT=3900 node server.js # gated preview
```