Skip to content

Cloudflare

Cloudflare hosts all frontend applications and static sites, and runs the Contact Form API as a Worker.

Project variableServiceBuild commandOutput dir
CLOUDFLARE_CLOUD_APP_NAMECloud Frontend SPAnpm run builddist/
CLOUDFLARE_MANAGE_APP_NAMEManagement Frontendnpm run builddist/
CLOUDFLARE_WEBSITE_NAMEMarketing Websitenpm run builddist/
CLOUDFLARE_CLOUD_DOCS_NAMEPublic Documentationnpm run builddist/
CLOUDFLARE_CLOUD_INTERNAL_DOCS_NAMEInternal Documentation (this site)npm run builddist/

Configured in Internal-Documentation/wrangler.toml:

name = "monozu-internal-docs"
pages_build_output_dir = "dist"

CI/CD pipeline: Internal-Documentation/pipelines/azure-pipelines.yml — triggers on push to master, deploys to Cloudflare Pages using credentials from variable group cloudflare-cloud.

Used by Azure DevOps pipelines to deploy to Cloudflare Pages. Contains:

  • CLOUDFLARE_API_TOKEN — Cloudflare API token with Pages deployment permissions
  • CLOUDFLARE_ACCOUNT_ID — Cloudflare account ID
  • Per-project CLOUDFLARE_*_NAME variables

The marketing website contact form submits to a Cloudflare Worker at WebsiteContactApi/:

SettingValue
AuthNone (public endpoint)
CAPTCHACloudflare Turnstile verification
EmailResend API
Deploywrangler deploy via Azure DevOps

Worker secrets (Resend API key, Turnstile secret) are stored as Cloudflare Worker secrets (not in source code).

React Router 6 uses client-side routing. For Cloudflare Pages to serve the SPA for all routes (and not 404 on hard refresh), a redirect rule is configured:

/* → /index.html (200)

This is typically configured via _redirects file or Cloudflare Pages settings.

ServiceDomain
Cloud Frontendcloud.monozu.io
Internal Docsdocs.cloud.monozu.io
Marketing Websitemonozu.io

DNS is managed in Cloudflare. Custom domains are added in the Cloudflare Pages project settings.