Core Concepts & Architecture
Blocks sits in the Entries-dependent domain layer directly above Inertia, React, and Entries. It ships zero custom SQL tables and zero built-in content blocks: every layout and content block lives in your project’s ./site/blocks/*.yaml directory or in a lazy module block pack ('blocksPack' => true).
flowchart TD
INERTIA["Inertia (Protocol Layer)"] --> REACT["React (AppShell, SchemaForm, DataViewport)"]
REACT --> ENTRIES["Entries (Blueprints, EntryRepository, IndexManager)"]
ENTRIES --> BLOCKS["Blocks ($wire->blocks, BlockOntology, BlockTreeResolver)"]
BLOCKS --> WORKSPACE["ProcessBlocks (Setup > Blocks)"]
BLOCKS --> STUDIO["InputfieldBlocks (3-Zone Visual Studio)"]
BLOCKS --> RUNTIME["Dual Runtime (React/Inertia, PhpBlockRenderer, Headless)"]
BLOCKS -. Optional Boot .-> INTEGRATIONS["Sibling Integrations (Ai, Navigation, Forms, Seo, Media, Vite, Headless)"]
Five Hidden Governance Blueprints (BlocksBlueprints)
Section titled “Five Hidden Governance Blueprints (BlocksBlueprints)”All governance records are stored as hidden Entries collections enforcing permission: blocks-admin and sluggable: false (using explicit handle keys):
| Blueprint | Revisions | Role |
|---|---|---|
blocks-layouts |
15 |
Stores Template, Page, Global, and Panel Layouts with blocks_page_slot, header/footer bindings, and allowlists. |
blocks-reusable |
15 |
Stores centrally governed Reusable Blocks with cycle validation, delete usage guards, and optional allow_overrides. |
blocks-presets |
15 |
Stores visual Block Presets bound to a target_block (snapshot or centrally synced linked overlay). |
blocks-defaults |
0 |
Stores 1:1 project-wide Block Defaults per target_block cached in WireCache (Blocks.DefaultsMap). |
blocks-categories |
0 |
Stores managed Category taxonomy (title, handle, icon, sort) organizing Block Types, Reusables, and Presets. |
Engine Primitives & Root Fieldset
Section titled “Engine Primitives & Root Fieldset”BlocksBlueprints also registers two system primitives and one root embedded fieldset:
blocks_page_slot(role: slot): Marks where a page’s ownblocksstream injects inside a Template or Page Layout (closesScope: true,slotTargetField: target_field).blocks_reusable_ref(role: reference): Locked reference pointer (isLockedRef: true) embedded on pages or layouts pointing to ablocks-reusableentry.blocks(FieldtypeBlocks/BlocksField): Root embedded block container attached to ProcessWire templates (locksbindingModeto'embedded'and rejects Managed Table bindings). PlainEntriestype: blockscollections stay on the lean coreInputfieldEntriesBlockseditor.
Canonical Project File Paths
Section titled “Canonical Project File Paths”Keep Blocks blueprints separate from site/entries/blocks/:
Directorysite/
Directoryblocks/
- _tokens.yaml
Directoryfieldsets/
- content_heading.yaml
- settings_surface.yaml
- feature_banner.yaml
Directorytemplates/
Directoryblocks/
- feature_banner.php
Directoryassets/
Directoryjs/
Directoryblocks/
- BlockRenderer.tsx
- FeatureBannerBlock.tsx