Project structure
Every top-level file and folder in a Startup project, what it holds, and the tab of the business it builds.
A Startup project holds a file only where the Startup differs from its Startup Template. Its top-level folders follow the tabs of these docs, from nouns/ to code/.
The tree
leaseline/startup.tsthe Startup: name, domain, Startup Template, own valuesstartups.lockStartup Template pins, by fingerprintsettings.mdxSettings not set in startup.tspolicies.mdxhow the numbers are computedenv.tsSecret and Integration names, no valuesnouns/BusinessLease.mdxa Noun: properties, Verbs, statesLease.renew.tsthe Function behind Lease.renewLease.renew.test.tsits casesverbs/renew.mdxa Verb several Nouns shareevaluators/notice-tone.tsa rubric and its gradermappings/rent-roll.tsa Source mapped into Nounsproducts/pro.mdxProductsApp, API, Agent, Dataset or Serviceoffers/pro.mdxa Product at a Price, on termssites/www/a Site: Pages, layouts, navigationapps/portal/an App over the Nounsdomains/leaseline.com.mdxa Domain: what it hosts, redirects, emailcontent/blog/posts and changelog entriesagents/customer/Agentsa Teamindex.mdxthe Team: lead Role, missionsuccess-manager.mdxa Role and the agent or person filling itsuccess-manager.test.tsits eval casesskills/renewal-call/a skill the Role loadsworkflows/renewals/Workflowsa Processindex.mdxowner Role, Metric, targetnotice-at-60-days.mdxa Workflow: prose, code and testsweekly-unanswered.tsa Workflow: code onlyplays/manager-referrals.mdxa Play: Process, Metric, budgetsystems/billing.mdxSystemsan override on one Systemdashboards/renewals.mdxa Dashboard for one scopebrand/CodeBrand, Theme, Templatescomponents/RenewalCountdown.*a Component: props, web rendering, CSStests/first-renewal.test.tsscenario tests in testcode/partner-webhook/a custom programgenerated/rendered by the platform; pushes refused_research/unmanagedAGENTS.md, .mcp.json, package.jsoncoding agent setup.sb/manifest, resolved Startup, types
Top-level files
| File | Holds | Convention |
|---|---|---|
startup.ts | The Startup and its own values. Also startup.mdx or startup.json | startup.ts |
startups.lock | Startup Template pins | startups.lock |
settings.mdx | Settings | Settings |
policies.mdx | Policies | Policies |
env.ts | Secret and Integration names | env.ts |
AGENTS.md, .mcp.json, package.json | Coding agent setup | agent files |
Top-level folders
| Path | Holds | Convention |
|---|---|---|
nouns/ | Nouns, their Verb functions and tests | Nouns |
verbs/ | Shared Verbs | Shared Verbs |
evaluators/ | Evaluators | Evaluators |
mappings/ | Mappings | Mappings |
products/ | Products | Products |
offers/ | Offers | Offers |
sites/ | Sites | Sites |
apps/ | Apps | Apps |
domains/ | Domains | Domains |
content/ | Content | Content |
agents/ | Teams and Roles | Teams, Roles |
workflows/ | Processes and their Workflows | Processes, Workflows |
plays/ | Plays | Plays |
systems/ | Overrides on Systems | Systems |
dashboards/ | Dashboards | Dashboards |
brand/ | Brand, Theme, Templates | Brand |
components/ | Components | Components |
tests/ | Scenario tests | Scenario tests |
code/ | Custom Implementations | Custom code |
generated/ | Files the platform renders | Generated files |
_name/ | Anything unmanaged | Private folders |
.sb/ | Manifest, resolved Startup, types | The .sb folder |
Rules every file follows
- The path is the identity.
nouns/isLease.mdx Lease, andoffers/ispro.mdx offers/. No file states its own id.pro - A file exists only where the Startup differs. Everything else is inherited and shows in
.sb/.resolved/ - Definitions are MDX, behavior is TypeScript. Frontmatter is the record and the body is its docs. JSON is for machine-written files only.
- Root TypeScript is data.
startup.tsandenv.tsare parsed, never run. A loop or a computed value belongs incode/. - Behavior binds by name.
Lease.renew.tsrunsLease.renew, and a Workflow's Trigger is read from its code. - The fingerprint covers meaning. Reformatting a file or editing a comment mints no Version.
- One leader per project. A project is git-first, with each commit imported as a Change, or db-first, with files regenerated from the record.
- No secrets and no records in files. Customers, Orders, Invoices, Messages and Events live in db.sb, never in the repository.
- A rename rewrites every reference. No alias is kept for an old path.
Several Startups in one repository
One repository can hold several Startups. Each Startup folder is byte-identical to the Startup in a repository of its own, and the root files set what every Startup below inherits.
northfield/studio.tsSettings, Policies and Brand every Startup below inheritsbrand/templates/clinic-scheduling/a Startup Template the Startups below extendstartups/leaseline/the tree abovepackages/shared code, as a workspace