A contact form built with Next.js, SupDesk, and Cloudflare Turnstile for spam protection.
Sponsored by SupDesk — the lightweight helpdesk for solo developers & small teams.
- Node.js 18+
- A SupDesk account with an API key
- A Cloudflare Turnstile site key and secret key
- Install dependencies:
npm install- Copy the example env file and fill in your keys:
cp .env.example .env.local- Edit
.env.localwith your credentials:
SUPDESK_API_KEY=sd_live_...
NEXT_PUBLIC_TURNSTILE_SITE_KEY=...
TURNSTILE_SECRET_KEY=...
- Run the dev server:
npm run devOpen http://localhost:3000 to see the contact form.
- The contact form renders a Cloudflare Turnstile widget to verify the user is human
- On submit, the form data and Turnstile token are sent to a server action
- The server action verifies the token with Turnstile, then creates a submission in SupDesk
MIT