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:

FieldTypical valueMeaning
conn@DB_โ€ฆDatabase connection string (env vars)
create_allcheckfirstCreate tables if missing
update_table_metadatatrueRefresh table & table_schema entries
activetrueLoad 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:

  1. Application access โ€” role_app
  2. Menu access โ€” role_app_menu
  3. Table / CRUD access โ€” role_app_menu_table (create/read/update/delete/share)
  4. 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:

PropertyEffect
form_displayShow in create/update forms
table_displayShow as column in list view
form_sizeBootstrap column width (1โ€“12)
form_long_textUse textarea instead of input
form_codemarkdown, json, sql, โ€ฆ โ†’ code editor mode
form_attFile / 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 dashboards
  • AdminApps โ€” permission matrix / role editor
  • AccessKey โ€” 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 access
  • env โ†’ 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.

More Details

Last updated 23 2026, 10:04 -01 . history

Was this page helpful?