Skip to content

djpardis/form

Repository files navigation

form

Vintage gallery interior with art and furniture

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.

CI License: MIT

Requirements

  • Node >= 20
  • Cloudflare account - install Wrangler and run npx wrangler login
  • Resend account - only needed for email notifications

Quick start

npm install
npx wrangler d1 create form_submissions
npm run db:migrate

Local 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.

Project docs

About

A lightweight backend for embedded forms that need spam filtering, storage, and notifications.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors