Introduction

Platform

Maya Wealth Group runs private Cloudflare Workers for each domain, plus a single public API gateway at https://api.mayawealth.co.uk that proxies all product APIs. Marketing sites post enquiries to https://api.mayawealth.co.uk/enquiry/v1/enquiries (PUBLIC_API_GATEWAY). Product sites proxy /api/* to the gateway via a GATEWAY service binding. The internal documentation site publishes OpenAPI contracts and integration guides; it does not call live APIs at runtime.

Domain Workers are not on public *.workers.dev URLs.


Stack

Every API follows the same toolchain:

  • Hono + TypeScript on Cloudflare Workers
  • Zod + OpenAPI (GET /doc, GET /docs)
  • Shared helpers from @maya/api-kit (JWT, Directory client, built-in user-type permissions)
  • Cloudflare D1 via Drizzle where the service stores data
  • Cloudflare R2 where the service stores files
  • HS256 JWT for authenticated routes (Enquiry has no caller auth; Marketing is a private marketing-site service binding)

Each API repository installs @maya/api-kit from GitHub (github:Maya-Wealth-Group/api-kit#main), not from a local monorepo path, so CI and Cloudflare deploys work from standalone repos.


Product clients

ClientUses
Marketing sites (Telcam, Maya Wealth, construction, warranty, Butlr)HTTP → https://api.mayawealth.co.uk/enquiry/v1/enquiries; Telcam also uses a MARKETING binding
Maya Hospitality (web and app)HTTP → gateway /venue/*
Car Warranty workshop (web and app)HTTP → gateway (/customers/*, /bookings/*, /quotes/*, …); mobile app in apps/workshop-app — see Workshop app
Telcam AutoHTTP → auto gateway (/listings/*, public listing reads)
Documentation (internal)Static OpenAPI reference and guides
Digital signage PiSignage
Internal operatorsExpense, HR, Planning, Training, Tickets

Workers do not call each other for business logic unless a binding is documented. Directory fans out person and location events. Planning publishes assignments into HR. HR leave approved becomes Planning unavailability. Venue exceptions become Tickets. Planning consumes eligibility snapshots from Training.


OpenAPI

Each Worker is the source of truth for its HTTP contract. Service pages describe what each API owns; each links to an interactive API reference generated from openapi/<service>.json at build time.

Locally, run pnpm openapi in an API package, then pnpm openapi:sync in this site to copy specs into openapi/. On push to main, each API repository's GitHub Actions workflow regenerates its spec and commits the matching JSON file here when it changed (DOCS_SYNC_TOKEN required).