SaaS Forge is MIT licensed and open to contributions: bug reports, fixes, docs and features. The full guide is docs/CONTRIBUTING.md in the repository.
Reporting issues
Open an issue on GitHub with:
- what you did, what you expected, and what happened;
- your OS, Node.js and pnpm versions;
- the output of
pnpm doctor --check(secrets are already masked); - for downloads, the version in
.boilerplate-versionand your modules.
Report security problems privately to the address in docs/SECURITY.md, not in a public issue.
Development setup
git clone https://github.com/<you>/saas-forge.git
cd saas-forge
corepack enable
pnpm install
pnpm doctor
pnpm dev
Where to make a change
| Change | Where |
|---|---|
| Shared SaaS behavior (auth, UI, APIs, schema) | Root apps/ and packages/ |
| Something only the released starter should have | template-overrides/saas-boilerplate/, registered in template-sync.manifest.json |
| A module's code in a shared file | Inside its // scaffold:begin <module> markers |
| The download platform | apps/web/lib/scaffold/, scaffold-modules/, scaffold-providers/ |
Never edit .generated/saas-boilerplate; it is rebuilt by pnpm template:stage. After touching anything that ships in the starter, run pnpm template:sync. See Starter Template Workflow.
Before opening a pull request
pnpm typecheck
pnpm lint
pnpm test
pnpm arch:check
pnpm template:check-sync # if starter files changed
pnpm scaffold:matrix --static # if modules, markers or manifests changed (the full matrix runs in CI)
- Add or update tests for what you changed.
- New API route: add its route-policy row. New tRPC procedure: add it to
apiRegistry.ts. New env var:.env.example,env.tsand a doctor hint. - Schema change: include the migration and say so in the pull request.
- Update these docs (
packages/database/src/docs/) when behavior changes.
Commit messages
Use Conventional Commits. Release notes are drafted from them, so the type and scope matter:
feat(billing): add annual credit packs
fix(auth): keep the invite token through OAuth sign-up
security(api_keys): compare key hashes in constant time
feat(ai)!: rename the chat prompt key
feat becomes a feature, fix and perf a fix, security a security advisory, and ! or BREAKING CHANGE a breaking change. Name the module in the scope when the change belongs to one.
Code style
- TypeScript everywhere, strict mode, no
anyin new code unless an external type forces it. - Formatting with Prettier (
pnpm format), linting with ESLint. - Match the surrounding code: naming, file layout and comment density.
- Keep changes focused. Unrelated refactors belong in their own pull request.
