Skip to content

Naming

How one Noun is spelled in a file name, in code, in a route, in an id and in an Event, and which names a project cannot use.

One Noun has one name, spelled six ways by where it appears. The compiler derives every spelling from the file name.

One Noun, six spellings

Leaseline declares a Lease Noun, and the platform ships CreditGrant:

WhereRuleLeaseCreditGrant
File name and codePascalCase, singularnouns/Lease.mdx, $.Leasenouns/CreditGrant.mdx, $.CreditGrant
Routekebab-case, plural/leases/credit-grants
Record idsnake_case prefix and a numberlease_1credit_grant_1
A property that references itcamelCaseleasecreditGrant
VerbNoun.verb, the Verb in camelCaseLease.renewCreditGrant.apply
EventNoun.pastTenseLease.renewedCreditGrant.applied

A Verb's Function takes both names in its file name: nouns/Lease.renew.ts. In a route the Verb is a path segment, /leases/lease_1/renew, never :renew or .renew (routing).

Everything else

NameRuleExample
Properties, inputs, keys and SettingscamelCaseendsOn, refundWindow, approvalHours
Folders for a Team, Role, Process, Site or Appkebab-caseagents/customer/success-manager.mdx, workflows/renewals/
ComponentsPascalCasecomponents/RenewalCountdown.tsx
Offers, Products, Plays and Evaluatorskebab-caseoffers/pro-annual.mdx, evaluators/notice-tone.ts
Domainsthe hostnamedomains/leaseline.app.mdx
Enum valuescamelCaseatBound: upgrade, signup: magicLink
Stripe's own fieldssnake_case, only in the mapping tablestax_ids beside taxIds (Stripe)

Names a project cannot use

NameWhy
A record or Collection named like a declared VerbA Verb is a path segment, so /leases/renew would mean two things; the write is refused
One Verb declared in a Noun file and in verbs/It would have two definitions; the parse check fails
A Noun file named for an inherited NounAllowed: it refines the inherited Noun, adding properties and Verbs
generated/ and .sb/The platform writes them; a push to either is refused
A folder starting with _Unmanaged: the compiler skips it and it never reaches db.sb
Two root files in one folderstartup.ts, startup.mdx and startup.json are one Startup; pick one