cardinal

RecTypes and Records

Describe data in YAML. Cardinal gives you tables, views, an API and permissions.

A RecType describes a kind of data. A Record is one row of it. An app keeps its RecTypes as YAML in rectypes/:

rectypes/project.yaml
schema: 1
name: Project
module: Projects
title_field: project_name
fields:
  - {fieldname: project_name, fieldtype: Data, label: Name, in_list_view: true}
  - {fieldname: owner_user, fieldtype: Link, label: Lead, options: User}
  - {fieldname: status, fieldtype: Select, label: Status, options: "Open\nClosed", in_standard_filter: true}
  - {fieldname: budget, fieldtype: Currency, label: Budget}
permissions:
  - {role: System Manager, rights: [read, write, create, delete, report]}
  - {role: All, if_owner: true, rights: [read, write]}

cardinal meta check validates every app's RecType, permission and website files.

What you get

  • A table in each tenant's schema that has the app installed.
  • List, form and report views in the desk with no frontend code, plus Kanban, calendar, Gantt, map and tree views when the RecType has the fields they need.
  • GET, POST, PUT and DELETE on /api/rec/Project, with permission checks on every path.

Where to go next

TopicPage
Save, submit, cancel and amendRecord lifecycle
How a new Record gets its nameNaming
permissions, permlevel and if_ownerPermissions
Changing an app's RecType for one siteCustomization
depends_on and other conditionsExpressions

On this page