@getstrata/starter 0.1.8 → 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.
Files changed (54) hide show
  1. package/README.md +9 -22
  2. package/dist/cli.js +2400 -47
  3. package/dist/templates/overlays/api/docs/API.md +9 -0
  4. package/dist/templates/overlays/server-htmx/public/assets/app.css +89 -0
  5. package/dist/templates/overlays/server-htmx/resources/views/errors/error.eta +14 -0
  6. package/dist/templates/overlays/server-htmx/resources/views/errors/forbidden.eta +4 -0
  7. package/dist/templates/overlays/server-htmx/resources/views/errors/not-found.eta +4 -0
  8. package/dist/templates/overlays/server-htmx/resources/views/layouts/app.eta +34 -0
  9. package/dist/templates/overlays/server-htmx/resources/views/organizations/_table.eta +23 -0
  10. package/dist/templates/overlays/server-htmx/resources/views/organizations/index.eta +37 -0
  11. package/dist/templates/overlays/server-htmx/resources/views/pages/home.eta +4 -0
  12. package/dist/templates/overlays/server-htmx/resources/views/partials/_flash.eta +3 -0
  13. package/dist/templates/overlays/spa-react/frontend/build.ts +17 -0
  14. package/dist/templates/overlays/spa-react/frontend/bun-env.d.ts +4 -0
  15. package/dist/templates/overlays/spa-react/frontend/bun.lock +51 -0
  16. package/dist/templates/overlays/spa-react/frontend/dev-server.ts +66 -0
  17. package/dist/templates/overlays/spa-react/frontend/index.html +12 -0
  18. package/dist/templates/overlays/spa-react/frontend/package.json +21 -0
  19. package/dist/templates/overlays/spa-react/frontend/src/App.tsx +80 -0
  20. package/dist/templates/overlays/spa-react/frontend/src/api/client.ts +86 -0
  21. package/dist/templates/overlays/spa-react/frontend/src/app.css +98 -0
  22. package/dist/templates/overlays/spa-react/frontend/src/auth/AuthContext.tsx +103 -0
  23. package/dist/templates/overlays/spa-react/frontend/src/auth/tokenStorage.ts +15 -0
  24. package/dist/templates/overlays/spa-react/frontend/src/main.tsx +22 -0
  25. package/dist/templates/overlays/spa-react/frontend/src/pages/LoginPage.tsx +67 -0
  26. package/dist/templates/overlays/spa-react/frontend/src/pages/NotFoundPage.tsx +12 -0
  27. package/dist/templates/overlays/spa-react/frontend/src/pages/OrganizationsPage.tsx +69 -0
  28. package/dist/templates/overlays/spa-react/frontend/src/pages/ProjectsPage.tsx +65 -0
  29. package/dist/templates/overlays/spa-react/frontend/src/pages/TasksPage.tsx +65 -0
  30. package/dist/templates/{templates → overlays/spa-react/frontend}/tsconfig.json +9 -6
  31. package/dist/templates/package.json +1 -1
  32. package/package.json +3 -3
  33. package/dist/templates/templates/.env.example +0 -22
  34. package/dist/templates/templates/docker-compose.yml +0 -14
  35. package/dist/templates/templates/package.json +0 -22
  36. package/dist/templates/templates/public/assets/site.css +0 -29
  37. package/dist/templates/templates/src/bootstrap/config.ts +0 -18
  38. package/dist/templates/templates/src/bootstrap/createApp.ts +0 -93
  39. package/dist/templates/templates/src/bootstrap/database.ts +0 -30
  40. package/dist/templates/templates/src/bootstrap/preload.ts +0 -5
  41. package/dist/templates/templates/src/bootstrap/providers/auth.ts +0 -41
  42. package/dist/templates/templates/src/bootstrap/providers/cache.ts +0 -28
  43. package/dist/templates/templates/src/bootstrap/providers/config.ts +0 -27
  44. package/dist/templates/templates/src/bootstrap/providers/index.ts +0 -14
  45. package/dist/templates/templates/src/bootstrap/providers/storage.ts +0 -11
  46. package/dist/templates/templates/src/bootstrap/server.ts +0 -25
  47. package/dist/templates/templates/src/db/fresh.ts +0 -19
  48. package/dist/templates/templates/src/db/migrate.ts +0 -35
  49. package/dist/templates/templates/src/lib/view.ts +0 -21
  50. package/dist/templates/templates/src/modules/site/index.ts +0 -29
  51. package/dist/templates/templates/src/routes.ts +0 -6
  52. package/dist/templates/templates/strata.config.ts +0 -7
  53. package/dist/templates/templates/views/home.eta +0 -5
  54. 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
- Scaffold a new [Strata](https://github.com/EyK-26/strata) application.
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 @getstrata/starter my-app
9
- # or after install: bunx create-strata my-app
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
- ## What you get
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
- ## Environment
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
- Copy `.env.example` to `.env`. The scaffold is an API app without a `tenant` table:
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
- `createAppContext()` does not call `assertProductionSecrets()`. The helper is feature-gated (API tokens, Stripe, SCIM only when those features are on). Starter apps can call it in production without enabling those features.
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`.
33
20
 
34
- Guides: [docs/BUILDING-APPS.md](../../docs/BUILDING-APPS.md), [docs/AUTH.md](../../docs/AUTH.md).
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