HCMS Tech
Home › Technical Guides › Content Modeling
Content Modeling

Structured Content Modeling: Designing Reusable Schemas for Scale

Learn how to decompose pages into atomic, channel-agnostic content types, relational references, and portable rich text structures.

Domain Modeling Before Page Layout Design

The most common mistake in headless implementations is modeling content types after visual wireframes. Fields named leftColumnText or heroPurpleBanner lock content to one temporary design and force painful migrations whenever a site refreshes its visual identity.

Effective modeling starts with domain nouns and relationships: Authors, Articles, Product Features, Case Studies, Legal Disclosures, and SEO Metadata. When attributes describe what content means rather than how it looks, the same record powers web cards, mobile drawers, and email digests.

  • Name models and fields after business concepts instead of CSS positions
  • Separate core domain entities from page-composition wrapper types
  • Reuse shared component schemas for SEO tags, CTAs, and media captions
  • Keep field hierarchies shallow enough for non-technical editors to navigate

Composition Patterns: References vs. Embedded Components

Structured content relies on choosing carefully between reusable references and inline embedded objects. References suit entities shared across many pages—such as team bios, pricing tiers, or legal disclaimers—where updating one record should propagate everywhere it appears.

Embedded components work better for local page slices like a one-off comparison block or FAQ item that belongs exclusively to a single landing page. Overusing references for trivial items clutters the content library, while overusing embeds creates duplicate maintenance.

  • Use normalized references for shared authors, categories, and global banners
  • Use embedded blocks for page-local layout slices and ordered sections
  • Cap reference nesting depth to three or four levels to prevent circular queries

Portable Rich Text and Validation Guardrails

Storing raw HTML strings inside a headless CMS reintroduces presentation lock-in and cross-site scripting risks across non-web targets. Modern platforms serialize rich text as a structured Abstract Syntax Tree (AST) or JSON block array describing headings, links, and embedded entries.

Validation rules protect downstream renderers from unexpected null states or bloated payloads. Enforce character ranges on titles, required alt text on images, strict slug regex patterns, and enumerated select lists so editorial quality stays consistent.

Managing Schema Evolution Without Breaking Consumers

Content models evolve as products grow. Renaming or deleting an active field in production breaks live front-end queries immediately unless changes follow an expand-and-contract lifecycle.

Introduce new fields alongside existing ones, backfill values via migration scripts, update front-end consumers to read the new schema, and retire legacy fields only after telemetry confirms zero active reads.

Schema Modeling Decision Matrix

Modeling PatternBest Use CaseReuse PotentialQuery Complexity
Core Entity TypeArticles, products, authors, eventsVery high across channelsLow; direct ID or slug lookup
Normalized ReferenceShared bios, legal notices, tagsHigh; single-edit propagationModerate; requires link resolution
Embedded ComponentPage-local hero, CTA, FAQ itemModerate; scoped to parentLow; fetched inline with parent
Rich Text ASTLong-form narrative with inline mediaHigh; custom serializers per appLow; rendered recursively on client
Page Builder UnionFlexible marketing campaign pagesModerate; constrained slot listModerate; union type fragments

Selecting the right pattern per entity prevents both rigid templates and unmaintainable schema sprawl.

Worked Illustration: Refactoring a Monolithic Landing Page

Suppose an enterprise SaaS team wants to refactor a monolithic 12-section product page into structured models usable on web and in-app onboarding.

  1. Extract repeating testimonials and customer logos into standalone CustomerStory and BrandLogo entity types.
  2. Create a reusable SeoMetadata component containing title (max 60 chars), description (max 160 chars), and canonical override.
  3. Define a PageShell type with an ordered array of union sections (HeroBlock, FeatureGrid, TestimonialRef, FaqGroup).
  4. Replace raw HTML copy fields with Portable Text AST nodes that enforce accessible heading order and image alt attributes.

Illustration Outcome: Marketers assemble new campaign pages in minutes using approved blocks while mobile engineers render the same testimonials natively.

Content Modeling Quality Checklist

  • Audit field names to remove visual cues such as left, right, red, or popup.
  • Require descriptive alt text and focal-point metadata on all editorial image fields.
  • Constrain rich-text toolbars to semantic headings, lists, links, and approved embeds.
  • Add regex and length validations on slugs, meta titles, and meta descriptions.
  • Document maximum reference depth so API queries stay predictable.
  • Maintain schema migration scripts in version control alongside front-end code.

Frequently Asked Questions

How many content types should a typical web platform maintain?

Most well-modeled platforms operate smoothly with 12 to 30 focused content types. Hundreds of near-duplicate types usually signal page-layout modeling instead of domain modeling.

Why use JSON Rich Text AST instead of Markdown or HTML?

Rich text ASTs validate cleanly against schemas, support typed inline entry references, prevent unsafe script injection, and serialize easily to React, Swift, Kotlin, or HTML.

How do you prevent circular reference loops in GraphQL or REST?

Limit bidirectional references where possible, cap expansion depth in API queries, and test recursive resolvers against sample cyclic entries.

Should SEO fields live on every content type or in a shared component?

Define one reusable SEO component and attach it to routable page types so titles, descriptions, and indexing directives share identical validation rules.

Primary Standards & Specifications

  • JSON Schema Specification — Draft 2020-12 Core & Validation
  • W3C Web Content Accessibility Guidelines (WCAG) 2.2 — Semantic Structure & Non-Text Content
  • Schema.org Vocabulary Specifications — Structured Web Entities

Related Technical Guides