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.
“Unpublished fields and draft collection items are strictly stripped from public client reads until promoted.”
Working Drafts vs. Live State
Every Project Node maintains two discrete schema and content representations:
contentSchemaDraft
The working schema state edited in the Studio. Auto-saves continuously and supports uncommitted experimental models.
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:
The Publishing Lifecycle
When an editor publishes content, the Control Plane executes an atomic 5-step transaction:
- Draft Promotion: Copies
contentSchemaDrafttocontentSchemaand stampsschemaLastPublishedwith the current timestamp. - Audit Recording: Writes an entry to the PostgreSQL
AuditLogrecording the user ID, project ID, and changed field keys. - Direct R2 Purge:Connects to the project's Cloudflare R2 bucket and purges all cached Next.js HTML/JSON files under
incremental-cache/. - Global CDN Flush: Triggers Cloudflare zone cache purges across global edge PoPs.
- Real-Time SSE Broadcast: Dispatches a
content.updatedorschema.updatedevent over active Server-Sent Events channels.
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 | } |