Not released yet. PeltyCMS is under development and not released yet; these docs describe the upcoming release and may change.
PeltyCMS Developer docs
User docsDevelopers
v0.1.0

Developer docs/Extension reference

UI schema

Declarative plugin UI: plugins describe pages and slot contributions as a JSON node tree that the frontend renders natively with shadcn components and the active theme. No plugin JavaScript ever runs in the app; embed (a sandboxed iframe) is a documented last resort behind the ui.embed capability.

#Node types

Every node type the renderer understands. Unknown types are rejected at manifest load so a plugin never renders half-broken.

Limits: at most 2000 nodes and depth 32 per tree.

#Slots

Positions an addon can fill on every page. A slot name is <area>.<route>.<position>: area is admin or client, route is the page's route key (path segments without ids joined by -, e.g. /admin/invoices/42 → invoices, /admin/settings/tax → settings-tax) or * for every page. replace:<section> swaps out a named section.

KindValues
Page positionsbefore, after, toolbar, row-actions, tabs, detail-panel
Layout positionsheader, sidebar, footer, banner

Slots a plugin can fill with a node tree. Context keys available as {{ctx.*}} are listed next to each slot.

SlotContext keys
admin.dashboard
client.dashboard
admin.service.detailctx.service_id
admin.customer.detailctx.customer_id
admin.order.detailctx.order_id
admin.invoice.detailctx.invoice_id
client.home

#UiPage

FieldTypeRequiredDescription
idStringyes[a-z0-9-], unique per plugin; route /admin/p/<plugin>/<id> or /p/<plugin>/<id>.
areaStringyesadmin or client.
titleStringyesTranslation key in plugin.<id>.*.
iconOption<String>noPhosphor icon name (PascalCase without Icon), e.g. HardDrives.
navboolnoShow in the sidebar.
hubOption<String>noNav category whose hub lists the page (billing, addons, …).
permissionOption<String>no
dataBTreeMap<String, DataSource>no
bodyValuenoDeclarative node tree (or null when frame is set).
frameOption<Frame>no

Source: crates/pelty-extensions/src/ui_schema.rs (UiPage).

#UiSlotContribution

FieldTypeRequiredDescription
slotStringyes
permissionOption<String>no
dataBTreeMap<String, DataSource>no
bodyValueno
frameOption<Frame>no
orderi32noOrder among contributions to the same slot (lower first).

Source: crates/pelty-extensions/src/ui_schema.rs (UiSlotContribution).

#Frame

A sandboxed iframe served from the addon's own assets/ folder.

FieldTypeRequiredDescription
srcStringyesPackage path, e.g. assets/ui/index.html (served at /api/v1/addons/<id>/assets/ui/index.html).
heightOption<u32>noInitial height in px (the frame auto-resizes via the bridge).

Source: crates/pelty-extensions/src/ui_schema.rs (Frame).

#DataSource

FieldTypeRequiredDescription
getStringyesGET path under /api/v1/; may contain {{ctx.*}} / {{params.*}}.
refresh_secsOption<u32>noAuto-refresh interval (5..=3600 s).

Source: crates/pelty-extensions/src/ui_schema.rs (DataSource).

#Example

See Addon UI.