Give my team an admin
Say "give my team an admin" and every Noun gets a list, a record page and two forms, derived from its definition with nothing else to write.
Your team reads and changes records through screens derived from your Nouns and Verbs, with nothing to write beyond the definition. Each Noun gets one list, one record page and two forms.
| Before it runs | |
|---|---|
| Needs | At least one Noun, such as Lease in leaseclock.com |
| Who says yes | No one: reading the definition changes nothing |
| You leave the chat | Never |
What you get
For the Lease Noun of leaseclock.com, the definition alone derives these parts. Each part comes from one named rule.
What you get for Lease | Rule | |
|---|---|---|
| 1 | list of leases at the key leases, titled Leases | key, labels |
| 4 | screens: the list, a record page, a create form and an edit form | screens |
| 7 | list columns, residentName to status, in declared order | list-columns |
| 1 | search box over every lease | list-search |
| 1 | record page titled by residentName, such as Maya Ortiz | representation |
| 4 | one-line text boxes: residentName, residentEmail, listingUrl and status | control-text |
| 2 | date pickers, for startsOn and endsOn | control-date |
| 1 | number box, for monthlyRent | control-number |
| 1 | multi-line box for notes, full width on the record page | control-long-text, wide-fields |
| 1 | formatted terms block on the record page, with no input | control-json |
| 1 | documents field on the record page, left out of both forms | form-omits-arrays |
| 4 | required inputs that refuse an empty value: residentName, startsOn, endsOn, monthlyRent | required-input |
| 1 | picker that searches Property records by name | reference-forward |
| 2 | buttons, Renew and Terminate, on each row, the record page and the edit form | verb-action |
| 1 | notice after a Verb completes, then the record reloaded | verb-result |
| 1 | reason a refused Verb gives, with the screen left as it was | refusal-message |
Property gets the same four screens, and its units property takes a number box. Every rule lists the edge cases behind each row.
Your agent does
Your agent reads the definition, and the rules turn it into screens. No call writes anything.
Give my team an admin.
Give my team screens to edit leases.
Let my ops person fix a lease without the API.{
"api": "https://api.sb/leaseclock.com",
"$type": "Noun",
"nouns": [
{ "$id": "https://api.sb/leaseclock.com/nouns/noun_1", "$type": "Noun", "name": "Property" },
{ "$id": "https://api.sb/leaseclock.com/nouns/noun_2", "$type": "Noun", "name": "Lease" }
],
"meta": { "limit": 20 }
}- Your agent reads every Noun with
Noun.list, a read each Interface serves. - It applies the rules to each property, each reference and each Verb.
- It shows you the screens for each Noun, row by row, as under What you get.
Every button runs its Verb, and the Verb's rules decide. A second Renew on a renewed lease is refused, and the record page shows why.
PlanServing the screens to your team
In the design, your agent adds one App folder of kind admin, and the screens serve at leaseclock.com/admin.
---
kind: admin
nouns: [Property, Lease]
---Each teammate gets in through Give a teammate access, holding the admin Access Level. A teammate opens the same screens your agent showed you.
Change it
Each ask changes the definition, and the screens follow it.
| Say | The definition gains | The screens show |
|---|---|---|
| "Add a pets-allowed switch to every lease." | petsAllowed?: boolean on Lease | A switch in both forms and yes or no on the record page, by control-boolean. The list already holds 7 columns. |
| "Track the deposit on each lease." | deposit: number on Lease | A required number box in both forms, and the amount on the record page. |
| "Name each lease by its unit." | name: string on Lease, such as 14 Elm, unit 3 | The record page titled by name, which outranks residentName. |
PlanOverrides
In the design, an override changes one part without touching the definition. It sets a Noun's icon, the field that names a record or a hidden field.
Under the hood
| Part | Entries |
|---|---|
| Nouns | App, Noun, Verb, Access Level, Human |
| Calls | Noun.list; Human.invite through Give a teammate access |
| Rules | Each rule by id on App rules |
| Events | Human.invited, when a teammate is invited |