@getstrata/starter 0.1.8 → 0.1.10
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 +9 -22
- package/dist/cli.js +3444 -49
- package/dist/templates/overlays/api/docs/API.md +9 -0
- package/dist/templates/overlays/server-htmx/public/assets/app.css +89 -0
- package/dist/templates/overlays/server-htmx/resources/views/errors/error.eta +14 -0
- package/dist/templates/overlays/server-htmx/resources/views/errors/forbidden.eta +4 -0
- package/dist/templates/overlays/server-htmx/resources/views/errors/not-found.eta +4 -0
- package/dist/templates/overlays/server-htmx/resources/views/layouts/app.eta +34 -0
- package/dist/templates/overlays/server-htmx/resources/views/organizations/_table.eta +23 -0
- package/dist/templates/overlays/server-htmx/resources/views/organizations/index.eta +37 -0
- package/dist/templates/overlays/server-htmx/resources/views/pages/home.eta +4 -0
- package/dist/templates/overlays/server-htmx/resources/views/partials/_flash.eta +3 -0
- package/dist/templates/overlays/spa-react/frontend/build.ts +17 -0
- package/dist/templates/overlays/spa-react/frontend/bun-env.d.ts +4 -0
- package/dist/templates/overlays/spa-react/frontend/bun.lock +51 -0
- package/dist/templates/overlays/spa-react/frontend/dev-server.ts +66 -0
- package/dist/templates/overlays/spa-react/frontend/index.html +12 -0
- package/dist/templates/overlays/spa-react/frontend/package.json +21 -0
- package/dist/templates/overlays/spa-react/frontend/src/App.tsx +80 -0
- package/dist/templates/overlays/spa-react/frontend/src/api/client.ts +86 -0
- package/dist/templates/overlays/spa-react/frontend/src/app.css +98 -0
- package/dist/templates/overlays/spa-react/frontend/src/auth/AuthContext.tsx +103 -0
- package/dist/templates/overlays/spa-react/frontend/src/auth/tokenStorage.ts +15 -0
- package/dist/templates/overlays/spa-react/frontend/src/main.tsx +22 -0
- package/dist/templates/overlays/spa-react/frontend/src/pages/LoginPage.tsx +67 -0
- package/dist/templates/overlays/spa-react/frontend/src/pages/NotFoundPage.tsx +12 -0
- package/dist/templates/overlays/spa-react/frontend/src/pages/OrganizationsPage.tsx +69 -0
- package/dist/templates/overlays/spa-react/frontend/src/pages/ProjectsPage.tsx +65 -0
- package/dist/templates/overlays/spa-react/frontend/src/pages/TasksPage.tsx +65 -0
- package/dist/templates/{templates → overlays/spa-react/frontend}/tsconfig.json +9 -6
- package/dist/templates/package.json +2 -2
- package/package.json +3 -3
- package/dist/templates/templates/.env.example +0 -22
- package/dist/templates/templates/docker-compose.yml +0 -14
- package/dist/templates/templates/package.json +0 -22
- package/dist/templates/templates/public/assets/site.css +0 -29
- package/dist/templates/templates/src/bootstrap/config.ts +0 -18
- package/dist/templates/templates/src/bootstrap/createApp.ts +0 -93
- package/dist/templates/templates/src/bootstrap/database.ts +0 -30
- package/dist/templates/templates/src/bootstrap/preload.ts +0 -5
- package/dist/templates/templates/src/bootstrap/providers/auth.ts +0 -41
- package/dist/templates/templates/src/bootstrap/providers/cache.ts +0 -28
- package/dist/templates/templates/src/bootstrap/providers/config.ts +0 -27
- package/dist/templates/templates/src/bootstrap/providers/index.ts +0 -14
- package/dist/templates/templates/src/bootstrap/providers/storage.ts +0 -11
- package/dist/templates/templates/src/bootstrap/server.ts +0 -25
- package/dist/templates/templates/src/db/fresh.ts +0 -19
- package/dist/templates/templates/src/db/migrate.ts +0 -35
- package/dist/templates/templates/src/lib/view.ts +0 -21
- package/dist/templates/templates/src/modules/site/index.ts +0 -29
- package/dist/templates/templates/src/routes.ts +0 -6
- package/dist/templates/templates/strata.config.ts +0 -7
- package/dist/templates/templates/views/home.eta +0 -5
- package/dist/templates/templates/views/layouts/app.eta +0 -18
package/README.md
CHANGED
|
@@ -1,37 +1,24 @@
|
|
|
1
1
|
# create-strata
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Interactive starter for [Strata](https://github.com/EyK-26/strata). The wizard always asks each layer. SQLite APIs and Postgres HTML apps use the same generator.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
bunx
|
|
9
|
-
|
|
8
|
+
bunx create-strata my-app
|
|
9
|
+
bunx create-strata my-app --yes
|
|
10
|
+
bunx create-strata html --frontend server-htmx --database postgres --auth cookie --cache redis --queue redis --docker --yes
|
|
10
11
|
```
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- Bun + TypeScript app using `@getstrata/core` and `@getstrata/bootstrap`
|
|
15
|
-
- Postgres via Docker Compose (no `tenant` table; set `TENANCY_DRIVER=none`)
|
|
16
|
-
- Eta templates, simple router, health check
|
|
17
|
-
- `strata migrate` / `strata migrate:fresh` and `strata dev` via `@getstrata/cli`
|
|
13
|
+
Layer flags: `--frontend`, `--database`, `--auth`, `--tenancy`, `--cache`, `--queue`, `--mail`, `--spa-prefix`, plus extras (`--mfa`, `--scim`, `--metrics`, ...).
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
Pick **one** database engine. Docker Compose is optional and only includes services for the tools you selected (`--docker`, `--no-docker`, `--docker-services=postgres,redis`).
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| Variable | Local default | Notes |
|
|
24
|
-
|----------|---------------|--------|
|
|
25
|
-
| `TENANCY_DRIVER` | `none` | Skip Postgres RLS / `tenant` lookups |
|
|
26
|
-
| `FRONTEND_MODE` | `api` | `server-htmx`, `spa-react`, or `hybrid` if you add those UIs |
|
|
27
|
-
| `SESSION_SECRET` | unset | Required in production when views are on (`server-htmx` or `hybrid`) |
|
|
28
|
-
| `TRUST_FORWARDED_FOR` | unset | Set `true` only behind a trusted reverse proxy |
|
|
29
|
-
| `METRICS_TOKEN` | unset | Required in production to expose `GET /metrics` |
|
|
30
|
-
| `FEATURE_PUBLIC_READS` | unset | Set `false` in production unless you publish reads |
|
|
17
|
+
## What you get
|
|
31
18
|
|
|
32
|
-
|
|
19
|
+
A Bun + TypeScript app on `@getstrata/core` and `@getstrata/bootstrap` that boots. Cookie apps include a restyleable welcome page, `/login`, `/register`, and password reset. Token apps include `POST /api/v1/auth/login` and register/reset. Tenancy is `none`, `column` (any engine), or `rls` (Postgres). Choices are stored in `strata.layers.json`.
|
|
33
20
|
|
|
34
|
-
|
|
21
|
+
In-repo examples (`apps/hiroapp-hobby`, `apps/hiroapp-team`, `apps/hiroapp`) are generated from this same script. See [docs/STARTER.md](../../docs/STARTER.md).
|
|
35
22
|
|
|
36
23
|
## Publish
|
|
37
24
|
|