Claude-generated alpha starter

Capture More Leads, Stay Compliant

A lightweight, GDPR-ready lead capture solution that connects to your existing SendGrid and Zapier workflows. No bloat, no surprises.

A GDPR-compliant lead capture form builder for B2B SaaS businesses, designed to collect and export clean prospect data with SendGrid confirmation emails and Zapier webhook integration.

Feature

Smart Lead Forms

Customizable form fields with validation, honeypot spam protection, and mobile-responsive design

Feature

GDPR Consent Tracking

Explicit opt-in checkboxes with timestamped consent records and configurable privacy policy links

Feature

SendGrid Confirmations

Automatic confirmation emails to leads upon submission with customizable templates

Feature

Zapier Webhook Sync

Real-time lead data pushed to your Zapier webhook for CRM and workflow automation

Feature

Admin Lead Dashboard

View, search, and filter collected leads with one-click CSV export

Feature

Data Subject Requests

Built-in endpoints for GDPR data export and deletion requests

Architecture
Next.js 15 App Router application with server-side form handling and API routes. Lead submissions are stored in a lightweight SQLite database via Prisma ORM for Vercel-compatible serverless deployment. Form submissions trigger parallel async calls to SendGrid (confirmation email) and a configurable Zapier webhook. GDPR compliance is handled through explicit consent checkboxes, data export endpoints, and deletion capabilities. The admin dashboard uses server components with minimal client interactivity for fast loads.
Core components
Embeddable lead capture form with customizable fieldsGDPR consent management with audit trailSendGrid integration for submission confirmationsZapier webhook dispatcher for CRM syncAdmin dashboard for lead viewing and CSV exportData subject access request (DSAR) endpoint for GDPR compliance
Timeline
Foundation Setup

Initialize Next.js 15 project, configure Prisma with SQLite, set up environment variables and basic layout

Lead Form Implementation

Build the lead capture form component with validation, GDPR consent fields, and spam protection

API Integration Layer

Create submission endpoint with SendGrid email dispatch and Zapier webhook forwarding

Admin Dashboard

Implement protected admin view for lead management, search, and CSV export

GDPR Compliance Features

Add data export and deletion endpoints, consent audit logging, and privacy controls

API surface
POST /api/leads

Receives form submissions, stores lead data, triggers SendGrid confirmation and Zapier webhook

GET /api/leads

Returns paginated lead list for admin dashboard with optional search filters

GET /api/leads/export

Generates CSV export of all leads for admin download

POST /api/leads/[id]/delete

GDPR deletion endpoint to remove a specific lead and associated consent records

GET /api/leads/lookup

DSAR endpoint allowing data subjects to request their stored data via email verification

GET /api/health

Health check endpoint for monitoring deployment status

Data model
Lead
id: string (cuid)email: stringfirstName: stringlastName: stringcompany: string (optional)jobTitle: string (optional)message: string (optional)source: stringconsentGiven: booleanconsentTimestamp: datetimeipAddress: string (hashed)createdAt: datetimewebhookSent: booleanconfirmationSent: boolean
ConsentAudit
id: string (cuid)leadId: string (foreign key)consentType: stringconsentText: stringgivenAt: datetimeipAddress: string (hashed)
AdminUser
id: string (cuid)email: stringpasswordHash: stringcreatedAt: datetime
Setup
1. Clone the repository and run npm install 2. Copy .env.example to .env.local and fill in all required environment variables 3. Run npx prisma generate && npx prisma db push to initialize the database 4. Generate admin password hash with: node -e "console.log(require('bcryptjs').hashSync('yourpassword', 10))" 5. Run npm run dev to start the development server on localhost:3000 6. Test form submission at /form and verify SendGrid email and Zapier webhook receipt 7. Access admin dashboard at /admin with your configured password 8. Deploy to Vercel with vercel --prod and configure environment variables in dashboard 9. For persistent production data, update DATABASE_URL to a hosted PostgreSQL or Turso instance
Operator notes

SQLite file is stored in /prisma/dev.db for local development; Vercel deployment uses ephemeral storage so consider Turso or PlanetScale for production persistence

Admin authentication uses a simple password hash comparison; upgrade to NextAuth for multi-user admin access

SendGrid requires a verified sender domain for reliable delivery; test with sandbox mode first

Zapier webhook URL should be tested with a Catch Hook before going live

IP addresses are hashed with SHA-256 before storage to balance fraud prevention with GDPR minimization

CSV export includes all fields; consider field filtering for large datasets

Form can be embedded via iframe or imported as a React component in external Next.js sites

Suggested env vars
DATABASE_URL

Prisma connection string for SQLite or PostgreSQL database

SENDGRID_API_KEY

API key for SendGrid email delivery service

SENDGRID_FROM_EMAIL

Verified sender email address for confirmation emails

ZAPIER_WEBHOOK_URL

Zapier webhook endpoint URL for lead data forwarding

ADMIN_PASSWORD_HASH

Bcrypt hash of admin dashboard password for simple auth

NEXT_PUBLIC_SITE_URL

Public URL for CORS and email link generation

GDPR_PRIVACY_POLICY_URL

Link to your privacy policy shown on consent checkbox

FAQ
How does this handle GDPR compliance for EU users?

Every form submission requires explicit consent checkboxes. We store timestamped consent records, hash IP addresses, and provide data export and deletion endpoints for subject access requests.

Can I customize the form fields?

Yes, the form component accepts a configuration object for required and optional fields. You can enable or disable company, job title, and message fields.

How does the Zapier integration work?

When a lead submits the form, we POST the lead data to your configured Zapier webhook URL. You can then route it to any CRM or tool in your Zapier workflow.

What happens if SendGrid or Zapier is down?

Submissions are always saved to the database first. External service failures are logged but do not block lead capture. Failed webhooks can be retried from the admin dashboard.

Is there a limit on leads collected?

The SQLite database on Vercel can handle thousands of leads. For higher volumes, you can swap to a PostgreSQL connection string without code changes.