Skip to content

App definition

The typed keys of an App's definition file, each linked to the page that explains it, with Leaseline's App as the example.

An App is declared in one file in its folder, apps/[app]/app.mdx, and a Product sells it by naming App in its $type. A wrong key or value fails its check before it compiles.

Keys

apps/[app]/app.mdx declares one App. Frontmatter only.

KeyTypeRequiredHolds
kindsaas | admin | directory | commerceThe App kind; saas when unset
mountpathWhere it serves on the Domain; /app, or /admin for admin
nounsNoun namesrequiredThe Nouns it shows, a list and a record screen each
personasmapEach Persona who signs in
personas.*.mayVerb idsThe Verbs that Persona may call; each one is a button and a form
slotsmapA Component per slot: list.toolbar, list.empty, record.header, record.aside, record.actions, record.tab, form.after, dashboard.section
apps/portal/app.mdx
---
kind: saas
mount: /app
nouns: [Lease]
personas:
  manager: { may: [Lease.create, Lease.renew, Lease.notify] }
  resident: { may: [Lease.get] }
slots:
  record.aside: Timeline
---

What it builds

SoftwareBuilder compiles the file into the parts the App's anatomy lists: screens, the API and packages, each Tenant, sign-in, plans and the admin App. App.publish serves the result.

Good to know

  • kind takes saas, admin, directory or commerce; App kinds says what each adds.
  • Every App gets an admin App beside it; declare one only to change it.
  • A view override replaces one screen, and a slot replaces one part of a screen.