@getstrata/starter 0.1.4 → 0.1.9
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 -20
- package/dist/cli.js +2400 -47
- package/dist/templates/.env.example +4 -1
- 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 -19
- 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,35 +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 WorkHub `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
|
-
|
|
17
|
+
## What you get
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|----------|---------------|--------|
|
|
25
|
-
| `TENANCY_DRIVER` | `none` | Skip Postgres RLS / `tenant` lookups |
|
|
26
|
-
| `FRONTEND_MODE` | `api` | Use `server-htmx` only if you add cookie sessions |
|
|
27
|
-
| `SESSION_SECRET` | unset | Required in production when `FRONTEND_MODE=server-htmx` |
|
|
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 |
|
|
19
|
+
A Bun + TypeScript app on `@getstrata/core` and `@getstrata/bootstrap` that boots. Cookie apps include `/login`. Token apps include `POST /api/v1/auth/login`. Choices are stored in `strata.layers.json`.
|
|
31
20
|
|
|
32
|
-
|
|
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).
|
|
33
22
|
|
|
34
23
|
## Publish
|
|
35
24
|
|