Core Concepts

Understand the building blocks of Schemaful: schemas, fields, entries, assets, and locales.

Schemas

A schema defines a content type. Think of it as a blueprint for your content. Each schema has an ID, display name, and a collection of fields.

Example: Blog Post Schema
{
  id: "blog-post",
  name: "Blog Post",
  description: "Articles for the company blog",
  displayField: "title"  // Field shown in entry lists
}

Schemas are stored in the cms_schemas table.

Fields

Fields define the structure of content within a schema. Schemaful supports 10 field types:

TypeDescriptionExample
SymbolShort text (max 256 chars)Title, slug
TextLong text (unlimited)Description, excerpt
RichTextStructured rich text (JSON)Article body
IntegerWhole numbersOrder, count
NumberDecimal numbersPrice, rating
BooleanTrue/falsePublished, featured
DateISO date stringPublish date
LocationLat/long coordinatesStore location
LinkReference to entry/assetAuthor, hero image
ArrayList of any type aboveTags, gallery

Fields can be required, localized, and have validations.

Entries

An entry is an instance of a schema—your actual content. Entries are stored per-locale with JSONB data.

Example: Blog Post Entry
{
  id: "abc123",
  schemaId: "blog-post",
  locale: "en",
  data: {
    title: "Getting Started with Schemaful",
    slug: "getting-started",
    content: { /* RichText JSON */ },
    author: { sys: { id: "author-1", linkType: "Entry" } }
  },
  publishedAt: "2025-01-15T10:00:00Z"
}

Entries can be draft (unpublished) or published. The same entry ID can have different content per locale.

Assets

Assets are media files (images, documents, videos) with localized metadata.

Example: Asset
{
  id: "img-001",
  locale: "en",
  title: "Hero Image",
  description: "Homepage hero banner",
  fileName: "hero.jpg",
  contentType: "image/jpeg",
  url: "https://cdn.example.com/hero.jpg",
  width: 1920,
  height: 1080
}

Assets are referenced from entries using Link fields with linkType: "Asset".

Locales

Locales define the languages your content supports. Each locale has a code, name, and optional fallback chain.

Example: Locales
// Default locale
{ code: "en", name: "English", isDefault: true }

// With fallback chain
{ code: "fr-CA", name: "French (Canada)", fallbackCode: "fr" }
{ code: "fr", name: "French", fallbackCode: "en" }

When content is missing in a locale, Schemaful falls back through the chain.fr-CA → fr → en

Links & References

The Link field type creates references between content.

Link Structure
// Entry link
{
  sys: {
    id: "author-123",
    linkType: "Entry"
  }
}

// Asset link
{
  sys: {
    id: "image-456",
    linkType: "Asset"
  }
}

When fetching entries, you can resolve links to include the full referenced content (avoiding N+1 queries).

Next Steps