Startup root file
The Startup root file marks a Startup and holds its name, the Startup Templates it extends, and its own values, in TypeScript, MDX, or JSON.
| Property | Value |
|---|---|
| Path | startup.ts |
| Holds | Startup |
| Kind | file |
| Leaders | db-first, git-first |
| Team | Founding Team |
| Written by | Startup.create, Template.extend, Change.merge |
| Compiled by | StartupBuilder |
Example
startup.ts in a Startup repository.
import { Startup } from 'startup-builder'
export default Startup({
name: 'Closewise',
domain: 'closewise.com',
extends: 'agent-run-services',
idea: 'Monthly books for small agencies, reconciled and reviewed.',
hypothesis: {
customer: 'Agencies with 5 to 50 staff and no in-house bookkeeper',
problem: 'Month-end takes three weeks and still misses entries',
approach: 'Agents reconcile every entry, and a controller reviews each month',
switch: 'A part-time bookkeeper and a spreadsheet',
differentiation: 'Books done within three business days of month end',
},
msc: { metric: 'outside-revenue', value: 5000, by: '2027-06-30' },
signup: 'magicLink',
refundWindow: '14d',
offers: {
'monthly-close': {
price: { amount: 499, currency: 'USD' },
interval: 'month',
terms: 'Books done within three business days of month end, tied out to the bank.',
},
},
})Exports
| Export | Kind | Type |
|---|---|---|
default | default | Startup |
Signature
Startup(definition: StartupDefinition): StartupGenerates
StartupBuilder compiles it into these records, Verbs and routes.
| Kind | What |
|---|---|
| Records | Startup, Setting, Interface |
| Verbs | Startup.create, Template.extend |
| Routes | /{ns}, /{ns}/ |
Keys
Every key the root file takes, in TypeScript, MDX frontmatter or JSON. A key under a map sits below one member, written *.
| Key | Type | Default | Description |
|---|---|---|---|
name | string | Required | The Startup’s name, as buyers see it. Example: 'Closewise'. Read by StartupBuilder. |
domain | url | None. | Its home Domain; its Sites, API and docs serve there. Example: 'closewise.com'. Read by SiteBuilder. |
extends | startup-template | None. | The Startup Template it extends; everything it does not set is inherited from it. Example: 'agent-run-services'. Read by StartupBuilder. |
idea | text | None. | The Idea in one sentence. Example: 'Monthly books for small agencies,. Read by StartupBuilder. |
hypothesis | object | None. | The Founding Hypothesis, one key per slot. Read by StartupBuilder. |
hypothesis.customer | text | None. | Who it is for. Example: 'Agencies with 5 to 50 staff and no in-house bookkeeper'. Read by StartupBuilder. |
hypothesis.problem | text | None. | What they struggle with. Example: 'Month-end takes three weeks and still misses entries'. Read by StartupBuilder. |
hypothesis.approach | text | None. | How the Startup solves it. Example: 'Agents reconcile every entry,. Read by StartupBuilder. |
hypothesis.switch | text | None. | What they use today and would leave. Example: 'A part-time bookkeeper and a spreadsheet'. Read by StartupBuilder. |
hypothesis.differentiation | text | None. | Why they would switch. Example: 'Books done within three business days of month end'. Read by StartupBuilder. |
msc | object | None. | The Minimum Success Criteria: the Metric, the value and the date that make the Startup worth keeping. Read by StartupBuilder. |
msc.metric | metric | None. | The Metric it is judged on. Example: 'outside-revenue'. Read by StartupBuilder. |
msc.value | number | None. | The value the Metric must reach. Example: 5000. Read by StartupBuilder. |
msc.by | date | None. | The date it must reach it by. Example: '2027-06-30'. Read by StartupBuilder. |
reserve | object | None. | The reserve page’s two values nothing else supplies: the ship date and the threshold. Read by SalesBuilder. |
reserve.ships | date | None. | The date reservers are told the product ships. Example: '2027-01-15'. Read by SalesBuilder. |
reserve.threshold | object | None. | The bar the reserve test must clear, fixed before the page goes live. Read by SalesBuilder. |
reserve.threshold.deposits | number | None. | How many outside deposits pass the test. Example: 8. Read by SalesBuilder. |
reserve.threshold.reached | number | None. | How many people the page must reach. Example: 40. Read by SalesBuilder. |
reserve.threshold.by | date | None. | The date the deposits must arrive by. Example: '2026-11-05'. Read by SalesBuilder. |
offers | map | None. | Its own Offers, keyed by id; a larger Offer lives in offers/. Read by SalesBuilder. |
offers.*.price | money | None. | The amount and currency it charges each interval. Example: { amount:. Read by SalesBuilder. |
offers.*.interval | string | None. | How often it bills: once, day, week, month or year. Example: 'month'. Read by SalesBuilder. |
offers.*.terms | text | None. | What the buyer gets, in one sentence. Example: 'Books done within three business days of month end.'. Read by SalesBuilder. |
routes | map | None. | Routes to a Custom Implementation, keyed by path; every other route is generated. Read by SoftwareBuilder. |
routes.*.to | string | None. | The program in code/ that serves the route. Example: 'code/. Read by SoftwareBuilder. |
routes.*.reason | text | Required | Why no Verb, saved query or MCP tool could serve it. Example: 'A partner posts form-encoded webhooks that no Verb accepts.'. Read by SoftwareBuilder. |
locale | string | 'en-US' | The language and region its Pages and Messages are written for. Example: 'en-GB'. Read by SiteBuilder. |
signup | string | 'email' | How a buyer signs up: email, workEmail, magicLink, keyless, apiKey, oauth or agentIdentity. Example: 'magicLink'. Read by SoftwareBuilder. |
doubleOptIn | boolean | false | Whether a Waitlist sign-up confirms by email before it counts. Example: true. Read by SiteBuilder. |
priceUnit | string | 'seat' | The unit its Prices count by default. Example: 'month'. Read by SalesBuilder. |
trial | string | '14d' | How long a trial runs before the first charge. Example: '30d'. Read by SalesBuilder. |
agreement | string | 'clickwrap' | How a buyer accepts the terms: clickwrap or msa. Example: 'msa'. Read by SalesBuilder. |
termsTemplate | string | 'standard' | Which terms Template its / Page is built from: standard, developer, b2b, consumer or agent. Example: 'b2b'. Read by SalesBuilder. |
taxDisplay | string | 'exclusive' | Whether Prices show tax: exclusive, inclusive or reverseCharge. Example: 'inclusive'. Read by SalesBuilder. |
refundWindow | string | '30d' | How long after a charge a refund is granted without review. Example: '14d'. Read by SalesBuilder. |
consent | string | 'strictest' | Whose consent rules apply: the strictest everywhere, or each region’s own. Example: 'byRegion'. Read by SiteBuilder. |
approvalHours | number | 48 | How long an Approval waits before it escalates. Example: 24. Read by StartupBuilder. |
budget | number | 200 | Its monthly spend budget, in USD, before an Approval. Example: 500. Read by StartupBuilder. |
autoUpgrade | string | 'onGreen' | When a Startup Template upgrade merges: onGreen, qualityGates or manual. Example: 'manual'. Read by StartupBuilder. |
closeByDay | number | 5 | The business day of the month by which the books close. Example: 3. Read by StartupBuilder. |
Errors
A push whose root file breaks a key fails sb/ with one of these, naming the line.
| Error | Cause | Keys |
|---|---|---|
| Wrong type | A key in the Startup root file holds a value of another type than the key takes. | Every key |
| Not literal | A key in the Startup root file is computed by a loop, a call or an expression, so it cannot be parsed. | Every key |
| Missing key | The Startup root file leaves out a key it requires, such as the Startup’s name. | name, routes.*.reason |
| Setting set twice | A Setting is set both in the Startup root file and in the Settings file, so its value has two homes. | 14 keys |