Skip to content
Docs · Architecture

Self-hosting

How Yomenie is built

A short public tour of Yomenie's architecture: an Astro site, a Next.js app and a Hono API in one container behind a Cloudflare Worker, with D1 for storage.

Updated

On this page

A short tour for the curious. The repository’s docs/architecture.md has the full version.

The pieces

Piece What it does
The marketing site (Astro) yomenie.us, these docs and the demo. Static pages; floor pictures are rendered at build time
The web app (Next.js) The floor, chat, boards, agents, connections, approvals, audit and team pages, at /app
The API (Hono) Every read and write, the WebSocket that carries presence and conversations, the broker and the MCP server
The edge Worker (Cloudflare) Serves the site, handles sign-in, passkeys, join links and MCP sign-in, and sends /app and /api to the container
Shared packages The schemas for every API shape, the floor’s map and movement rules, the character generator and the brand

The request path

Everything goes through one Worker on one domain. It checks your session, then passes the request to a single container that runs both the web app and the API, with your verified identity attached. The container is reachable only through the Worker.

One set of rules, two places

The floor’s rules (walls, doors, who’s in which conversation) are one package that runs in your browser, to predict your steps instantly, and on the server, to check them. If the two disagree, the server wins and your character snaps back.

Permissions work the same way: one pure function decides what a role may do, and the API and the Worker both run it.

Storage

The API works on a local SQLite database. In production it’s rebuilt from Cloudflare D1 when the container starts, and every write is copied back to D1, so data survives restarts and deploys. Only live presence, such as who’s standing where right now, resets when the container goes to sleep after 30 minutes without activity.

Accounts, sessions, passkeys and join links live in a separate D1 database that only the Worker uses.

Voice and video

Voice and video run peer to peer, or through Cloudflare Realtime when it’s configured, as it is on yomenie.us. Either way the server decides who may connect to whom: only connected people in the same conversation.