Architecture
Request path from browser to Firecracker microVM and back.
Hostnames
| Host | Owner | Purpose |
|---|---|---|
omg.dev | control-plane box (Caddy) | Marketing + authenticated dashboard |
auth.omg.dev | vibes-auth (Bun) | JWKS, login, service-token mint/revoke |
infra.omg.dev | CF Worker → box-1 | Sandbox / deploy / preview API |
*.preview.omg.dev | CF Worker → box-1 | Live sandbox dev-server forwarding. *.preview.omgs.app is staged at the edge before generated URLs flip. |
*.apps.omg.dev | CF Worker → box-1 | Deployed apps (static + serverful) |
assets.omg.dev | CF Worker → box-1 | Public asset proxy (thumbnails) |
Request path
Browserend user
HTTPS
Cloudflare edgevibes-router (Worker)
argo tunnel
box-1 · Hetznervibes-sandbox (Go)
TAP / vsock
Firecracker microVMbun + litestream
TigrisS3-compatible
Per-hop responsibilities:
- Cloudflare edge —
KV.get("deploy:{slug}")cached at colo; falls back to Go/v1/deploys-internalon miss. - vibes-sandbox — JWT verify against
auth.omg.dev/.well-known/jwks.json; revocation cache polled every 30s. - Firecracker microVM — bun runtime + litestream replicate; outbound LLM calls intercepted by the host.
- Tigris — snapshots, artifacts, litestream WAL, static assets.
Storage layout (Tigris)
| Prefix | Owner | Lifecycle |
|---|---|---|
sandbox-snapshots/:id/ | manager.Snapshot | Tied to snapshot row in sqld |
project-tarballs/:artifactId/ | manager.packBuildArtifact | Until next deploy garbage-collects |
deploys-db/:slug/v:N/ | per-deploy litestream | GC'd 90s after redeploy |
static-deploys/:slug/v:N/ | static deploy upload loop | GC'd 90s after redeploy |
thumbnails/:slug/latest.png | shotter | Replaced on capture |
Versioned v:N prefixes are the load-bearing piece for zero-downtime
redeploy: old and new sandboxes never share a Tigris key.
Datastores
- sqld (libsql) — authoritative state for sandboxes, deploys,
snapshots, usage logs. Schema in
packages/db/src/schema.ts. - CF KV — routing cache only (
sandbox::id→ node,deploy::slug→ node). Read-after-write viakvIsolateCache+cacheTtl: 300s. - Tigris — see above.
- Per-deploy SQLite — inside the Firecracker VM, litestream-replicated to Tigris.