dkitdkit
dkit:module

Dynamic Page Builder

Composable pages with M2A content blocks

npx @kurbo/dkit add page-builder

Interactive install multi-selects UI components (defaults pre-selected). Schema only: npx @kurbo/dkit add page-builder --schema-only · With sample data: npx @kurbo/dkit add page-builder --seed

Schema

Collections and fields from this module's snapshot.json (dkit.rest). Names below are logical; dkit add applies your collection prefix.

All relations
  • builder_pages_blocks.builder_pages_id → builder_pages · on_delete CASCADE
  • builder_pages_blocks.item → ?
Access
  • dkit Pages Public Read
    Public read for pages and blocks (flat rules — Core-compatible). UI filters published status.
  • read → builder_pages [*]
  • read → block_hero [*]
  • read → block_richtext [*]
  • read → block_cta [*]
  • read → builder_pages_blocks [*]

Services

Fetch and write helpers installed as lib/dkit/page-builder.ts. Import from @/lib/dkit/page-builder. See Services.

  • async function getPageBuilderPageById(id: string): Promise<BuilderPage | null>
  • async function getPageBuilderPageBySlug(
      slug: string,
      options: GetPageBuilderPageBySlugOptions = {}
    ): Promise<BuilderPage | null>
  • Builder pages for the page-builder module. Defaults to status=published.

    async function getPageBuilderPages(options: GetPageBuilderPagesOptions = {}): Promise<BuilderPage[]>

UI preview

Preview uses a small sample page so you can inspect the M2A renderer.

npx @kurbo/dkit add page-renderer
page-renderer
Dynamic M2A block renderer
Loading preview…

page-renderer

Next · shadcn · dkit