saasaloy 0.6.1 → 0.8.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.
Files changed (66) hide show
  1. package/README.md +10 -8
  2. package/dist/index.js +4169 -1973
  3. package/dist/index.js.map +1 -1
  4. package/package.json +2 -1
  5. package/schemas/manifest.schema.json +32 -1
  6. package/schemas/registry-item.schema.json +62 -4
  7. package/schemas/saasaloy-lock.schema.json +9 -0
  8. package/schemas/saasaloy.schema.json +12 -0
  9. package/templates/base/AGENTS.md +127 -450
  10. package/templates/base/README.md +16 -1
  11. package/templates/base/_agents/skills/saasaloy-config/SKILL.md +131 -0
  12. package/templates/base/_agents/skills/saasaloy-deploy/SKILL.md +280 -0
  13. package/templates/base/_agents/skills/saasaloy-design/SKILL.md +33 -22
  14. package/templates/base/_agents/skills/saasaloy-env/SKILL.md +8 -7
  15. package/templates/base/_agents/skills/saasaloy-landing-copy/SKILL.md +27 -11
  16. package/templates/base/_agents/skills/saasaloy-setup/SKILL.md +67 -28
  17. package/templates/base/_agents/skills/saasaloy-testing/SKILL.md +85 -0
  18. package/templates/base/_gitignore +4 -0
  19. package/templates/base/_prettierignore +5 -0
  20. package/templates/base/_saasaloy-base.json +7 -2
  21. package/templates/base/apps/web/DESIGN.md +4 -4
  22. package/templates/base/apps/web/astro.config.mjs +2 -1
  23. package/templates/base/apps/web/package.json +1 -0
  24. package/templates/base/apps/web/src/layouts/Layout.astro +4 -3
  25. package/templates/base/apps/web/src/pages/privacy.astro +2 -0
  26. package/templates/base/apps/web/src/pages/terms.astro +2 -0
  27. package/templates/base/docs/runbook-deploy.md +72 -0
  28. package/templates/base/oxlint.config.mjs +42 -10
  29. package/templates/base/package.json +8 -4
  30. package/templates/base/packages/config/package.json +19 -0
  31. package/templates/base/packages/config/src/define.test.ts +134 -0
  32. package/templates/base/packages/config/src/define.ts +135 -0
  33. package/templates/base/packages/config/src/index.ts +34 -0
  34. package/templates/base/packages/config/src/project.ts +25 -0
  35. package/templates/base/packages/config/src/sections/app.ts +27 -0
  36. package/templates/base/packages/config/src/sections.ts +22 -0
  37. package/templates/base/packages/config/tsconfig.json +4 -0
  38. package/templates/base/packages/env/package.json +2 -1
  39. package/templates/base/packages/env/src/define.test.ts +33 -0
  40. package/templates/base/packages/env/src/deploy.ts +3 -2
  41. package/templates/base/packages/env/src/services.test.ts +27 -11
  42. package/templates/base/packages/tooling/package.json +21 -0
  43. package/templates/base/packages/tooling/src/deploy-production.test.ts +923 -0
  44. package/templates/base/packages/tooling/src/deploy-production.ts +1041 -0
  45. package/templates/base/packages/tooling/src/deploy.config.ts +30 -0
  46. package/templates/base/packages/tooling/src/link-skills.test.ts +126 -0
  47. package/templates/base/packages/tooling/src/link-skills.ts +142 -0
  48. package/templates/base/packages/tooling/src/release.test.ts +205 -0
  49. package/templates/base/packages/tooling/src/release.ts +228 -0
  50. package/templates/base/packages/tooling/src/targets.ts +38 -0
  51. package/templates/base/packages/tooling/src/types.ts +78 -0
  52. package/templates/base/packages/tooling/tsconfig.json +11 -0
  53. package/templates/base/packages/ui/AGENTS.md +159 -0
  54. package/templates/base/packages/ui/CLAUDE.md +1 -0
  55. package/templates/base/packages/ui/components.json +1 -1
  56. package/templates/base/packages/ui/package.json +1 -0
  57. package/templates/base/packages/ui/src/blocks/footer.tsx +5 -3
  58. package/templates/base/packages/ui/src/containers/README.md +4 -4
  59. package/templates/base/packages/ui/src/content/landing.ts +2 -4
  60. package/templates/base/packages/ui/src/index.ts +10 -5
  61. package/templates/base/packages/ui/src/styles/brand.css +145 -0
  62. package/templates/base/packages/ui/src/styles/globals.css +6 -7
  63. package/templates/base/packages/ui/src/styles/web.css +7 -139
  64. package/templates/base/saasaloy.json +2 -1
  65. package/templates/base/turbo.json +2 -5
  66. package/templates/base/vitest.config.ts +5 -1
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  <!-- Generated by scripts/build-cli-readme.ts from the repo root README.md. Edit that file. -->
2
2
 
