Skip to content

@mabulu-inc/simplicity-admin-ui

The ui package implements the UIProvider interface from core. It is a SvelteKit application that renders the admin interface based on introspected schema metadata.

Dependencies: @mabulu-inc/simplicity-admin-core

The UI maps column types to components automatically:

Column TypeComponent
text, varcharText input
integer, numericNumber input
booleanToggle switch
dateDate picker
timestampDateTime picker
uuid (FK)Relation picker
enumDropdown select
json, jsonbJSON editor

No configuration is needed for basic rendering. Adding a column to your database table is enough for the corresponding form field to appear.

The top-level layout containing the sidebar, top bar, and content area.

Navigation generated from the introspected tables. Tables are listed alphabetically and grouped by schema if multiple schemas are configured.

Displays the current view title, breadcrumbs, and user menu (role display, role switching, logout).

The list view component. Supports sorting, filtering, pagination, column visibility, and row selection. Columns are generated from ColumnMeta.

The detail/create/edit form component. Fields are generated from ColumnMeta and RelationMeta. Validation rules are derived from column constraints (not-null, type, length).

Views can be customized at four levels, each overriding the previous:

  1. Auto-generated — Default views derived from schema metadata
  2. Developer YAML — Custom view definitions in views/*.view.yaml
  3. Admin overrides — Admins can adjust views via the UI (column order, visibility, defaults)
  4. User saved views — Individual users can save personal view configurations
views/products.view.yaml
table: products
list:
columns: [name, status, category, created_at]
defaultSort: created_at:desc
filters:
- column: status
operator: equalTo
default: ACTIVE
detail:
sections:
- title: Basic Info
columns: [name, description, status]
- title: Relations
columns: [category_id]

The UI uses CSS custom properties for theming. Override tokens to match your brand:

:root {
--sa-color-primary: #4f46e5;
--sa-color-surface: #ffffff;
--sa-color-text: #1f2937;
--sa-radius: 0.375rem;
--sa-font-family: 'Inter', sans-serif;
}