saasaloy 0.5.1 → 0.6.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 (84) hide show
  1. package/README.md +8 -7
  2. package/dist/index.js +639 -522
  3. package/dist/index.js.map +1 -1
  4. package/package.json +3 -1
  5. package/schemas/registry-item.schema.json +31 -1
  6. package/templates/base/AGENTS.md +180 -53
  7. package/templates/base/README.md +20 -8
  8. package/templates/base/_agents/skills/saasaloy-design/SKILL.md +26 -15
  9. package/templates/base/_agents/skills/saasaloy-env/SKILL.md +130 -0
  10. package/templates/base/_agents/skills/saasaloy-landing-copy/SKILL.md +63 -46
  11. package/templates/base/_agents/skills/saasaloy-setup/SKILL.md +1 -1
  12. package/templates/base/_gitignore +0 -3
  13. package/templates/base/_saasaloy-base.json +8 -1
  14. package/templates/base/{DESIGN.md → apps/web/DESIGN.md} +36 -12
  15. package/templates/base/apps/web/astro.config.mjs +54 -3
  16. package/templates/base/apps/web/package.json +13 -11
  17. package/templates/base/apps/web/src/env.ts +41 -0
  18. package/templates/base/apps/web/src/layouts/Layout.astro +39 -11
  19. package/templates/base/apps/web/src/pages/index.astro +33 -24
  20. package/templates/base/apps/web/src/pages/privacy.astro +10 -2
  21. package/templates/base/apps/web/src/pages/terms.astro +10 -2
  22. package/templates/base/apps/web/wrangler.jsonc +7 -0
  23. package/templates/base/oxlint.config.mjs +91 -4
  24. package/templates/base/package.json +15 -11
  25. package/templates/base/packages/env/_env.example +54 -0
  26. package/templates/base/packages/env/package.json +35 -0
  27. package/templates/base/packages/env/scripts/env-setup.ts +87 -0
  28. package/templates/base/packages/env/src/check.test.ts +41 -0
  29. package/templates/base/packages/env/src/check.ts +50 -0
  30. package/templates/base/packages/env/src/define.test.ts +206 -0
  31. package/templates/base/packages/env/src/define.ts +315 -0
  32. package/templates/base/packages/env/src/deploy.test.ts +438 -0
  33. package/templates/base/packages/env/src/deploy.ts +518 -0
  34. package/templates/base/packages/env/src/dotenv.test.ts +179 -0
  35. package/templates/base/packages/env/src/dotenv.ts +173 -0
  36. package/templates/base/packages/env/src/env-file.ts +51 -0
  37. package/templates/base/packages/env/src/error.ts +38 -0
  38. package/templates/base/packages/env/src/example.test.ts +86 -0
  39. package/templates/base/packages/env/src/example.ts +90 -0
  40. package/templates/base/packages/env/src/index.ts +15 -0
  41. package/templates/base/packages/env/src/schema.ts +63 -0
  42. package/templates/base/packages/env/src/services.test.ts +83 -0
  43. package/templates/base/packages/env/src/services.ts +110 -0
  44. package/templates/base/packages/env/src/setup.test.ts +254 -0
  45. package/templates/base/packages/env/src/setup.ts +177 -0
  46. package/templates/base/packages/env/src/source.ts +20 -0
  47. package/templates/base/packages/env/src/sources.test.ts +137 -0
  48. package/templates/base/packages/env/src/sources.ts +93 -0
  49. package/templates/base/packages/env/src/zod.ts +8 -0
  50. package/templates/base/packages/env/tsconfig.json +13 -0
  51. package/templates/base/packages/tsconfig/base.json +7 -0
  52. package/templates/base/packages/ui/components.json +1 -1
  53. package/templates/base/packages/ui/package.json +5 -4
  54. package/templates/base/packages/ui/src/blocks/audience.tsx +73 -0
  55. package/templates/base/packages/ui/src/blocks/cta.tsx +41 -30
  56. package/templates/base/packages/ui/src/blocks/error-state.tsx +2 -0
  57. package/templates/base/packages/ui/src/blocks/faq.tsx +64 -36
  58. package/templates/base/packages/ui/src/blocks/feature-grid.tsx +48 -146
  59. package/templates/base/packages/ui/src/blocks/footer.tsx +129 -70
  60. package/templates/base/packages/ui/src/blocks/hero.tsx +183 -26
  61. package/templates/base/packages/ui/src/blocks/how-it-works.tsx +75 -0
  62. package/templates/base/packages/ui/src/blocks/logo-cloud.tsx +118 -0
  63. package/templates/base/packages/ui/src/blocks/navbar.tsx +204 -88
  64. package/templates/base/packages/ui/src/blocks/pain-points.tsx +131 -0
  65. package/templates/base/packages/ui/src/blocks/pricing-table.tsx +112 -94
  66. package/templates/base/packages/ui/src/blocks/showcase.tsx +185 -0
  67. package/templates/base/packages/ui/src/blocks/testimonials.tsx +85 -0
  68. package/templates/base/packages/ui/src/blocks/theme-toggle.tsx +16 -12
  69. package/templates/base/packages/ui/src/components/badge.tsx +1 -1
  70. package/templates/base/packages/ui/src/components/button.tsx +2 -2
  71. package/templates/base/packages/ui/src/components/tabs.tsx +1 -1
  72. package/templates/base/packages/ui/src/content/landing.ts +590 -125
  73. package/templates/base/packages/ui/src/index.ts +6 -2
  74. package/templates/base/packages/ui/src/lib/external-link.ts +36 -0
  75. package/templates/base/packages/ui/src/lib/icons.ts +131 -0
  76. package/templates/base/packages/ui/src/lib/inline-code.ts +29 -0
  77. package/templates/base/packages/ui/src/lib/theme.ts +173 -86
  78. package/templates/base/packages/ui/src/styles/globals.css +47 -125
  79. package/templates/base/packages/ui/src/styles/web.css +359 -0
  80. package/templates/base/pnpm-workspace.yaml +0 -6
  81. package/templates/base/saasaloy.json +1 -0
  82. package/templates/base/stylelint.config.js +3 -3
  83. package/templates/base/turbo.json +13 -0
  84. package/templates/base/vitest.config.ts +21 -0
