@getstrata/starter
v2.2.31
Published
Interactive create-strata wizard. Choose each layer; one database engine.
Readme
@getstrata/starter
The create-strata generator for Strata. Requires Bun >=1.4.3 (tested on 1.4.3).
Prefer the short form, which resolves the create-strata package:
bunx create-strata my-appThis package ships the same generator at the same version and also works directly:
bunx @getstrata/starter my-appUsage
bunx create-strata my-app
bunx create-strata my-app --yes
bunx create-strata /tmp/my-app --yes --frontend server-htmx --database postgres --auth cookie --dockerA directory path works as well as a bare name; the last path segment becomes the project name.
The wizard asks for each layer. In a terminal, lists use up/down and Enter, or a number key. Extras are toggled one at a time, and only the ones that apply to your auth choice are offered. Passing an inapplicable extra as a flag prints a warning and leaves it off, so --auth headers --mfa will not write FEATURE_MFA=true into an app with no MFA code.
Layer flags: --frontend, --database, --auth, --tenancy, --cache, --queue, --mail, --spa-prefix, plus extras (--mfa, --email-verification, --scim, --metrics) and their --no- forms.
Pick one database engine. Docker Compose is optional (--docker, --no-docker, --docker-services=postgres,redis) and only includes services for the tools you selected. --docker with Postgres or MySQL also writes Adminer on port 8080.
What you get
A Bun and TypeScript app on @getstrata/core and @getstrata/bootstrap that boots, migrates, and passes bun run check. Cookie apps include a restyleable welcome page, /login, /register, and password reset. Token apps include POST /api/v1/auth/login plus register and reset. Tenancy is none, column (any engine), or rls (Postgres only; other engines fall back to column). Choices are recorded in strata.layers.json.
The strata binary installs into the app rather than globally, so use the generated bun run scripts. Generated apps ship src/cli/register.ts with queue:work (bun run queue:work, requires REDIS_URL), make:*, openapi:*, and schedule:run. queue:work boots that app rather than the framework-repo worker.
Discover registered commands with bunx strata help. dev and start run HTTP only. Run queue:work separately for Redis jobs, and outbox:work separately for published durable events (after migrations and listener registration). Synchronous queues and apps without durable events do not need these workers. Worker startup messages indicate polling, not dependency health; idle polling is normal. HTTP and workers use the same application configuration.
