Launchframe

Module System

Launchframe is built from composable modules rather than monolithic templates. This keeps additions predictable and conflict-free.

Three layers

templates/base-web     →  shared skeleton (all projects start here)
presets/*.json         →  curated module bundles (blank, dashboard)
modules/*/             →  composable capabilities

Base

The minimal Next.js app skeleton. Contains the App Router structure, shared utilities, CSS variables, and tokenized placeholders that modules fill in.

Modules

Self-contained capability units. Each module declares metadata, dependencies, conflicts, and the files it contributes.

Presets

Named bundles of modules. blank and dashboard are presets — they list which modules to include and provide token replacement values.

Available modules

ModuleKindDescription
quality-baselinedeveloper-experienceESLint 9, Prettier, Husky + lint-staged
testing-baselinedeveloper-experienceVitest 3.2, Playwright 1.55, CI config
ai-dxdeveloper-experienceAGENTS.md, ARCHITECTURE.md (always included)
ai-dx-cursordeveloper-experience.cursor/rules/*.mdc (via --ai-tools cursor)
ai-dx-claudedeveloper-experienceCLAUDE.md (via --ai-tools claude)
ai-dx-geminideveloper-experience.gemini/GEMINI.md (via --ai-tools gemini)
auth-coreauthBetter Auth baseline (email/password, sessions)
auth-githubauthGitHub OAuth provider
db-pgdatabasenode-postgres driver for Drizzle
db-postgresjsdatabasepostgres.js driver for Drizzle
billing-stripebillingStripe checkout, portal, webhooks
billing-polarbillingPolar checkout, portal, webhooks
email-resendemailResend transactional email
deploy-dockerdeployDockerfile + .dockerignore
dashboard-shelluiDashboard CSS layer + settings page

Module anatomy

modules/billing-stripe/
├── module.json          # Metadata, dependencies, operations
└── files/               # Files to copy into generated project
    └── ...

module.json

{
  "name": "billing-stripe",
  "kind": "billing",
  "description": "Stripe billing provider integration",
  "dependsOn": ["auth-core"],
  "conflictsWith": [],
  "replaces": [],
  "template": {
    "copyFiles": ["..."],
    "tokenReplacements": { "...": "..." }
  }
}

Assembly model

When you run create-launchframe:

  1. Load the selected base template
  2. Resolve the selected preset
  3. Add/remove modules from explicit CLI options (including --ai-tools)
  4. Validate dependencies and detect conflicts
  5. Assemble files and token replacements in deterministic order
  6. Write the final project + launchframe.json manifest

Conflict rules

  • db-pg conflicts with db-postgresjs — you pick one
  • billing-stripe and billing-polar can coexist (both selected via --billing both)
  • Absence of a module is valid — --email-provider none simply omits email-resend
  • AI DX sub-modules (ai-dx-cursor, ai-dx-claude, ai-dx-gemini) are independently selectable via --ai-tools