@stratum-hq/create
v0.3.0
Published
Create a new Stratum multi-tenancy project
Downloads
238
Maintainers
Readme
@stratum-hq/create
Scaffold a complete Stratum multi-tenancy project with one command — package.json, Docker Compose, environment files, and framework-specific starter code.
Usage
npx @stratum-hq/create my-appThis creates a my-app/ directory containing:
package.jsonwith@stratum-hq/lib,pg, and your chosen frameworkdocker-compose.ymlwith PostgreSQL 16 and theltree+uuid-osspextensions pre-loaded.env.examplewithDATABASE_URLand other defaults- A starter server wired up with Stratum middleware
README.mdwith getting-started instructions
Options
npx @stratum-hq/create my-app [options]
--template <name> express (default), fastify, or nextjs
--skip-install skip npm install after scaffolding
--force overwrite an existing directoryTemplates
- express (default) — Express server with Stratum middleware, tenant-aware routes, and TypeScript config.
- fastify — Fastify server with the Stratum plugin registered.
- nextjs — Next.js project with edge middleware for tenant resolution and server-side helpers.
After Scaffolding
cd my-app
docker compose up -d # start PostgreSQL
npm run dev # run the appThe generated project uses autoMigrate: true, so Stratum creates its tables automatically on first run — no separate migration step.
Links
- Documentation: https://docs.stratum-hq.org/packages/create/
- GitHub: https://github.com/stratum-hq/Stratum
License
MIT © Christian Crank
