Reading database constraint errors the admin can explain to a user.
Reading database constraint errors the admin can explain to a user.
Display roles for the admin overview (ADR-040).
A field's role says what its value is to a reader — a relation, money, a
due date — and decides how a list cell renders it. Roles are derived from
the field's type, its name and the entity's relations; an explicit
:display in the field config wins. Pure: config in, data out.
Display roles for the admin overview (ADR-040). A field's role says what its value is to a reader — a relation, money, a due date — and decides how a list cell renders it. Roles are derived from the field's type, its name and the entity's relations; an explicit `:display` in the field config wins. Pure: config in, data out.
What an entity form shows, which of a form's errors it cannot show next to a field, and the child rows a parent is created with (BOU-570).
What an entity form shows, which of a form's errors it cannot show next to a field, and the child rows a parent is created with (BOU-570).
Who may do what in the admin, as pure decisions.
Under :wagoe/authorization :mode :off and :report today's rule
decides: the :admin role. Under :enforce the user's rights do
(ADR-041 §6): admin.<entity>/read to see an entity, admin.<entity>/write
to change it, each held in scopes the entity can check. A platform admin
holds everything, everywhere.
The shell puts the request's rights on the user map under ::access
(with-access); a user without it is decided by the role.
Who may do what in the admin, as pure decisions. Under `:wagoe/authorization :mode :off` and `:report` today's rule decides: the `:admin` role. Under `:enforce` the user's rights do (ADR-041 §6): `admin.<entity>/read` to see an entity, `admin.<entity>/write` to change it, each held in scopes the entity can check. A platform admin holds everything, everywhere. The shell puts the request's rights on the user map under `::access` (`with-access`); a user without it is decided by the role.
Pure functions for database schema introspection and entity configuration.
This namespace contains pure business logic for transforming raw database metadata into UI-friendly entity configurations. All functions are pure (no side effects) and testable without database connections.
Key responsibilities:
Pure functions for database schema introspection and entity configuration. This namespace contains pure business logic for transforming raw database metadata into UI-friendly entity configurations. All functions are pure (no side effects) and testable without database connections. Key responsibilities: - Parse database column metadata into field configurations - Infer appropriate UI widgets from database types - Detect relationships and foreign keys - Merge auto-detected configuration with manual overrides - Generate sensible defaults for labels and field ordering
Admin UI components using Hiccup for server-side HTML generation.
This namespace is a thin FACADE: the implementation lives in focused
sibling namespaces under wagoe.admin.core.ui.*. Every public function
consumers rely on is re-exported here so admin-ui/entity-list-page,
ui/format-field-label, etc. keep resolving unchanged.
Implementation namespaces:
wagoe.admin.core.ui.base — shared URL/field/column primitiveswagoe.admin.core.ui.layout — sidebar nav, home, error pageswagoe.admin.core.ui.list — entity list page, table, rows, searchwagoe.admin.core.ui.filters — advanced filter builderwagoe.admin.core.ui.inline-editing — inline (double-click) cell editingwagoe.admin.core.ui.detail — detail/edit page, form, field groupingwagoe.admin.core.ui.drawer — the record drawer beside the listSee each impl namespace for the original docstrings on these functions.
Admin UI components using Hiccup for server-side HTML generation. This namespace is a thin FACADE: the implementation lives in focused sibling namespaces under `wagoe.admin.core.ui.*`. Every public function consumers rely on is re-exported here so `admin-ui/entity-list-page`, `ui/format-field-label`, etc. keep resolving unchanged. Implementation namespaces: - `wagoe.admin.core.ui.base` — shared URL/field/column primitives - `wagoe.admin.core.ui.layout` — sidebar nav, home, error pages - `wagoe.admin.core.ui.list` — entity list page, table, rows, search - `wagoe.admin.core.ui.filters` — advanced filter builder - `wagoe.admin.core.ui.inline-editing` — inline (double-click) cell editing - `wagoe.admin.core.ui.detail` — detail/edit page, form, field grouping - `wagoe.admin.core.ui.drawer` — the record drawer beside the list See each impl namespace for the original docstrings on these functions.
Shared admin UI primitives used across multiple ui.* sections.
Leaf namespace: URL helpers, field-value rendering, list-column width heuristics, and small formatting/label utilities. Must NOT require any other wagoe.admin.core.ui.* implementation namespace — it is the dependency root that the focused sections build on.
Shared admin UI primitives used across multiple ui.* sections. Leaf namespace: URL helpers, field-value rendering, list-column width heuristics, and small formatting/label utilities. Must NOT require any other wagoe.admin.core.ui.* implementation namespace — it is the dependency root that the focused sections build on.
List cells rendered by display role (ADR-040).
cell turns one value into the content of its list cell according to the
field's role; cell-class is the class every cell of that role carries, so
the stylesheet styles roles, never fields. What a cell needs beyond the
value — a relation's title, a has-many count, the time — arrives in the
overview the shell computed for the page. Pure Hiccup.
List cells rendered by display role (ADR-040). `cell` turns one value into the content of its list cell according to the field's role; `cell-class` is the class every cell of that role carries, so the stylesheet styles roles, never fields. What a cell needs beyond the value — a relation's title, a has-many count, the time — arrives in the overview the shell computed for the page. Pure Hiccup.
Entity detail/edit page components: form widgets, field grouping, the entity form, parent-context/related-records tables, and the detail page.
Pure Hiccup generators. Depends on base for URL and field helpers.
Entity detail/edit page components: form widgets, field grouping, the entity form, parent-context/related-records tables, and the detail page. Pure Hiccup generators. Depends on `base` for URL and field helpers.
The record drawer: one record beside its list, opened by clicking its row.
Read-only, rendered by the same display roles as the list cells (ADR-040), so a relation is a name, an enum a badge, money formatted. Editing stays on the detail page; the drawer links there. Pure Hiccup.
The record drawer: one record beside its list, opened by clicking its row. Read-only, rendered by the same display roles as the list cells (ADR-040), so a relation is a name, an enum a badge, money formatted. Editing stays on the detail page; the drawer links there. Pure Hiccup.
Advanced filter builder components for admin entity lists.
Pure Hiccup generators for the filter UI: operator selection per field type, value inputs, filter rows, and the overall filter builder.
Advanced filter builder components for admin entity lists. Pure Hiccup generators for the filter UI: operator selection per field type, value inputs, filter rows, and the overall filter builder.
Inline (double-click) table-cell editing components.
Pure Hiccup generators for the editable-cell display mode, the inline edit form, and the inline edit form with a validation error.
Inline (double-click) table-cell editing components. Pure Hiccup generators for the editable-cell display mode, the inline edit form, and the inline edit form with a validation error.
Admin nav contribution, page layout, error pages, and URL utilities.
Pure Hiccup generators for the admin chrome: the admin's contribution to
the sidebar of the shell in wagoe.shared.ui.core.shell, the dashboard
home, 403/404 error pages and the build-table-url helper.
Admin nav contribution, page layout, error pages, and URL utilities. Pure Hiccup generators for the admin chrome: the admin's contribution to the sidebar of the shell in `wagoe.shared.ui.core.shell`, the dashboard home, 403/404 error pages and the `build-table-url` helper.
Entity list-page components: search form, table rows, table, and the complete list page (toolbar + filter builder + table).
Pure Hiccup generators. Depends on base for URL helpers, field-value
rendering, and column sizing, and on filters for the filter builder.
Entity list-page components: search form, table rows, table, and the complete list page (toolbar + filter builder + table). Pure Hiccup generators. Depends on `base` for URL helpers, field-value rendering, and column sizing, and on `filters` for the filter builder.
Admin module port definitions (abstract interfaces).
This namespace defines all ports (abstract interfaces) that the admin module needs to provide auto-generated CRUD interfaces and administrative operations. These ports follow Wagoe's hexagonal architecture pattern, allowing core business logic to remain pure and testable while enabling flexible adapter implementations.
Port Categories:
Each port is implemented by adapters in the shell layer, enabling dependency inversion and supporting multiple database backends (PostgreSQL, SQLite, MySQL, H2).
Admin module port definitions (abstract interfaces). This namespace defines all ports (abstract interfaces) that the admin module needs to provide auto-generated CRUD interfaces and administrative operations. These ports follow Wagoe's hexagonal architecture pattern, allowing core business logic to remain pure and testable while enabling flexible adapter implementations. Port Categories: - Schema Introspection Ports (ISchemaProvider) - Admin Service Ports (IAdminService) - Action Executor Ports (IActionExecutor) Each port is implemented by adapters in the shell layer, enabling dependency inversion and supporting multiple database backends (PostgreSQL, SQLite, MySQL, H2).
Malli schemas for admin module configuration and entities.
This namespace defines all schemas used by the admin module for:
All schemas follow Malli specifications and include documentation for auto-generated validation and error messages.
Malli schemas for admin module configuration and entities. This namespace defines all schemas used by the admin module for: - Admin module configuration and settings - Entity configuration and metadata - Field-level configuration - Validation and transformation All schemas follow Malli specifications and include documentation for auto-generated validation and error messages.
HTTP routes for the admin interface.
This namespace wires the admin panel's web routes to their handlers.
Handlers live in wagoe.admin.shell.http.handlers.* and their
shared plumbing (middleware, error mappings, query/form parsing, handler
helpers) lives in wagoe.admin.shell.http.support.
The admin UI provides:
All routes require authentication. Who may do what is
wagoe.admin.core.permissions.
HTTP routes for the admin interface. This namespace wires the admin panel's web routes to their handlers. Handlers live in `wagoe.admin.shell.http.handlers.*` and their shared plumbing (middleware, error mappings, query/form parsing, handler helpers) lives in `wagoe.admin.shell.http.support`. The admin UI provides: - Entity list pages with search, sort, and pagination - Entity detail/edit pages with forms - Create and update handlers with validation - Delete and bulk delete operations - HTMX fragment handlers for dynamic updates All routes require authentication. Who may do what is `wagoe.admin.core.permissions`.
Create / update entity handlers.
Create / update entity handlers.
Delete + bulk-delete entity handlers.
Delete + bulk-delete entity handlers.
Entity detail / edit page handlers (view existing + new-entity form).
Entity detail / edit page handlers (view existing + new-entity form).
Inline editing handlers (Week 2): per-field edit widget, update, cancel.
Inline editing handlers (Week 2): per-field edit widget, update, cancel.
Admin home + entity list handlers.
Renders the dashboard, the entity list page, and the HTMX table fragment.
Admin home + entity list handlers. Renders the dashboard, the entity list page, and the HTMX table fragment.
Shared plumbing for the admin HTTP layer.
Leaf namespace requiring no handler or route namespaces. Provides the
error mappings, query/form parsing, and handler helpers used by the handler
namespaces and the route definitions in wagoe.admin.shell.http.
Shared plumbing for the admin HTTP layer. Leaf namespace requiring no handler or route namespaces. Provides the error mappings, query/form parsing, and handler helpers used by the handler namespaces and the route definitions in `wagoe.admin.shell.http`.
Integrant lifecycle management for admin module.
This namespace defines Integrant initialization and shutdown methods for all admin module components:
Dependencies are injected via Integrant refs, maintaining FC/IS separation and enabling testability with mock implementations.
Integrant lifecycle management for admin module. This namespace defines Integrant initialization and shutdown methods for all admin module components: - Schema provider (ISchemaProvider implementation) - Admin service (IAdminService implementation) - Admin routes (HTTP routes) Dependencies are injected via Integrant refs, maintaining FC/IS separation and enabling testability with mock implementations.
Permission assertions for admin access control.
These wrappers throw typed ex-info (:type :forbidden) when a permission
check fails, so they live in the shell — the pure decision logic (the
can-*? predicates and explain-admin-access-denial) stays in
wagoe.admin.core.permissions. HTTP handlers call these guards; the
platform error interceptor maps :forbidden to a 403 response.
Under :wagoe/authorization :mode :report they also log what :enforce
would refuse, and let it through, once a minute per user and entity.
Permission assertions for admin access control. These wrappers throw typed `ex-info` (`:type :forbidden`) when a permission check fails, so they live in the shell — the pure decision logic (the `can-*?` predicates and `explain-admin-access-denial`) stays in `wagoe.admin.core.permissions`. HTTP handlers call these guards; the platform error interceptor maps `:forbidden` to a 403 response. Under `:wagoe/authorization :mode :report` they also log what `:enforce` would refuse, and let it through, once a minute per user and entity.
Schema repository implementation for database metadata retrieval.
This namespace provides the concrete implementation of ISchemaProvider, connecting to the database through existing adapter protocols to fetch table and column metadata.
Responsibilities:
Caching: computed entity configurations are cached in an atom inside the
long-lived SchemaRepository component (populated on first access). Table
schemas only change at migration/deploy time, so the cache lives as long
as the component. Use reset-cache! (or recreate the component via
(ig-repl/reset)) to invalidate after a migration.
Schema repository implementation for database metadata retrieval. This namespace provides the concrete implementation of ISchemaProvider, connecting to the database through existing adapter protocols to fetch table and column metadata. Responsibilities: - Fetch raw database metadata using adapter protocols - Coordinate with pure core functions for parsing and merging - Cache entity configurations for performance - Provide entity discovery based on configuration Caching: computed entity configurations are cached in an atom inside the long-lived SchemaRepository component (populated on first access). Table schemas only change at migration/deploy time, so the cache lives as long as the component. Use `reset-cache!` (or recreate the component via (ig-repl/reset)) to invalidate after a migration.
The admin service as one user may use it under :enforce (ADR-041 §6):
lists, counts and overviews show only rows inside their scopes; a record
outside them is not found; a write that would leave a record outside them
is refused. Built per request around the shared service, so every list the
handlers ask for, a foreign key's options included, is scoped.
The admin service as one user may use it under `:enforce` (ADR-041 §6): lists, counts and overviews show only rows inside their scopes; a record outside them is not found; a write that would leave a record outside them is refused. Built per request around the shared service, so every list the handlers ask for, a foreign key's options included, is scoped.
Admin service implementation for CRUD operations on entities.
This service provides database-agnostic CRUD operations on any entity managed by the admin interface. It coordinates between schema providers, permission checks, and database operations.
Responsibilities:
Admin service implementation for CRUD operations on entities. This service provides database-agnostic CRUD operations on any entity managed by the admin interface. It coordinates between schema providers, permission checks, and database operations. Responsibilities: - Execute CRUD operations with observability - Apply pagination, filtering, sorting - Validate permissions and entity access - Transform data between DB and application formats - Handle soft/hard deletes, children included, as the config says
The users entity's writes, through the user service, so an admin edit gets its audit entry, session reset and last-admin guard (BOU-665).
The users entity's writes, through the user service, so an admin edit gets its audit entry, session reset and last-admin guard (BOU-665).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |