Code editor open on __cms_manifest__.json with entities and storage rules
__cms_manifest__.json

Appifio Creator · Lesson K06 · Technical

Sync frontend
with Aura CMS

Creator builds the HTML shell; CMS publishes content - both must share one manifest, not two parallel data sources.

Learning goals: Read __cms_manifest__ and __cms_ui_contract__; sync listing/detail HTML with Posts/Contacts/Products panels; Routes + Save; Published / Draft status.

Reading time: about 19 minutes

Prerequisites: G02-G04 (CMS setup), T05 (manifest), H01 (publish), K05 (contacts).

Previous: K05 - Guest form appendData.

Next: K07 - Secrets & Backend Function.

Main UI labels:

Posts · Contacts · Products Published · Draft Routes · Save · Save changes __cms_manifest__ · __cms_ui_contract__

1. One source of truth (manifest)

__cms_manifest__ = entity names, data_file, fields, routes, security
Creator HTML (listing/detail) reads the correct data_file + field names
CMS panels (Posts / Contacts / Products) write the same data_file
__cms_ui_contract__ = DOM ↔ fields mapping (AI updates when layout changes)
Routes tab → Save routes · Creator Save changes publishes HTML
❌ Don’t: invent posts.json while manifest points at posts_data.json - two divergent sources

2. Glossary

TermMeaningWhere in the UI
__cms_manifest__CMS schema: entity, file, fields, routesProject JSON · read via Coder AI
__cms_ui_contract__Links HTML selectors ↔ CMS fieldsJSON file · update when layout changes
data_fileJSON file holding entity recordsDeclared in the manifest
Published / DraftVisibility status on the frontendCMS panel when editing a post
Routes + SaveConfigure listing/detail routesCreator tab (≠ Save changes)
CMS theme panelCMS admin colors/spacing - not Creator site HTMLCMS Appearance

3. Step by step

  1. Step 1 - Open CMS: visit /{url}/cms - confirm sidebar entities: Posts, Contacts, Products
  2. Step 2 - Read manifest before prompting: mode Coder: “Read __cms_manifest__.json first; use the correct data_file and field names; update __cms_ui_contract__ if you change listing/detail layout.”
  3. Step 3 - Routes: Routes tab - blog list + detail /blog/:slug (example) → Save (routes only).
  4. Step 4 - HTML reads the right file: listing page calls readList/readOne on the manifest data_file - don’t hardcode another name.
  5. Step 5 - CMS content: create a Published post (or Draft for testing) - fields match the manifest.
  6. Step 6 - Creator preview: preview Changes - new post appears on the draft frontend.
  7. Step 7 - New data types: create in CMS Data types first - don’t let AI invent entities/files outside the manifest.
  8. Step 8 - Publish: Creator Save changes → check live URL - CMS and HTML share the same data.

4. Related features

Manifest = contract between Creator and CMS

Every entity (Posts, Products, Contacts) declares data_file, field types, slug rules. HTML and CMS panels both follow - change schema only in the manifest + CMS Data types, then update HTML.

UI contract - layout changes without losing mapping

When Inspector/AI changes HTML classes, __cms_ui_contract__ records new selectors ↔ fields like title, body… Dynamic render still binds correctly after publish.

Published vs Draft

Public frontend should only list Published posts. Draft is for staging - check on Changes preview or an admin preview URL.

5. Design vs content models

ModelDesign vs contentAppifio
WordPress theme + adminPHP theme + post DBCreator HTML + JSON manifest + CMS panel
Webflow Designer + EditorDesigner locked · Editor edits CMS fieldsCreator edits layout · CMS edits content - linked by manifest
Headless (Next + Strapi)Separate API · frontend fetchSame Storage - appifio_client reads manifest files, no third-party API

6. Can / can’t

You can

  • One data_file for CMS + frontend + Contacts form (K05)
  • Add entities via CMS Data types → update HTML from the manifest
  • CMS admin theme separate from Creator site UI

Avoid

  • Two JSON files for the same content type (posts.json + articles.json)
  • Changing CMS fields without updating HTML/contract
  • Expecting the CMS theme panel to rewrite listing HTML - edit in Creator

7. CMS sync security

  • Manifest security enforces who may append/read - guest forms (K05) must match.
  • Don’t expose Draft posts on public routes - filter status in HTML.
  • Review Diff when AI adds entities/files outside the manifest - may bypass security policy.

8. Common issues

SituationFix
CMS has posts, frontend emptyWrong data_file · not Published · haven’t Save changes
CMS field missing on the pageUpdate __cms_ui_contract__ · field name vs manifest mismatch
404 on post detailRoutesSave missing slug pattern
AI invents a new JSON fileDelete the divergent file · stick to manifest · create entity in CMS Data types
Form Contacts vs CMS panel divergeSame contacts data_file in the manifest (K05)

9. Tips

  • Every CMS prompt starts with “read __cms_manifest__ first” - K01/K06 habit.
  • When you change listing layout → update the contract in the same Diff, not later.
  • Test: create 1 CMS post → refresh Changes preview before Save changes.
  • New dynamic types: G04 + CMS Data types first, HTML second - never reverse.

10. Self-check & next

  1. __cms_manifest__ vs __cms_ui_contract__?
  2. Why not two data_files for the same content type?
  3. Save (Routes) vs Save changes?
  4. Do Draft posts appear on the public frontend?
  5. Flow to add a Products entity from CMS to HTML?

Next lesson

K07 - Secrets & Backend Function

Admin-only pieces guest forms (K05) must not call - email, payment, secure server logic.

Appifio Creator · User guide · K06