paulserban.eu

Writing Edition

Paul Serban

Writing, snippets & book notes

Cheat sheet - Post

Builder.io: Visual Headless CMS Architecture and AI-Assisted Code Generation

← Back to Builder.io Explained: The Visual Headless CMS Engineers Actually Want to Use

Builder.io is a visual headless CMS that lets non-engineers compose pages from real, developer-registered UI components rather than raw JSON fields, while engineers retain control of the component library and rendering pipeline.

Overview

Key Concepts

Visual Headless Architecture

Content API and Delivery

SDK Generations and Component Registration

export const customComponents: RegisteredComponent[] = [
  {
    component: ProductCard,
    name: "ProductCard",
    inputs: [
      { name: "title", type: "string", required: true },
      { name: "price", type: "number", required: true },
    ],
  },
];

Visual Copilot (Figma-to-Code)

Fusion (AI Agent)

Trade-offs / Caveats

Example in Practice

A Next.js App Router page fetches content server-side and renders it through Builder's Content component with a typed registry:

const content = await fetchOneEntry({
  model: "page",
  apiKey: BUILDER_PUBLIC_API_KEY,
  userAttributes: { urlPath },
});

return (
  <Content
    model="page"
    content={content}
    apiKey={BUILDER_PUBLIC_API_KEY}
    customComponents={customComponents}
  />
);

This mirrors a normal server-rendered React app rather than replacing the rendering pipeline - Builder.io is designed to sit inside existing architecture, not act as a monolithic site builder.

Related topics