coldstart

Configuration

The .coldstart.json schema, all options, validation rules, and defaults

Every scaffold saves a .coldstart.json at the project root. This file captures all configuration options and enables deterministic regeneration via coldstart replay.

Complete example

Here is a realistic full-stack configuration:

.coldstart.json
{
  "name": "fittrack",
  "displayName": "FitTrack",
  "description": "A fitness tracking app with workout plans, nutrition, and social features",
  "packageScope": "@fittrack",
  "platforms": ["web", "mobile", "api"],
  "webMode": "landing+app",
  "domain": "health",
  "billing": "freemium",
  "billingProvider": "polar",
  "i18n": true,
  "locales": ["en", "fr"],
  "multiTenant": false,
  "rbac": false,
  "oauthProviders": ["google", "apple"],
  "outputDir": "./fittrack"
}

Schema reference

Project identity

FieldTypeRequiredDefaultDescription
namestringYesLowercase alphanumeric + dashes. Used for directory name, package names, and URLs.
displayNamestringYesAuto from nameHuman-readable name. Must not contain shell-unsafe characters (", ', `, $, ;, |, &, \).
descriptionstringYesShort project description. Must not contain backtick characters.
packageScopestringYes@{name}npm scope for all packages (e.g. @fittrack). Must start with @.

Platforms

FieldTypeRequiredDefaultDescription
platformsstring[]YesAt least one of: web, mobile, desktop, api.
webModestringIf web in platformsOne of: landing, app, landing+app.

Features

FieldTypeRequiredDefaultDescription
billingstringYesnoneBilling model. One of: none, freemium, subscription, one-time, credits, per-seat, multi-tier.
billingProviderstringYespolarPayment provider. One of: polar, stripe.
i18nbooleanYestrueEnable internationalization via next-intl.
localesstring[]Yes["en", "fr"]Supported locale codes. At least 1 required when i18n is true.
multiTenantbooleanYesfalseEnable organization support (multi-tenant).
rbacbooleanYesfalseEnable role-based access control. Requires multiTenant.
oauthProvidersstring[]No[]Social login providers: google, github, apple.

Context

FieldTypeRequiredDefaultDescription
domainstringYesgeneralProduct category. Injects domain-specific guidelines into CLAUDE.md. One of: finance, health, education, ecommerce, social, productivity, media, food, gaming, general.
outputDirstringYes./{name}Output directory path for the generated project.

Constraints

The Zod schema enforces the following constraints at validation time. Invalid configs are rejected with clear error messages.

Desktop requires web — The desktop platform (Tauri) shares the web frontend. In interactive mode, web is auto-added. In replay mode, validation fails if desktop is in platforms but web is not.

Per-seat billing requires multiTenant — Per-seat pricing is organization-based. In interactive mode, multiTenant is auto-enabled. In replay mode, validation fails if billing is per-seat but multiTenant is false.

RBAC requires multiTenant — Roles and permissions only make sense with organizations. Validation fails if rbac is true but multiTenant is false.

webMode required with web — When web is in platforms, you must specify webMode. Omitting it causes a validation error.

At least 1 locale when i18n is enabled — When i18n is true, the locales array must contain at least one entry.


Validation

The config is validated using a Zod schema (projectConfigSchema). Validation happens in all commands that read a config: init, create, replay, setup, and add.

When validation fails, the CLI prints each issue with its field path and message:

✖  Invalid configuration:
  → webMode: webMode is required when platforms includes web
  → multiTenant: multiTenant must be enabled for per-seat billing

Validation runs .refine() checks after basic type validation, so you get all type errors first, then constraint errors. The exit code is 1 on any validation failure.


Platforms

PlatformScaffoldingStackIncludes
webcreate-next-appNext.js 16, Tailwind v4, shadcn/ui, next-themesAuth pages (if api), PostHog analytics, SEO meta, portless dev proxy
mobilecreate-expo-appExpo 55, React Native 0.83, Uniwind, HeroUI NativeAuth screens (if api), PostHog analytics, RevenueCat (if billing), tab navigation
desktopGeneratedTauri 2, shared web frontend, Rust backendAuto-updater config, window management, native menu
apiGeneratedHono, Better Auth, Drizzle ORM, Neon, DockerREST routes, OpenAPI schema, webhooks, React Email templates, env validation

Web modes

ModeDescription
landingMarketing/SEO-focused page. Generates a hero section, feature grid, pricing table, and footer. No auth routes, no sidebar. Optimized for public-facing pages with generateStaticParams.
appDashboard/SaaS application. Generates a sidebar layout with navigation, auth routes (sign-in, sign-up), settings page, and admin panel. Protected routes with middleware.
landing+appBoth combined. A public marketing landing page at / and an authenticated application under /app. Separate layouts: landing uses a centered layout, app uses a sidebar layout. This is the most common choice for SaaS products.

Billing models

ModelKey fieldMiddlewareProvider supportGenerated files
freemiumisPremiumrequirePremiumStripe, Polar, RevenueCatBilling schema, webhook handler, premium gate middleware, upgrade page
subscriptionsubscriptionStatusrequireSubscriptionStripe, Polar, RevenueCatBilling schema, webhook handler, subscription check middleware, billing portal page
one-timesubscriptionStatusrequirePaymentStripe, Polar, RevenueCatBilling schema, webhook handler, payment gate middleware, checkout page
creditscredits + transaction logrequireCredits(n)Stripe, Polar, RevenueCatBilling schema with transaction table, webhook handler, credit deduction middleware, usage tracking, top-up page
per-seatmaxSeatscheckSeatLimitStripe, PolarBilling schema with seat tracking, webhook handler, seat limit middleware, member management page
multi-tiertierrequireTier(min)Stripe, Polar, RevenueCatBilling schema with tier enum, webhook handler, tier gate middleware, plan comparison page

All billing models generate:

  • packages/db/src/billing-schema.ts — Drizzle schema for billing data
  • apps/api/src/routes/webhooks.ts — Webhook handler for the chosen provider
  • apps/api/src/middleware/billing.ts — Route protection middleware
  • Provider-specific client helpers (Polar SDK or Stripe SDK)
  • Web billing pages (if web platform present)
  • Mobile billing integration via RevenueCat (if mobile platform present)

Default values

When using coldstart create with natural language inference, or when fields are omitted in interactive mode, these defaults apply:

FieldDefaultCondition
billingProviderpolarAlways (unless stripe keyword detected)
i18ntrueAlways in interactive mode
locales["en", "fr"]When i18n is enabled
multiTenantfalseUnless per-seat billing selected
rbacfalseUnless multiTenant is true (then defaults to true)
oauthProviders[]Always
billingfreemiumIn create mode, when api or mobile selected and no billing keyword
billingnoneIn create mode, when only web selected and no billing keyword

Generated AI context

Every project gets three AI integration points, conditional on the platforms and features selected:

WhatLocationPurpose
CLAUDE.mdRootStack documentation, domain-specific rules, conventions, commands, how-to guides
Skillsscripts/install-skills.sh5-40 Claude Code skills tailored to the project's platforms
MCP servers.claude/settings.jsonNeon, Vercel, Polar, RevenueCat, Resend, Expo (only services used)

The skills and MCP servers are conditional. A web-only project gets Vercel + Tailwind + React skills. A fullstack project with mobile and billing gets everything including RevenueCat, Expo, and Drizzle skills.

The domain field injects industry-specific guidelines into CLAUDE.md that steer all AI-assisted development toward best practices for that domain (e.g., money-as-integers for finance, HIPAA awareness for health, cursor-based pagination for social).


On this page