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 20 Mar 2026, 09:11 -01 . history

Was this page helpful?