Smart Form Validation
Real-time client-side validation with server-side verification ensures clean data with proper email formats and required fields.
A fast, GDPR-compliant lead form that connects directly to your existing SendGrid and Zapier workflows. No expensive subscriptions, no complexity.
A lightweight, GDPR-compliant lead capture form system for B2B SaaS businesses that collects clean prospect data and forwards submissions to SendGrid and Zapier webhooks.
Real-time client-side validation with server-side verification ensures clean data with proper email formats and required fields.
Explicit consent checkbox with timestamp recording, plus endpoints for data export and deletion requests.
New leads are automatically added to your SendGrid contact list for future communications.
Each submission triggers your Zapier webhook, enabling custom automation workflows.
Fast-loading, mobile-optimized form with clear CTAs and minimal friction to reduce abandonment.
Admin endpoint to export all leads as JSON or CSV for analysis and CRM import.
Next.js 15 App Router application with server-side form handling. The public-facing form renders as a single responsive page with client-side validation. Form submissions POST to an API route that validates input, stores leads in a lightweight database (Vercel Postgres or JSON file for alpha), triggers a SendGrid contact list addition, and fires a Zapier webhook. GDPR compliance is handled via explicit consent checkboxes, data export endpoint, and deletion endpoint. No authentication required for form submission; admin routes are protected by a simple API key for the alpha phase.
Initialize Next.js 15 project, configure TypeScript, set up Vercel Postgres connection, establish environment variables.
Build responsive lead capture form component with client-side validation, consent checkbox, and loading states.
Create submission endpoint with server validation, database storage, SendGrid integration, and Zapier webhook.
Implement consent recording, data export endpoint, and deletion endpoint for EU user requests.
Add protected admin endpoints, thank-you page, error handling, and production deployment to Vercel.
Receives form submissions, validates data, stores lead, syncs to SendGrid, triggers Zapier webhook
Admin-protected endpoint to retrieve all leads with optional date filtering
Admin-protected endpoint to export leads as CSV or JSON format
GDPR deletion endpoint to remove a specific lead by email address
GDPR data export endpoint to retrieve all data for a specific email address
Health check endpoint for monitoring deployment status
1. Clone repository and run npm install 2. Create Vercel project and enable Vercel Postgres addon 3. Copy .env.example to .env.local and fill in all required variables 4. Create SendGrid contact list and copy the list ID 5. Set up Zapier webhook and copy the URL 6. Run npx prisma db push to initialize database schema 7. Run npm run dev to test locally 8. Deploy to Vercel via git push or vercel deploy 9. Verify health endpoint returns 200 10. Submit test lead and confirm SendGrid and Zapier receive data
• Deploy to Vercel with Vercel Postgres addon enabled for zero-config database
• SendGrid contact list must be created manually before deployment; use the list ID in env vars
• Test Zapier webhook with a sample payload matching the Lead entity structure before going live
• For GDPR compliance, ensure privacy policy link is updated in the form component before EU launch
• Admin endpoints use bearer token auth with ADMIN_API_KEY; rotate this key periodically
• Monitor webhook logs table for failed deliveries; implement retry logic post-alpha if needed
• Form includes honeypot field for basic spam prevention; consider adding rate limiting for production
Vercel Postgres connection string for lead storage
SendGrid API key for adding contacts to your list
SendGrid contact list ID where leads are added
Your Zapier webhook URL to trigger on new submissions
Simple API key to protect admin endpoints
Customizable form headline displayed to users
Optional URL to redirect users after successful submission
Every submission requires explicit consent via checkbox. The consent timestamp is recorded. Users can request their data via the lookup endpoint or request deletion via the delete endpoint.
The data is validated, stored in the database, added to your SendGrid contact list, and sent to your Zapier webhook—all in a single request.
The alpha includes standard B2B fields (name, email, company, job title, message). Field customization can be added in future iterations.
Use the admin API endpoints with your API key to retrieve, export, or manage leads. CSV export is available for CRM import.
Submissions are always stored locally first. Webhook failures are logged and can be retried manually via the admin interface.