Skip to content

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.

PropertyValue
Pathstartup.ts
HoldsStartup
Kindfile
Leadersdb-first, git-first
TeamFounding Team
Written byStartup.create, Template.extend, Change.merge
Compiled byStartupBuilder

Example

startup.ts in a Startup repository.

startup.ts
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

ExportKindType
defaultdefaultStartup

Signature

TypeScript
Startup(definition: StartupDefinition): Startup

Generates

StartupBuilder compiles it into these records, Verbs and routes.

KindWhat
RecordsStartup, Setting, Interface
VerbsStartup.create, Template.extend
Routes/{ns}, /{ns}/api

Keys

Every key the root file takes, in TypeScript, MDX frontmatter or JSON. A key under a map sits below one member, written *.

KeyTypeDefaultDescription
namestringRequiredThe Startup’s name, as buyers see it. Example: 'Closewise'. Read by StartupBuilder.
domainurlNone.Its home Domain; its Sites, API and docs serve there. Example: 'closewise.com'. Read by SiteBuilder.
extendsstartup-templateNone.The Startup Template it extends; everything it does not set is inherited from it. Example: 'agent-run-services'. Read by StartupBuilder.
ideatextNone.The Idea in one sentence. Example: 'Monthly books for small agencies, reconciled and reviewed.'. Read by StartupBuilder.
hypothesisobjectNone.The Founding Hypothesis, one key per slot. Read by StartupBuilder.
hypothesis.customertextNone.Who it is for. Example: 'Agencies with 5 to 50 staff and no in-house bookkeeper'. Read by StartupBuilder.
hypothesis.problemtextNone.What they struggle with. Example: 'Month-end takes three weeks and still misses entries'. Read by StartupBuilder.
hypothesis.approachtextNone.How the Startup solves it. Example: 'Agents reconcile every entry, and a controller reviews each month'. Read by StartupBuilder.
hypothesis.switchtextNone.What they use today and would leave. Example: 'A part-time bookkeeper and a spreadsheet'. Read by StartupBuilder.
hypothesis.differentiationtextNone.Why they would switch. Example: 'Books done within three business days of month end'. Read by StartupBuilder.
mscobjectNone.The Minimum Success Criteria: the Metric, the value and the date that make the Startup worth keeping. Read by StartupBuilder.
msc.metricmetricNone.The Metric it is judged on. Example: 'outside-revenue'. Read by StartupBuilder.
msc.valuenumberNone.The value the Metric must reach. Example: 5000. Read by StartupBuilder.
msc.bydateNone.The date it must reach it by. Example: '2027-06-30'. Read by StartupBuilder.
reserveobjectNone.The reserve page’s two values nothing else supplies: the ship date and the threshold. Read by SalesBuilder.
reserve.shipsdateNone.The date reservers are told the product ships. Example: '2027-01-15'. Read by SalesBuilder.
reserve.thresholdobjectNone.The bar the reserve test must clear, fixed before the page goes live. Read by SalesBuilder.
reserve.threshold.depositsnumberNone.How many outside deposits pass the test. Example: 8. Read by SalesBuilder.
reserve.threshold.reachednumberNone.How many people the page must reach. Example: 40. Read by SalesBuilder.
reserve.threshold.bydateNone.The date the deposits must arrive by. Example: '2026-11-05'. Read by SalesBuilder.
offersmapNone.Its own Offers, keyed by id; a larger Offer lives in offers/. Read by SalesBuilder.
offers.*.pricemoneyNone.The amount and currency it charges each interval. Example: { amount: 499, currency: 'USD' }. Read by SalesBuilder.
offers.*.intervalstringNone.How often it bills: once, day, week, month or year. Example: 'month'. Read by SalesBuilder.
offers.*.termstextNone.What the buyer gets, in one sentence. Example: 'Books done within three business days of month end.'. Read by SalesBuilder.
routesmapNone.Routes to a Custom Implementation, keyed by path; every other route is generated. Read by SoftwareBuilder.
routes.*.tostringNone.The program in code/ that serves the route. Example: 'code/legacy-webhook'. Read by SoftwareBuilder.
routes.*.reasontextRequiredWhy no Verb, saved query or MCP tool could serve it. Example: 'A partner posts form-encoded webhooks that no Verb accepts.'. Read by SoftwareBuilder.
localestring'en-US'The language and region its Pages and Messages are written for. Example: 'en-GB'. Read by SiteBuilder.
signupstring'email'How a buyer signs up: email, workEmail, magicLink, keyless, apiKey, oauth or agentIdentity. Example: 'magicLink'. Read by SoftwareBuilder.
doubleOptInbooleanfalseWhether a Waitlist sign-up confirms by email before it counts. Example: true. Read by SiteBuilder.
priceUnitstring'seat'The unit its Prices count by default. Example: 'month'. Read by SalesBuilder.
trialstring'14d'How long a trial runs before the first charge. Example: '30d'. Read by SalesBuilder.
agreementstring'clickwrap'How a buyer accepts the terms: clickwrap or msa. Example: 'msa'. Read by SalesBuilder.
termsTemplatestring'standard'Which terms Template its /terms Page is built from: standard, developer, b2b, consumer or agent. Example: 'b2b'. Read by SalesBuilder.
taxDisplaystring'exclusive'Whether Prices show tax: exclusive, inclusive or reverseCharge. Example: 'inclusive'. Read by SalesBuilder.
refundWindowstring'30d'How long after a charge a refund is granted without review. Example: '14d'. Read by SalesBuilder.
consentstring'strictest'Whose consent rules apply: the strictest everywhere, or each region’s own. Example: 'byRegion'. Read by SiteBuilder.
approvalHoursnumber48How long an Approval waits before it escalates. Example: 24. Read by StartupBuilder.
budgetnumber200Its monthly spend budget, in USD, before an Approval. Example: 500. Read by StartupBuilder.
autoUpgradestring'onGreen'When a Startup Template upgrade merges: onGreen, qualityGates or manual. Example: 'manual'. Read by StartupBuilder.
closeByDaynumber5The 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/parse with one of these, naming the line.

ErrorCauseKeys
Wrong typeA key in the Startup root file holds a value of another type than the key takes.Every key
Not literalA key in the Startup root file is computed by a loop, a call or an expression, so it cannot be parsed.Every key
Missing keyThe Startup root file leaves out a key it requires, such as the Startup’s name.name, routes.*.reason
Setting set twiceA Setting is set both in the Startup root file and in the Settings file, so its value has two homes.14 keys