Yapi is an API platform organised as a monorepo: a Cloudflare Worker exposes the domain (auth, users, channels, devices and notifications), a VPS backend handles push delivery and an Astro frontend consumes everything.
The challenge
Building an API with users, channels and notifications usually means maintaining servers, load balancers and databases. The goal was to have that whole platform running at the edge, with minimal infrastructure and near-zero cost.
What we did
A Turborepo monorepo with three clear pieces:
worker: domain API on Cloudflare Workers (Hono + Wrangler + D1) for auth, users, channels, devices and notifications.server: VPS backend with Hono + firebase-admin, dedicated to push (FCM) only.web: Astro frontend that consumes the API.
How we built it
We split responsibilities: the Worker is the data plane (fast, global, stateless) and the server only exists for what cannot live at the edge (FCM). D1 holds relational state with no server. The result is a global API with minimal latency and atomic deploys via Wrangler.
Results
A complete API platform with no servers to administer: the domain runs at the edge on Cloudflare, push is isolated where it belongs, and the frontend consumes a stable, versioned API.