package/README.md CHANGED
@@ -7,6 +7,7 @@
7
7
  [![npm version](https://img.shields.io/npm/v/saasaloy)](https://www.npmjs.com/package/saasaloy)
8
8
  [![CI](https://github.com/mimukit/saasaloy/actions/workflows/ci.yml/badge.svg)](https://github.com/mimukit/saasaloy/actions/workflows/ci.yml)
9
9
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)
10
+ [![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/mimukit/saasaloy?utm_source=oss&utm_medium=github&utm_campaign=mimukit%2Fsaasaloy&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews)](https://coderabbit.ai)
10
11
 
11
12
  > [!WARNING]
12
13
  > **Saasaloy is at a very early stage.** It is a working proof of concept, not a finished product. Use it at your own risk, and do not build a production project on it yet. The CLI, the module contracts, the generated code and the conventions can all change or break between releases until a stable `1.x.x` version ships. Pin the version you install, read the changelog before you update, and expect to do some manual merging along the way.
@@ -59,13 +60,13 @@ pnpm dev
59
60
  Then add modules as the product grows:
60
61
 
61
62
  ```bash
62
- saasaloy list
63
+ saasaloy list
63
64
  # what the registry offers, and what you already have
64
65
 
65
- saasaloy add waitlist
66
+ saasaloy add waitlist
66
67
  # pulls api, validators and database, then asks for a database driver
67
68
 
68
- saasaloy add admin
69
+ saasaloy add admin
69
70
  # pulls auth, then an auth-gated admin SPA
70
71
  ```
71
72
 
@@ -98,7 +99,7 @@ Each row installs on top of the previous one. Nothing from a later row lands in
98
99
  | Email | Cloudflare Email Sending, Plunk, or a console logger |
99
100
  | Storage | Cloudflare R2, or in memory |
100
101
  | Background work | Cloudflare Queues and Cron Triggers, or an in-process runner |
101
- | Infra | wrangler per workspace, or Pulumi via the `infra` module |
102
+ | Deploy | wrangler, through `pnpm deploy:production` |
102
103
  | Monorepo | Turborepo + pnpm |
103
104
 
104
105
  ## Modules
@@ -107,9 +108,9 @@ Modules come in tiers. A **capability** scaffolds a workspace and sets conventio
107
108
 
108
109
  | Tier | Modules |
109
110
  |---|---|
110
- | Capability | `api`, `database`, `validators`, `logger`, `auth`, `admin`, `email`, `sms`, `queue`, `kv`, `storage`, `billing`, `infra` |
111
+ | Capability | `api`, `database`, `validators`, `logger`, `auth`, `admin`, `email`, `sms`, `queue`, `kv`, `storage`, `billing`, `payment` |
111
112
  | Feature | `waitlist`, `teams`, `multitenant`, `rbac`, `api-keys`, `entitlements`, `email-react`, `ratelimit`, `feature-flags` |
112
- | 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` |
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` |
113
114
  | Driver | `database-d1`, `database-postgres` |
114
115
 
115
116
  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.
@@ -122,7 +123,7 @@ The default registry is this repo. `saasaloy add waitlist` fetches `modules/wait
122
123
 
123
124
  ## Deploy
124
125
 
125
- Each deployable workspace owns its `wrangler.jsonc` and `deploy` script, or the `infra` module deploys every Worker with one Pulumi program. See [Deploy to Cloudflare](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/how-to/deploy-to-cloudflare.md).
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).
126
127
 
127
128
  ## Documentation
128
129