create-strata 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 +20 -29
  2. package/dist/cli.js +665 -503
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,36 +1,32 @@
1
1
  # create-strata
2
2
 
3
- Starter for [Strata](https://github.com/EyK-26/strata), a Bun + TypeScript HTTP framework. The wizard asks for each layer, then writes an app you own.
4
-
5
- ## Usage
3
+ Create a [Strata](https://github.com/EyK-26/strata/blob/main/README.md) application with Bun and TypeScript. Requires Bun >=1.4.4; tested on Bun 1.4.4.
6
4
 
7
5
  ```bash
8
6
  bunx create-strata my-app
9
- bunx create-strata my-app --yes
10
- bunx create-strata /tmp/my-app --yes --frontend server-htmx --database postgres --auth cookie --docker
11
7
  ```
12
8
 
13
- A directory path works as well as a bare name. The last path segment becomes the project name.
9
+ The wizard asks for each layer. Use `--yes` with flags for unattended generation:
14
10
 
15
- In a terminal, lists use up/down and Enter, or a number key. Extras (MFA, email verification, SCIM, metrics) are toggled one at a time, and only the ones that apply to your auth choice are offered.
11
+ ```bash
12
+ bunx create-strata my-app --yes --frontend=server-htmx --database=sqlite --auth=cookie --no-docker
13
+ ```
16
14
 
17
- ## Layers
15
+ A target can be a project name or directory path. Existing output paths are refused.
18
16
 
19
- | Flag | Choices |
17
+ | Layer | Choices |
20
18
  | --- | --- |
21
- | `--frontend` | `api`, `server-htmx`, `spa-react`, `hybrid` |
22
- | `--database` | `sqlite`, `postgres`, `mysql` (pick one) |
23
- | `--auth` | `headers`, `cookie`, `token`, `jwt`, `cookie-token`, `cookie-token-jwt` |
24
- | `--tenancy` | `none`, `column`, `rls` (`rls` needs Postgres; other engines fall back to `column`) |
25
- | `--cache` | `array`, `redis` |
26
- | `--queue` | `sync`, `redis` |
27
- | `--mail` | `log`, `smtp` |
19
+ | Frontend | `api`, `server-htmx`, `spa-react`, `hybrid` |
20
+ | Database | `sqlite`, `postgres`, `mysql` |
21
+ | Authentication | `headers`, `cookie`, `token`, `jwt`, `cookie-token`, `cookie-token-jwt` |
22
+ | Tenancy | `none`, `column`, `rls` (PostgreSQL) |
23
+ | Cache | `array`, `redis` |
24
+ | Queue | `sync`, `redis` |
25
+ | Mail | `log`, `smtp` |
28
26
 
29
- Extras: `--mfa`, `--email-verification`, `--scim`, `--metrics` and their `--no-` forms. Docker Compose is optional (`--docker`, `--no-docker`, `--docker-services=postgres,redis`) and only includes services for the tools you picked. `--docker` with Postgres or MySQL also writes Adminer on port 8080.
27
+ Optional features include MFA, email verification, SCIM, metrics, OAuth, billing, and webhooks. Availability depends on the selected layers. Docker Compose is optional; Adminer is an explicit selection. Run `bunx create-strata --help` for flags and defaults.
30
28
 
31
- Choices are recorded in `strata.layers.json`.
32
-
33
- ## After generating
29
+ For the SQLite example above:
34
30
 
35
31
  ```bash
36
32
  cd my-app
@@ -40,15 +36,10 @@ bun run db:migrate
40
36
  bun run dev
41
37
  ```
42
38
 
43
- The `strata` binary is installed into the app's `node_modules/.bin`, not globally, so use the `bun run` scripts or `bunx strata <command>` from inside the app directory. Running `bunx strata` outside a Strata app resolves an unrelated npm package named `strata`.
44
-
45
- ## Relationship to @getstrata/starter
39
+ Other choices may need database services or a frontend build; follow the generated README. Apps use model classes in `src/models`, named actions in `src/http/controllers`, and route declarations in `src/routes/web.ts` and `src/routes/api.ts`.
46
40
 
47
- `create-strata` and [`@getstrata/starter`](https://www.npmjs.com/package/@getstrata/starter) ship the same generator from the same source at the same version. `bunx create-strata` is the documented entry point because `bunx` resolves the package name; `bunx @getstrata/starter` also works.
41
+ The generator installs the application-local `strata` CLI. Run the generated `bun run` scripts or `bunx strata <command>` from inside the app directory.
48
42
 
49
- ## Docs
43
+ `create-strata` and [`@getstrata/starter`](https://www.npmjs.com/package/@getstrata/starter) provide the same generator.
50
44
 
51
- - [Getting started](https://github.com/EyK-26/strata/blob/main/docs/GETTING-STARTED.md)
52
- - [Starter and layers](https://github.com/EyK-26/strata/blob/main/docs/STARTER.md)
53
- - [Building apps](https://github.com/EyK-26/strata/blob/main/docs/BUILDING-APPS.md)
54
- - [Auth choices](https://github.com/EyK-26/strata/blob/main/docs/AUTH.md)
45
+ See the [project README](https://github.com/EyK-26/strata/blob/main/README.md), [starter guide](https://github.com/EyK-26/strata/blob/main/docs/STARTER.md), [authentication guide](https://github.com/EyK-26/strata/blob/main/docs/AUTH.md), and [integration guide](https://github.com/EyK-26/strata/blob/main/docs/INTEGRATIONS.md).