Skip to content

Noun definition

A Noun definition declares one Noun's properties, Verbs, and states at the Startup root; its body is the Noun's documentation.

PropertyValue
Pathnouns/[Noun].mdx
HoldsNoun
Kindfile
Leadersdb-first, git-first
TeamEngineering Team
Written byChange.merge
Compiled bySoftwareBuilder

Example

nouns/Close.mdx in a Startup repository. Closewise, a sample business, declares a Close Noun.

nouns/Close.mdx
---
extends: [Task]
properties:
  client: Customer
  period: string
  balanced?: boolean
verbs:
  reconcile: { through: date }
  review: {}
  close: {}
---
A Close is one month's books for one client, reconciled and reviewed.

Props

The frontmatter keys the file takes. The body is its prose.

PropTypeRequiredDescription
extendslist of NounThe Nouns it extends; it inherits their properties and Verbs.
propertiesjsonrequiredEach property and its type: a primitive, A | B for a closed set, or a Noun name for a reference; a name ending in ? is optional.
verbsjsonThe Verbs it declares beyond create, get, list, update and delete, each mapped to its inputs and their types; {} takes the record only.
statesjsonIts lifecycle, compiled from the Verbs; set it only where the compiled form is wrong.

Generates

SoftwareBuilder compiles it into these records, Verbs and routes.

KindWhat
RecordsNoun, Verb, Event
VerbsNoun.create
Routes/{ns}/{nouns}, /{ns}/{nouns}/{id}, POST /{ns}/{nouns}/{noun}/{verb}