3
+ ![Saasaloy module map with API, auth, database, email, and payment modules on a dark technical grid.](https://github.com/mimukit/saasaloy/blob/main/assets/branding/readme-banners/06-module-map.png)
4
+
3
5
  # Saasaloy
4
6
 
5
7
  **Open source, composable SaaS starter kit for Cloudflare.** A CLI plus a module registry, not a boilerplate. You scaffold a small base, then copy in the API, database, auth, billing and product features one command at a time, as source files you own. Think shadcn/ui for a full-stack SaaS.
@@ -79,9 +81,9 @@ Full walkthrough: [Getting started](https://github.com/mimukit/saasaloy/blob/mai
79
81
  | Stage | What you need | What you add |
80
82
  |---|---|---|
81
83
  | Validate the idea | a landing page and a waitlist | `init`, then `waitlist` |
82
- | Build the MVP | sign-in, an admin app, transactional email | `auth`, `admin`, `email` + a provider |
83
- | Onboard teams | organizations, tenant isolation, roles | `teams`, `multitenant`, `rbac` |
84
- | Charge money | subscriptions, plan limits, webhooks | `billing`, `billing-stripe`, `entitlements` |
84
+ | Build the MVP | sign-in, a customer app, an admin app, transactional email | `auth`, `app`, `admin`, `email` + a provider |
85
+ | Onboard teams | organizations, tenant isolation, roles | `teams`, `multitenant` |
86
+ | Charge money | subscriptions, plan limits, webhooks | `billing`, `billing-stripe` |
85
87
  | Scale the backend | jobs, caching, files, rate limits, API access | `queue`, `kv`, `storage`, `ratelimit`, `api-keys` |
86
88
 
87
89
  Each row installs on top of the previous one. Nothing from a later row lands in your repo until you ask for it.
@@ -109,9 +111,9 @@ Modules come in tiers. A **capability** scaffolds a workspace and sets conventio
109
111
  | Tier | Modules |
110
112
  |---|---|
111
113
  | Capability | `api`, `database`, `validators`, `logger`, `auth`, `admin`, `email`, `sms`, `queue`, `kv`, `storage`, `billing`, `payment` |
112
- | Feature | `waitlist`, `teams`, `multitenant`, `rbac`, `api-keys`, `entitlements`, `email-react`, `ratelimit`, `feature-flags` |
113
- | Provider | `email-console`, `email-cloudflare`, `email-plunk`, `logger-console`, `sms-console`, `sms-khudebarta`, `queue-cloudflare`, `queue-memory`, `kv-cloudflare`, `kv-memory`, `storage-cloudflare`, `storage-memory`, `billing-console`, `billing-stripe`, `payment-console`, `payment-manual` |
114
- | Driver | `database-d1`, `database-postgres` |
114
+ | Feature | `waitlist`, `teams`, `multitenant`, `api-keys`, `email-react`, `ratelimit`, `feature-flags`, `command` |
115
+ | Provider | `email-console`, `email-cloudflare`, `email-plunk`, `logger-console`, `sms-console`, `sms-khudebarta`, `queue-cloudflare`, `queue-memory`, `kv-cloudflare`, `kv-upstash`, `kv-memory`, `storage-cloudflare`, `storage-memory`, `billing-console`, `billing-stripe`, `payment-console`, `payment-manual` |
116
+ | Driver | `database-d1`, `database-postgres`, `api-keys-organization`, `api-keys-user` |
115
117
 
116
118
  What each module gives you and what it depends on is on the [Modules](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/modules.md) page. Which ones need a paid Cloudflare plan or a third-party account is in the [Reference](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/reference.md#email-providers). The short version: the base, `api`, `database-d1`, `auth`, `admin`, `waitlist` and `teams` run on the free tier, and every local provider runs with no account at all.
117
119
 
@@ -119,11 +121,11 @@ The default registry is this repo. `saasaloy add waitlist` fetches `modules/wait
119
121
 
120
122
  ## Commands
121
123
 
122
- `init`, `add`, `remove`, `update`, `outdated`, `env`, `list`, `new` and `doctor`. Every command answers `--help`. Flags, exit codes, the coordinate grammar and the project files are in the [Reference](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/reference.md).
124
+ `init`, `add`, `remove`, `update`, `outdated`, `env`, `testing`, `list`, `new` and `doctor`. Every command answers `--help`. Flags, exit codes, the coordinate grammar and the project files are in the [Reference](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/reference.md).
123
125
 
124
126
  ## Deploy
125
127
 
126
- `pnpm deploy:production` deploys every Worker in the project with wrangler. It loads the production values from the value source in memory, checks every one of them before anything builds, and uploads each Worker's secrets with its code. Wrangler creates the D1, KV, R2 and queue resources on the first deploy. Each deployable workspace keeps its own `wrangler.jsonc` and a `deploy` script that runs `env-deploy <service>`. See [Deploy to Cloudflare](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/how-to/deploy-to-cloudflare.md).
128
+ `pnpm deploy:production` deploys every Worker in the project with wrangler. It starts only from `main` or a `hotfix-*` branch with a clean tree that matches origin, and it stops on a new migration until you pass `--migrate`. It loads the production values from the value source in memory, checks every one of them before anything builds, deploys the Workers one at a time with the api first, requests each live host's smoke checks, and tags the commit `deploy-<UTC time>`. `--dry-run` reports all of it and changes nothing. Each Worker's secrets upload with its code. Wrangler creates the D1, KV, R2 and queue resources on the first deploy. Each deployable workspace keeps its own `wrangler.jsonc` and a `deploy` script that runs `env-deploy <service>`. See [Deploy to Cloudflare](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/how-to/deploy-to-cloudflare.md).
127
129
 
128
130
  ## Documentation
129
131