Skip to content

Local Development

  1. Install dependencies:

    Terminal window
    bun install
  2. Run the dev server:

    Terminal window
    bun run dev # next dev

For local dev the contact route reads secrets from a .env file (see below).

Script Command Purpose
dev next dev Local dev server
build next build Plain Next build
type-check tsc --noEmit Typecheck
lint next lint Lint
preview opennextjs-cloudflare build && … preview Build + preview on the Workers runtime
deploy opennextjs-cloudflare build && … deploy Build + deploy to Cloudflare
cf-typegen wrangler types … Regenerate Cloudflare env types

The site is a Cloudflare Worker. bun run deploy builds with OpenNext and deploys with wrangler (Worker name website). It deploys from main.

The contact form needs:

  • RESEND_API_KEY — Resend API key
  • CONTACT_EMAIL — recipient of submissions
  • CONTACT_FROM_EMAIL — optional verified “from” override

Locally these live in .env (gitignored). In production they are Cloudflare Worker secrets — set them with wrangler secret put <NAME> rather than committing them.