← back to AbramsEgo

build-queue/done/34-landing-cta-publicflag.md

16 lines

# Task 34 — sell_product: landing CTAs wired + PUBLIC_LANDING flag (default OFF)

Read SPEC.md. Depends on task 33 (checkout rail exists). ~12 min, surgical.

1. public/landing.html: wire the tier CTAs — Hosted $19 + Pro $49 buttons open the task-33 checkout
   path when Stripe is configured (fetch a config endpoint e.g. GET /api/sell/config →
   {checkoutReady:bool, mode:"test"|"none", links/urls}); when not configured they fall back to the
   existing #waitlist anchor. Show a small "TEST MODE — no real charges" badge whenever mode=test.
2. server.js: add PUBLIC_LANDING env flag (default 0). When "1", the Basic-Auth middleware
   allowlists GET /landing, /api/waitlist POST, /api/sell/config, and the static assets the landing
   needs — NOTHING else. When 0 (now), behavior unchanged. Do NOT set it to 1 anywhere — flipping
   it is Steve's gated switch.
3. Verify: pm2 restart; curl / (still auth-gated), /landing (still auth-gated with flag off);
   with BasicAuth the landing renders and CTAs show the correct state.
4. Commit `feat(sell): landing CTAs + PUBLIC_LANDING flag (default off)`. Local only.