03. Sovereign Edge CMS/Publishing Lifecycle

Drafts, Versioning & Publishing

GN-Apex isolates working drafts from production environments. Content editors can model new schemas, stage articles, and preview layouts without affecting the live customer experience.

PRODUCTION LOCK
Zero Leaks
Draft Isolation Guarantees

Unpublished fields and draft collection items are strictly stripped from public client reads until promoted.

Atomic Production Releases

Working Drafts vs. Live State

Every Project Node maintains two discrete schema and content representations:

SANDBOX / DRAFT

contentSchemaDraft

The working schema state edited in the Studio. Auto-saves continuously and supports uncommitted experimental models.

PRODUCTION / SEALED

contentSchema (Live)

The immutable production schema served to client SDKs. Updated only when a developer clicks 'Publish'.

800ms Debounced Autosaving

While working in the Studio, changes to schema fields or content values are automatically debounced over an 800ms window before being sent to the Control Plane:

PATCH/content/schema/:projectId/draft
PUT/content/:projectId/data

The Publishing Lifecycle

When an editor publishes content, the Control Plane executes an atomic 5-step transaction:

  1. Draft Promotion: Copies contentSchemaDraft to contentSchema and stamps schemaLastPublished with the current timestamp.
  2. Audit Recording: Writes an entry to the PostgreSQL AuditLog recording the user ID, project ID, and changed field keys.
  3. Direct R2 Purge:Connects to the project's Cloudflare R2 bucket and purges all cached Next.js HTML/JSON files under incremental-cache/.
  4. Global CDN Flush: Triggers Cloudflare zone cache purges across global edge PoPs.
  5. Real-Time SSE Broadcast: Dispatches a content.updated or schema.updated event over active Server-Sent Events channels.
POST/content/schema/:projectId/publish

Forensic Audit Logging

Every schema promotion and content update is permanently recorded in the immutable audit ledger:

1{
2 "action": "CONTENT_UPDATED",
3 "userId": "usr_clx998877",
4 "projectId": "prj_clx1a2b3",
5 "details": {
6 "fieldsUpdated": ["hero_title", "body_content"],
7 "initiatedBy": "USER_DASHBOARD",
8 "timestamp": "2026-04-12T14:30:22.123Z"
9 }
10}