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.
- package/README.md +20 -29
- package/dist/cli.js +665 -503
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
# create-strata
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
9
|
+
The wizard asks for each layer. Use `--yes` with flags for unattended generation:
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
```bash
|
|
12
|
+
bunx create-strata my-app --yes --frontend=server-htmx --database=sqlite --auth=cookie --no-docker
|
|
13
|
+
```
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
A target can be a project name or directory path. Existing output paths are refused.
|
|
18
16
|
|
|
19
|
-
|
|
|
17
|
+
| Layer | Choices |
|
|
20
18
|
| --- | --- |
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
43
|
+
`create-strata` and [`@getstrata/starter`](https://www.npmjs.com/package/@getstrata/starter) provide the same generator.
|
|
50
44
|
|
|
51
|
-
- [
|
|
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).
|