Skip to content

overlay.rk ​

Company layer (layer 4): fields, rules and view tweaks an organisation adds to an app model, in <site>/custom/<model>.rk. The kernel merges them onto the app model at load; app upgrades never touch them.

Lives in <site>/custom/<model>.rk · Schema overlay.json (source) · first line: # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/overlay.json

Properties ​

PropertyTypeMeaning
model requirednameThe app model this overlay extends; must equal the file name
pattern ^[a-z][a-z0-9_]{0,62}$
labellabelThe company's word for the model (page title, the create button, widget titles); replaces the app model's label (contract 0049 §5)
label.id requiredstring
label.enstring
labelsmap of labelThe company's words for fields of the app model, by field name; each replaces that field's label (contract 0049 §5)
fieldslist of items
ruleslist of object
rules[].name required
rules[].on requiredsave · submit · cancel
rules[].levelerror · warn · info
rules[].check required
rules[].message required
approvalslist of object
approvals[].name required
approvals[].on requiredsubmit, cancel or an action name of this model
approvals[].whenPolicy applies only when this is true (absent = always)
approvals[].approvers requiredlist of itemsRoles that may approve; owner always may
at least 1
approvals[].label
viewsobject
views.formobject
views.form.addlist of object
views.form.add[].field requirednamesnake_case, never renamed once released
pattern ^[a-z][a-z0-9_]{0,62}$
views.form.add[].afternamePlace after this field or column; at the end when omitted
pattern ^[a-z][a-z0-9_]{0,62}$
views.form.layoutlist of orReplaces the app model's form layout; fields it leaves out are not shown (views.form.add still applies after it)
at least 1
views.form.layout[].section required
views.form.layout[].fieldslist of items
views.form.layout[].columnslist of list of items
at most 2
views.form.layout[].tab
views.listobject
views.list.addlist of object
views.list.add[].field requirednamesnake_case, never renamed once released
pattern ^[a-z][a-z0-9_]{0,62}$
views.list.add[].afternamePlace after this field or column; at the end when omitted
pattern ^[a-z][a-z0-9_]{0,62}$
views.list.columnslist of stringReplaces the list columns (views.list.add still applies after it)
at least 1
views.kanbanobject
views.kanban.columnslist of stringOrder of the kanban group_by option values; values left out are hidden
at least 1
optionsmap of list of objectOptions appended to a select field of the model, by field name

add ​

PropertyTypeMeaning
field requirednamesnake_case, never renamed once released
pattern ^[a-z][a-z0-9_]{0,62}$
afternamePlace after this field or column; at the end when omitted
pattern ^[a-z][a-z0-9_]{0,62}$

Example ​

From rangka-apps/examples/sites/demo-jasa/custom/quotation.rk (first 60 lines):

yaml
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/overlay.json
# The firm's own rule (contract 0007 §1): cancelling a submitted quotation also needs a sales manager, so a revision
# (quotation.revise cancels first) by someone else waits for approval.
model: quotation
approvals:
  - name: cancel_approval
    on: cancel
    approvers: [sales_manager]
    label: {id: Persetujuan manajer untuk membatalkan penawaran, en: Manager approval to cancel a quotation}

Generated from the schema by website/scripts/gen-reference.mjs. Edit the schema, not this page.

Rangka OS is source-available under the Elastic License 2.0 (ELv2). Free to self-host.