Skip to content

Draft-my-Velocity

The flagship acquisition feature. A short 3-step form generates an AI-written, branded Velocity draft for the visitor’s business and emails them a live link within 5 minutes.

Hybrid delivery: an instant dynamic preview now, with a real Netlify build triggered later only when they show interest.

Live page: /draft · demo: /components/draft-my-velocity

form → /.netlify/functions/draft-create → AI/template copy → Supabase row → /draft/preview?id=<id>

The lead enters at status='preview'; “I want this” on the preview flips them to interested (the real-build trigger hook).

FileRole
src/components/growth/DraftMyVelocity.tsx3-step form (name+email / industry+one-liner / logo+colour). Fires draft_requested + trackLead.
src/pages/draft.astroLanding page.
src/lib/draft-generate.tsgenerateDraft() → Anthropic claude-opus-4-8 (key from ANTHROPIC_API_KEY), deterministic template fallback (never hard-fails). Returns a brand.json-shaped brand + copy.
netlify/functions/draft-create.mjsValidate → generate → insert velocity_drafts → return previewUrl. Email + real-build are stubbed (TODO(creds)).
src/components/growth/DraftPreview.tsx + src/pages/draft/preview.astro?id=-driven per-lead preview (noindex).
  1. Create the Supabase velocity_drafts table + RLS.
  2. Set env: ANTHROPIC_API_KEY, RESEND_API_KEY, NETLIFY_BUILD_HOOK_URL, SUPABASE_SERVICE_ROLE_KEY, SITE_URL.
  3. Wire draftReady into draft-create.mjs (replace the email stub) and add Supabase Storage for real logo uploads.
  4. For true SSR previews at /draft/<id>, add @astrojs/netlify + output: 'server'.

See TODO.md at the repo root for the full checklist. Pairs with the nurture email sequence for abandoned-draft follow-up.