@dani-builder/strapi-plugin-builder
v0.5.0
Published
Daniworks Builder — reusable CMS components, content types, and smart API for Strapi v5
Maintainers
Readme
@dani-builder/strapi-plugin-builder
Reusable CMS building blocks for Strapi v5 — 11 content types, 31 block/element components, and a "smart API" that returns fully deep-populated pages and globals in a single request. Powers the Daniworks Builder block-based site builder.
Install
pnpm add @dani-builder/strapi-plugin-builder @strapi/plugin-color-picker @d3levvv/strapi-react-icons-pluginThe two peer plugins are required: builder components use their custom
fields (plugin::color-picker.color, plugin::icon-picker.icon), and Strapi
only loads plugins listed in your own package.json. Without them the app
fails to boot with Could not find Custom Field: plugin::color-picker.color.
Enable it in config/plugins.ts:
export default () => ({
builder: { enabled: true },
});Plugin-owned content types
The plugin directly registers all 11 content types as plugin::builder.*.
Do not copy schemas into a consumer's src/api directory: that would create
conflicting collectionName registrations. Core REST endpoints are available
under /api/builder/*.
The inquiry endpoint is write-only (POST /api/builder/inquiries) and IP
rate-limited so submitter PII cannot be listed over the public API.
Extending from your project
Add your own blocks to Page.blocks and extra fields to plugin components
from src/extensions/builder/strapi-server.ts in your Strapi project — no
plugin fork needed. Register populate for custom blocks with
strapi.plugin('builder').service('populate').registerBlock(uid, populate).
Step-by-step guide with the failure cases to avoid:
docs/guides/extending-builder.md.
Claude Code users get the same procedure as the builder-extender skill.
Smart API
Deep-populated, published-only reads (drafts never leak):
| Method | Endpoint | Purpose |
|--------|----------|---------|
| GET | /api/builder/pages | List pages (minimal populate) |
| GET | /api/builder/pages/:documentId | Single page, deep block populate |
| GET | /api/builder/global | Global settings, deep populate |
Consume it with @dani-builder/strapi-client.
License
MIT © HJ-company
