@getstrata/starter 3.0.8 → 3.1.1
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.
- package/README.md +10 -36
- package/dist/cli.js +795 -501
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,57 +1,31 @@
|
|
|
1
1
|
# @getstrata/starter
|
|
2
2
|
|
|
3
|
-
The
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
23
|
+
Use `--help` for supported flags. A target can be a project name or directory path. Existing output paths are refused, including with `--force`.
|
|
48
24
|
|
|
49
|
-
|
|
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)
|
|
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.
|
|
52
26
|
|
|
53
|
-
|
|
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`.
|
|
54
28
|
|
|
55
|
-
|
|
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).
|
|
56
30
|
|
|
57
|
-
|
|
31
|
+
Generated apps include an `AGENTS.md` tailored to their selected stack, with application feature workflows and validation guidance for AI coding agents.
|