Smart Lead Forms
Customizable form fields with validation, honeypot spam protection, and mobile-responsive design
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.
Customizable form fields with validation, honeypot spam protection, and mobile-responsive design
Explicit opt-in checkboxes with timestamped consent records and configurable privacy policy links
Automatic confirmation emails to leads upon submission with customizable templates
Real-time lead data pushed to your Zapier webhook for CRM and workflow automation
View, search, and filter collected leads with one-click CSV export
Built-in endpoints for GDPR data export and deletion requests
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.
Initialize Next.js 15 project, configure Prisma with SQLite, set up environment variables and basic layout
Build the lead capture form component with validation, GDPR consent fields, and spam protection
Create submission endpoint with SendGrid email dispatch and Zapier webhook forwarding
Implement protected admin view for lead management, search, and CSV export
Add data export and deletion endpoints, consent audit logging, and privacy controls
Receives form submissions, stores lead data, triggers SendGrid confirmation and Zapier webhook
Returns paginated lead list for admin dashboard with optional search filters
Generates CSV export of all leads for admin download
GDPR deletion endpoint to remove a specific lead and associated consent records
DSAR endpoint allowing data subjects to request their stored data via email verification
Health check endpoint for monitoring deployment status
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• 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
Prisma connection string for SQLite or PostgreSQL database
API key for SendGrid email delivery service
Verified sender email address for confirmation emails
Zapier webhook endpoint URL for lead data forwarding
Bcrypt hash of admin dashboard password for simple auth
Public URL for CORS and email link generation
Link to your privacy policy shown on consent checkbox
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.
Yes, the form component accepts a configuration object for required and optional fields. You can enable or disable company, job title, and message fields.
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.
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.
The SQLite database on Vercel can handle thousands of leads. For higher volumes, you can swap to a PostgreSQL connection string without code changes.