Explaining ADMIN Model
Central Set’s core administrative model โ defines users, roles, permissions, menus, applications, security layers, dashboards, scheduled jobs, Arrow Flight exposure, and dynamic UI generation.
The ADMIN_MODEL is the foundational metadata model of Central Set.
It defines:
- the security model (users โข roles โข permissions โข row/column access)
- application & menu structure
- UI generation rules (forms โข datatables โข layouts โข custom components)
- dashboards
- scheduled jobs
- environment variables
- Arrow Flight / data service exposure
- access tokens
- translation & custom metadata
Everything lives inside one Markdown + YAML file โ the single source of truth.
central-set --init --model admin_model.md
or
central-set --update-metadata --model admin_model.md
๐ง Philosophy of the ADMIN Model
Central Set follows a strong model-driven architecture.
Instead of hand-writing:
- database tables
- CRUD endpoints
- RBAC rules
- forms & datagrids
- navigation menus
- dashboards
- background jobs
- data service endpoints
โฆ you declare the desired system in declarative YAML blocks inside Markdown.
The runtime then:
- creates / updates schema
- generates metadata entries
- builds REST-like APIs
- expose every table as OData v4 API
- renders admin UI automatically
- enforces multi-layer security
- exposes Arrow Flight endpoints (if configured)
๐ฆ High-Level Structure
ADMIN_MODEL.md
โโโ Model metadata (name, connection, behavior flags)
โโโ cs_app โ applications & menu groups
โโโ Core tables โ lang, role, users, user_role, app, menu, ...
โโโ Security tables โ role_app, role_app_menu, role_app_menu_table, row_level_access, ...
โโโ UI & metadata tables โ table, table_schema, menu_table, custom_table, custom_form, ...
โโโ Dashboard tables โ dashboard, dashboard_comment
โโโ Arrow Flight โ arrow_flight, arrow_flight_table, arrow_flight_table_scope, ...
โโโ Jobs & logging โ cron, cron_log, user_log
โโโ Integration & utils โ access_key, env, translate_table, translate_table_field
โ๏ธ Model Header
name: ADMIN
description: CS ADMIN Model
runs_as: MODEL
conn: '@DB_DRIVER_NAME:@DB_DSN'
create_all: checkfirst
_drop_all: checkfirst
update_table_metadata: true
active: true
Most important flags:
| Field | Typical value | Meaning |
|---|---|---|
conn | @DB_โฆ | Database connection string (env vars) |
create_all | checkfirst | Create tables if missing |
update_table_metadata | true | Refresh table & table_schema entries |
active | true | Load this model on startup |
๐งฉ Application & Menu Structure (cs_app)
cs_app:
Dashboards:
menu_icon: document-report
menu_order: 1
active: true
tables:
- dashboard
Admin:
menu_icon: user-group
menu_order: 2
tables:
- app
- menu
- role
- users
## โฆ
This block automatically creates:
- sidebar menu groups
- icons & ordering
- associated tables (shown as sub-items or default views)
๐ Security Layers
Central Set implements four levels of access control:
- Application access โ
role_app - Menu access โ
role_app_menu - Table / CRUD access โ
role_app_menu_table(create/read/update/delete/share) - Row Level Access (RLA) โ
role_row_level_access/row_level_access
Typical flow:
User โ Role(s) โ App permission โ Menu permission โ Table CRUD permission โ Row filter
๐ฅ๏ธ Automatic UI Generation
Every table can carry UI hints:
columns:
username:
type: varchar(50)
unique: true
nullable: false
form_display: true
table_display: true
form_size: 4
order: 1
Common UI properties:
| Property | Effect |
|---|---|
form_display | Show in create/update forms |
table_display | Show as column in list view |
form_size | Bootstrap column width (1โ12) |
form_long_text | Use textarea instead of input |
form_code | markdown, json, sql, โฆ โ code editor mode |
form_att | File / attachment upload |
Form layout control:
form_layout:
tabs_steps: tabs
form_in_popup: false
size: 9
๐๏ธ Custom UI Extensions
Via table_extra_options:
table_extra_options:
- {size: 12, component: EvidenceDash, label: dashboard, intercept_r: true}
- {size: 12, component: AdminApps, label: permissions, icon: key, pop_up: true}
Popular built-in components:
EvidenceDashโ renders markdown dashboardsAdminAppsโ permission matrix / role editorAccessKeyโ token generation & display
๐ Dashboards
Dashboards are stored as markdown + configuration:
dashboard_conf: { type: text, form_code: markdown }
The EvidenceDash component interprets this field and can embed:
- SQL query results
- charts
- ETLX results
- external API data
- markdown content
๐ Arrow Flight / Data Service Exposure
arrow_flight:
flight_schema: adm
startup_sql: "ATTACH 'database/ADMIN.db' AS adm (TYPE SQLITE);"
main_sql: "USE adm;"
Allows Central Set to act as an Arrow Flight server, exposing selected tables/scopes to:
- Python (pyarrow)
- R
- BI tools with Arrow Flight support
- Datafusion, Polars, โฆ
โฑ๏ธ Scheduled Jobs (cron)
cron:
cron: "0 0 * * *"
api: "etlx/name/daily-backup"
active: true
Central Set comes with a built-in cron runner that calls internal APIs.
๐ Access Keys & Environment Variables
access_keyโ bearer tokens for machine-to-machine accessenvโ centrally managed environment variables (usable via@ENV_NAME)
Summary โ Why one big model?
By keeping everything in one declarative Markdown/YAML file you get:
- Git-versioned infrastructure
- Reproducible environments
- Self-documenting schema
- Automatic security & UI generation
- Easy auditing & review
- LLM-assisted modifications possible
The ADMIN_MODEL is effectively the constitution of your Central Set instance.
Feel free to extend it โ every new table, role, menu group or dashboard added here immediately becomes part of the live system.
Last updated 23 2026, 10:04 -01 .