MVC::Keayl::Admin

Every page of the MVC::Keayl::Admin manual, in reading order.

  • Overview MVC::Keayl::Admin is a generated admin interface for MVC::Keayl apps. The manual covers mounting, registering resources, index, show, and form pages, filters, scopes, actions, and access control.
  • Installation Installing MVC::Keayl::Admin and running the keayl-admin generators: admin:install mounts the engine and writes stubs, and admin <Model> writes a resource registration.
  • Mounting Mounting the admin engine with MVC::Keayl::Admin.endpoint, the mount-path, site-title, and logout-path settings set through configure, and the per-request admin context.
  • Registering resources Registering a model with register: the DSL declarations, resource options such as slug, per-page, and export, registration-time validation, names and slugs, and path-for.
  • Index pages Index tables built from column declarations: formatters such as link-to-show and status-tag, :html columns, row actions, sorting, pagination with per-page, and HTMX swaps.
  • Index presentations and panels Card grid and stacked list index presentations declared with index and :as, sidebar sections with sidebar, and show-page panels and tabs with panel and tab.
  • Filters Index filters declared with filter: the string, numeric, boolean, date, date-range, and select types, their predicates, select collections, and the offcanvas filter panel.
  • Scopes Named scopes declared with scope and an optional :default, resolution from the query string, scope tabs that swap over HTMX, and per-scope counts controlled by scope-counts.
  • Show pages Show pages built from attribute declarations with :display, :format, and :html, the per-record action panel, and how belongs-to and has-many associations render.
  • Nested resources Nesting a resource under a parent association with belongs-to, the nested routes and parent scoping it adds, and eager loading index associations with includes.
  • Forms New and edit forms built from field declarations: input types by :as, labels, hints, and :value blocks, the permit allowlist, validation errors, nested attributes, and file uploads.
  • Actions Deleting records with an HTMX DELETE behind a Bootstrap confirmation modal, bulk operations with batch-action, and custom member-action and collection-action handlers.
  • Action availability and toolbar Narrowing a resource's default actions with actions, a default sort with sort-order, turning off filters and batch actions, and toolbar buttons with action-item.
  • Authentication Admin authentication with authenticate-with, the HTTP basic and session strategies, the current admin in controllers and views, and a navbar logout link via logout-path.
  • Authorization Authorization policies with allows and scope, installed with authorize-with, how forbidden actions and their controls are handled, and the role-based permissions adapter.
  • Layout and chrome The Bootstrap 5 admin layout with its top bar, sidebar, flash area, and breadcrumbs, rendering pages through render-admin with page-title and breadcrumbs, and admin-context.
  • Navigation Sidebar entries with menu and icon, group ordering with menu-group-order, custom internal and external links with menu-link, and dashboard panels with dashboard-block.
  • Customization CSV, JSON, and XML export with csv and the export option, standalone pages with page, localization with load-locales and locale, and theming with view-path and CSS variables.
  • Assets The vendored Bootstrap, Bootstrap Icons, and htmx bundle: how the engine serves and fingerprints it, overriding styles with use-stylesheet, and asset licenses.
  • Worked example A worked blog admin for authors and posts using menu groups, columns, filters, scopes, forms, nested fields, a member action, a role policy, and a dashboard panel.
  • Configuration reference Tables of the methods called on MVC::Keayl::Admin, including endpoint, configure, register, page, menu-link, authenticate-with, authorize-with, and locale, plus the keayl-admin generators.