Skip to content

@siteswarm/lead-capture

Headless lead capture capability for the SiteSwarm fleet.

Part of Epic #66 (#67).

  • Edge-Native Validation: Built-in verification with Cloudflare Turnstile bot detection.
  • Zod Schema Contracts: Strongly typed inquiry payloads with client-extensible metadata.
  • Storage Agnostic: Integrates with Cloudflare D1 or external webhooks/relays.
  • Stateless Capability: Usable across any client app without UI lock-in.
import { validateTurnstileToken, processLeadCapture } from '@siteswarm/lead-capture';
const result = await processLeadCapture({
name: 'Jane Doe',
email: 'jane@example.com',
phone: '555-1234',
message: 'Inquiring about catering services',
turnstileToken: token,
});