@siteswarm/lead-capture
@siteswarm/lead-capture
Section titled โ@siteswarm/lead-captureโHeadless lead capture capability for the SiteSwarm fleet.
Part of Epic #66 (#67).
๐ฏ Features
Section titled โ๐ฏ Featuresโ- 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.
๐ Usage
Section titled โ๐ Usageโ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,});