Skip to main content

Payload stack

Ovok's CMS runs as three cooperating services. Your apps never talk to Payload directly — ovok-core proxies every request and enforces project boundaries.

Services

ServiceRoleTypical host (sandbox)
ovok-corePublic API, auth, CMS proxy, cacheapi.sandbox.ovok.com
ovok-control-planeProject registry, environment enablementprivate ovok-control-plane.railway.internal:4001
payload-ovok (ovok-cms)Multi-tenant Payload CMS runtimeprivate payload-ovok.railway.internal:8080

Databases

Each backend owns a separate Postgres instance:

DatabaseUsed byStores
ovok-cms-postgrespayload-ovokTenants, content-types, content-items, media
ovok-control-plane-dbovok-control-planeprojects, project_environments

Do not share one database between CMS and control plane — schemas and migration tooling differ (Payload vs Drizzle).

Request paths

Public route (ovok-core)BackendPurpose
/v1/content/*payload-ovokAuthoring (JWT)
/v1/public/cms/:type/itemspayload-ovokPublished reads (API key)
/v1/cms/projects/*ovok-control-planeEnable CMS, list environments

Cluster-internal CMS endpoints (control plane + cache hooks):

MethodPathPurpose
GET/api/_ovok/healthLiveness + DB check
GET/api/_ovok/schemaDashboard form schema
POST/api/_ovok/tenants/provisionIdempotent tenant provisioning

Environment isolation

Every tenant-scoped document carries an environment field (dev, staging, or prod). Reads and writes are scoped by x-ovok-environment on internal CMS calls. See CMS environments.

Provisioning flow

  1. Console enables CMS → ovok-core calls control plane POST /v1/projects/:slug/environments with { "environment": "dev" }.
  2. Control plane inserts a project_environments row (provisioning).
  3. Control plane calls payload-ovok POST /api/_ovok/tenants/provision with the Medplum project ID.
  4. Row moves to active. No new containers — isolation is row-level in shared Postgres.

CMS project routes

Console and trusted backends enable environments through the control plane proxy:

POST /v1/cms/projects/{slug}/environments → ovok-control-plane
GET /v1/cms/projects/{slug} → project + environment matrix

Next