Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getmaito.com/llms.txt

Use this file to discover all available pages before exploring further.

Cloudflare Frontend Deployments

This repo has four browser-facing Workers:
AppWorkerRoute
apps/webmaito-webgetmaito.com/*, www.getmaito.com/*, maitoai.com/*, www.maitoai.com/*
apps/appmaito-appapp.getmaito.com/*
apps/newslettermaito-newsletter*.getmaito.com/*
apps/newsletter-embedmaito-newsletter-widgetwidget.getmaito.com/*
Deploy all frontend Workers:
bun run frontends:deploy:cloudflare
Deploy one Worker:
bun run web:deploy
bun run app:deploy
bun run newsletter:deploy
bun run newsletter-embed:deploy

Required Secrets / Variables

The non-secret defaults live in each app’s wrangler.toml. Set these in Cloudflare before production cutover:

maito-web

  • DATABASE_URL: required for blog pages and public tool rate limiting.
  • OPENAI_API_KEY: required for AI-powered public tools.
  • VITE_CLERK_PUBLISHABLE_KEY or NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: required for Clerk UI.

maito-app

  • VITE_CLERK_PUBLISHABLE_KEY or NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: required for Clerk UI.

maito-newsletter

  • NEWSLETTER_INTERNAL_API_TOKEN: required for internal public-newsletter API calls.

maito-newsletter-widget

  • NEWSLETTER_INTERNAL_API_TOKEN: required for internal newsletter embed API calls.
Use Wrangler for secrets:
cd apps/newsletter
wrangler secret put NEWSLETTER_INTERNAL_API_TOKEN
Repeat from the relevant app directory for each Worker.

Cutover Note

infra/cloudflare/newsletter-proxy currently owns the same wildcard newsletter route and forwards traffic to Railway. When maito-newsletter is deployed, the old maito-newsletter-proxy route should be removed or replaced so wildcard newsletter traffic is served by the Cloudflare-hosted app, not the Railway origin proxy.