Skip to content

Architecture

The site is a Next.js App Router app compiled for the Cloudflare Workers runtime by @opennextjs/cloudflare. The build produces a .open-next/ worker + assets bundle that wrangler deploys.

  • next.config.mjs calls initOpenNextCloudflareForDev() so getCloudflareContext() works under next dev. It also sets typescript.ignoreBuildErrors: true (type errors don’t fail the marketing build).
  • wrangler.jsonc wires the Worker: the .open-next/worker.js entry, the ASSETS binding for static files, nodejs_compat, and observability.enabled.
  • public/_headers sets a long immutable cache on /_next/static/*.

The site is one landing page (src/app/page.tsx) composed of section components — Hero, Introduction, Features, Process, Team, Contact — plus a Navigation, Footer, and a couple of visual effects. There is no CMS or content collection; copy and layout live in the components.

The one server route is src/app/api/contact/route.ts (runtime = "nodejs", force-dynamic). It:

  • reads secrets from getCloudflareContext().env (falling back to process.env),
  • validates the submission (name/email/company/role required, message optional),
  • sends an email via Resend to CONTACT_EMAIL, with the submitter as replyTo, escaping the HTML,
  • returns 400 on bad input, 502 on a Resend failure, 500 if unconfigured.

The client ContactForm mirrors the validation and POSTs JSON to /api/contact.