@getstrata/starter 3.0.7 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +9 -37
  2. package/dist/cli.js +665 -503
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,57 +1,29 @@
1
1
  # @getstrata/starter
2
2
 
3
- The `create-strata` generator for [Strata](https://github.com/EyK-26/strata). Requires Bun >=1.4.4 (tested on 1.4.4).
3
+ The application generator for [Strata](https://github.com/EyK-26/strata/blob/main/README.md). Requires Bun >=1.4.4; tested on Bun 1.4.4.
4
4
 
5
- Prefer the short form, which resolves the [`create-strata`](https://www.npmjs.com/package/create-strata) package:
5
+ Use the short package name:
6
6
 
7
7
  ```bash
8
8
  bunx create-strata my-app
9
9
  ```
10
10
 
11
- This package ships the same generator at the same version and also works directly:
11
+ This scoped package provides the same generator and also works directly:
12
12
 
13
13
  ```bash
14
14
  bunx @getstrata/starter my-app
15
15
  ```
16
16
 
17
- ## Generation safety and feature plan
18
-
19
- Generation validates a frozen feature plan before creating output. Unsupported raw combinations (such as RLS with SQLite or MFA without cookie authentication) fail before files are emitted. Interactive and CLI choices normalize through the installer first. The generated `strata.features.json` records requirements, derived capabilities, required feature artifacts, and a complete emitted file inventory.
20
-
21
- Existing output paths are always rejected, including with `--force`; choose a new path. A failed generation removes only the output directory acquired by that attempt so it can be retried.
22
-
23
- ## Usage
17
+ The wizard selects a frontend, database, authentication, tenancy, cache, queue, mail, and optional integrations. For unattended generation:
24
18
 
25
19
  ```bash
26
- bunx create-strata my-app
27
- bunx create-strata my-app --yes
28
- bunx create-strata /tmp/my-app --yes --frontend server-htmx --database postgres --auth cookie --docker
20
+ bunx @getstrata/starter my-app --yes --frontend=server-htmx --database=sqlite --auth=cookie --no-docker
29
21
  ```
30
22
 
31
- A directory path works as well as a bare name; the last path segment becomes the project name.
32
-
33
- 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.
34
-
35
- Layer flags: `--frontend`, `--database`, `--auth`, `--tenancy`, `--cache`, `--queue`, `--mail`, `--spa-prefix`, plus extras (`--mfa`, `--email-verification`, `--scim`, `--metrics`) and their `--no-` forms.
36
-
37
- Pick one database engine. Docker Compose is optional (`--docker`, `--no-docker`, `--docker-services=postgres,redis`) and only includes services for the tools you selected. The wizard offers optional Adminer in both Docker and Mix modes when the database is in Compose. `--docker` alone includes required services only; add Adminer explicitly with `--docker-services=mysql,mailpit,adminer` (or `postgres`). When selected, start its debug profile with `docker compose --profile debug up -d --wait --wait-timeout 180`; open http://localhost:8080.
38
-
39
- ## What you get
40
-
41
- 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 as provenance in `strata.layers.json`; detailed generator metadata lives in `.strata/generator.json`. Application configuration lives in `src/config/app.ts` and the application definition.
42
-
43
- The `strata` binary installs into the app. Use generated `bun run` scripts or `bunx strata`. Package-owned commands provide workers, failed-job operations, scaffolding, OpenAPI and scheduling through the application and schedule entrypoints in `strata.config.ts`. `src/cli/register.ts` adds custom application commands.
44
-
45
- 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.
46
-
47
- ## Docs
48
-
49
- - [Getting started](https://github.com/EyK-26/strata/blob/main/docs/GETTING-STARTED.md)
50
- - [Starter and layers](https://github.com/EyK-26/strata/blob/main/docs/STARTER.md)
51
- - [Building apps](https://github.com/EyK-26/strata/blob/main/docs/BUILDING-APPS.md)
23
+ Use `--help` for supported flags. A target can be a project name or directory path. Existing output paths are refused, including with `--force`.
52
24
 
53
- ## Work tracker reference
25
+ Generated apps contain model classes in `src/models`, named controllers in `src/http/controllers`, and explicit browser/API routes in `src/routes/web.ts` and `src/routes/api.ts`. Application configuration lives in `src/config/app.ts` and `src/bootstrap/createApp.ts`. Selected features determine the authentication routes, views, migrations, and integrations included.
54
26
 
55
- The programmatic generator accepts `reference: "work-tracker"` alongside user authentication and tenant isolation. It emits the same organization/member/project/task domain for cookie/server and token/API applications. Owners manage memberships and projects, members create and complete tasks, and viewers read. `/work` provides cookie-authenticated forms with CSRF protection; `/api/v1/work` exposes the shared workflow for API clients. An authenticated request supplies the tenant and actor; payload fields cannot override them.
27
+ Follow the generated README to configure the environment, start selected services, install dependencies, migrate, and run the app. Choices are recorded in `strata.layers.json`; the generated file inventory is in `.strata/generator.json`.
56
28
 
57
- Every accepted mutation writes a durable audit record and publishes through the framework SQL outbox inside the same transaction. The included `work.notification` listener records delivery idempotently; run the ordinary outbox worker to consume pending events. The reference uses explicit tenant predicates and composite foreign keys on every driver, and adds PostgreSQL RLS policies when selected. This is a bounded reference workflow, not a complete project-management product.
29
+ See the [project README](https://github.com/EyK-26/strata/blob/main/README.md), [starter and layer options](https://github.com/EyK-26/strata/blob/main/docs/STARTER.md), [authentication](https://github.com/EyK-26/strata/blob/main/docs/AUTH.md), [integrations](https://github.com/EyK-26/strata/blob/main/docs/INTEGRATIONS.md), and [production](https://github.com/EyK-26/strata/blob/main/docs/PRODUCTION.md).