Skip to content

About

A tutorial on how to integrate SupDesk with NextJS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SupDesk + Next.js + Cloudflare Turnstile

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.

Prerequisites

Setup

  1. Install dependencies:
npm install
  1. Copy the example env file and fill in your keys:
cp .env.example .env.local
  1. Edit .env.local with your credentials:
SUPDESK_API_KEY=sd_live_...
NEXT_PUBLIC_TURNSTILE_SITE_KEY=...
TURNSTILE_SECRET_KEY=...
  1. Run the dev server:
npm run dev

Open http://localhost:3000 to see the contact form.

How It Works

  1. The contact form renders a Cloudflare Turnstile widget to verify the user is human
  2. On submit, the form data and Turnstile token are sent to a server action
  3. The server action verifies the token with Turnstile, then creates a submission in SupDesk

License

MIT

About

A tutorial on how to integrate SupDesk with NextJS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages