| name | saas-scaffolder |
| description | Scaffold a production-oriented SaaS application from a validated product brief while preserving the repository stack and current official framework guidance. Use when building a new SaaS codebase or vertical slice with authentication, tenancy, persistence, billing, background work, observability, deployment, and acceptance tests. |
| zh_description | 用于依据已验证产品需求搭建可演进的 SaaS 垂直切片,并覆盖鉴权、租户、计费、监控和验收。 |
| version | 2.0.0 |
| author | seaworld008 |
| source | in-house |
| source_url | |
| tags | ["design", "product", "saas", "scaffolder", "full-stack"] |
| created_at | 2026-03-04 |
| updated_at | 2026-07-27 |
| quality | 5 |
| complexity | advanced |
SaaS Scaffolder
Build one deployable vertical slice. Do not generate a large starter kit whose
authentication, billing, and data model have never worked together.
Preconditions
Require:
- target user and primary paid outcome
- first end-to-end workflow
- tenant model: personal, workspace, organization, or hybrid
- billing unit and entitlement model
- data sensitivity and compliance constraints
- deployment environment and existing repository conventions
If the product brief is still ambiguous, refine it before scaffolding.
Discover the Current Stack
For an existing repository, inspect before choosing dependencies:
rg --files -g 'package.json' -g 'pyproject.toml' -g 'go.mod'
rg --files -g '*lock*' -g 'Dockerfile*' -g '.github/workflows/*'
rg -n "auth|session|tenant|workspace|organization|stripe|billing|migration" .
Preserve the established package manager, framework, ORM, test runner, linting,
component library, and deployment target unless the user explicitly requests a
migration.
For a greenfield project, verify current stable versions and setup commands
against official documentation at implementation time. Do not hard-code
framework major versions or copy authentication middleware from old examples.
Architecture Decisions
Record a short decision table:
| Concern | Decision | Evidence | Revisit trigger |
|---|
| Web/runtime | | official docs / repository | unsupported runtime |
| Authentication | | threat model and provider docs | identity model changes |
| Tenancy | | product contract | shared workspace required |
| Database | | access and consistency needs | scale or residency change |
| Billing | | price and entitlement model | pricing migration |
| Jobs | | latency and retry needs | synchronous path exceeds budget |
| Deployment | |