Why public content is modeled separately
MinuteWork separates private runtime behavior from intentionally published public delivery.
That means docs, marketing pages, blogs, and other anonymous surfaces should read from a public-safe snapshot contract, not from raw runtime database tables and not from browser-held credentials.
This is how MinuteWork keeps three things true at once:
- private drafts can stay private
- preview can still show unpublished work safely
- live pages can be generated from a publication-safe boundary
Start with the snapshot contract
Public documentation and other anonymous surfaces should read from a public-safe snapshot contract, not from raw runtime database tables and not from browser-held credentials.
/api/v1/developer/public-site/snapshots/:property_key/The gateway returns the public-safe site snapshot for either preview or live, with an explicit source_boundary so builds cannot accidentally serialize draft runtime state as live content.
Required server-side configuration
For the combined tenant-app starter and similar public surfaces, the important
environment variables are:
MW_CONTENT_API_TOKENfor server-only authenticationMW_PUBLIC_BASE_URLfor canonical URLs and SEO metadataMW_PUBLIC_SITE_PROPERTY_KEYfor selecting thePublishedWebPropertyMW_PUBLIC_SITE_ENVfor choosingprevieworlive
Keep the token on the server only. The browser should never receive the content token used to fetch the snapshot.
Preview versus live
Preview may stay runtime-backed. It is the right surface for local development, pre-publish validation, editorial review, and draft-safe iteration.
A safe rendering rule
Use this rule everywhere public content is rendered:
- fetch the snapshot on the server
- keep the token server-only
- treat
previewas draft-safe andliveas publication-safe - derive canonical URLs from
MW_PUBLIC_BASE_URL
Where this fits in the architecture
This guide sits on top of the broader platform model:
- private drafts and workflow state stay with the Server runtime
- published web surfaces read from an explicit public contract
- preview and live remain different trust levels even when the page tree is the same