Build with modules.
StackFoundry installs production SaaS capabilities as editable source code. Each module brings implementation files, dependency metadata, environment notes, docs, and a verification checklist.
1. Create a new app
Start from a preset when you want the fastest path. Presets are just bundles of modules, so they stay transparent and editable.
$ pnpm create stackfoundry my-app $ cd my-app $ pnpm dlx stackfoundry add drizzle-postgres $ pnpm dlx stackfoundry add api-keys $ pnpm dlx stackfoundry add stripe-billing
2. Add to an existing app
Install a single capability into an existing codebase. StackFoundry resolves registry dependencies first and records file hashes for future diffs.
$ pnpm dlx stackfoundry add stripe-billing · resolving registry dependency drizzle-postgres + packages/db/src/schema/billing.ts + apps/web/src/app/api/webhooks/stripe/route.ts + .env.stackfoundry.stripe-billing.example
3. Choose module families
The registry is organized around real SaaS systems, not arbitrary snippets. Provider modules stay adapters around shared domain interfaces.
Foundation
Next.js shell, theme, env, quality gates
Database
Drizzle, Postgres, migrations, relations
Billing
Stripe, subscriptions, entitlements, usage
API Product
API keys, public API, webhooks, docs
Operations
Audit logs, jobs, incidents, health
Providers
Vercel, Cloudflare, Neon, Supabase, Upstash
4. Author modules with contracts
A module manifest declares the contract for installable source: files, dependencies, environment variables, registry dependencies, status, and maintenance metadata.
{
"name": "api-keys",
"type": "module",
"category": "developer-platform",
"registryDependencies": ["drizzle-postgres"],
"status": "experimental"
}5. Review and update safely
StackFoundry records installed file hashes and refuses to overwrite changed files without explicit `--force`. The goal is to make generated source reviewable like any other app code.