A lightweight backend for embedded forms that need spam filtering, storage, and notifications.
form runs on Cloudflare Workers, stores accepted submissions in D1, and can send notifications through Resend.
It returns JSON for same-page success states and supports origin allowlists, required fields, email validation, current-or-future date validation, honeypots, Turnstile, and generic success responses for spam.
- Node >= 20
- Cloudflare account - install Wrangler and run
npx wrangler login - Resend account - only needed for email notifications
npm install
npx wrangler d1 create form_submissions
npm run db:migrateLocal development: cp .dev.vars.example .dev.vars && npm run db:migrate:local && npm run dev.
Full setup, configuration, API, testing, and submission-management details are in SETUP.md. The local embedded form example is examples/contact.html.
- Setup: SETUP.md
- Contributions: CONTRIBUTING.md
- Changelog: CHANGELOG.md
- License: MIT
