saasaloy 0.1.0 → 0.1.1
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 +151 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-cli-readme.ts from the repo root README.md. Edit that file. -->
|
|
2
|
+
|
|
3
|
+
# Saasaloy
|
|
4
|
+
|
|
5
|
+
**Open source, composable SaaS starter kit for Cloudflare.** A CLI plus a module registry, not a boilerplate. Think shadcn/ui for a full-stack SaaS: you scaffold a small base, then copy in the API, database, auth, and product features one command at a time, as source files you own.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/saasaloy)
|
|
8
|
+
[](https://github.com/mimukit/saasaloy/actions/workflows/ci.yml)
|
|
9
|
+
[](LICENSE.md)
|
|
10
|
+
|
|
11
|
+
## Why Saasaloy
|
|
12
|
+
|
|
13
|
+
- **You own the code.** Nothing is imported from a Saasaloy package at runtime. The CLI writes files into your repo and gets out of the way.
|
|
14
|
+
- **Start small, add on demand.** `saasaloy init` gives you a landing page and a UI package. API, database, auth, admin, email, SMS, and features arrive later with `saasaloy add`, each with its dependencies resolved.
|
|
15
|
+
- **Cloudflare-native, near zero cost.** Workers, D1, and static assets by default. Most modules run on the free tier, and the ones that do not say so up front.
|
|
16
|
+
- **Agent-native.** Every generated project ships `AGENTS.md`, `CLAUDE.md`, a `DESIGN.md` contract, and per-module skills for Claude Code and other agents.
|
|
17
|
+
- **Reversible.** `saasaloy remove` undoes a module from its manifest, and `saasaloy update` re-applies at a newer version with a merge plan for your edits.
|
|
18
|
+
|
|
19
|
+
## Quick start
|
|
20
|
+
|
|
21
|
+
Requires Node 24.13.0+ and pnpm 11+. No Cloudflare account is needed until you deploy.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g saasaloy # or: pnpm add -g saasaloy, or prefix commands with npx
|
|
25
|
+
saasaloy init my-app
|
|
26
|
+
cd my-app
|
|
27
|
+
pnpm install
|
|
28
|
+
pnpm dev # landing page on http://localhost:3000
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Then compose the product:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
saasaloy list # what the registry offers, and what you already have
|
|
35
|
+
saasaloy add database-d1 # pulls api + database, then binds them to D1 (or pick database-postgres)
|
|
36
|
+
saasaloy add admin # pulls auth, then an auth-gated admin SPA
|
|
37
|
+
saasaloy add waitlist # a feature: form, API route, table
|
|
38
|
+
saasaloy env # fill in the variables your modules declare (--check gates a deploy)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Full walkthrough: [Getting started](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/getting-started.md), then [Make the project yours](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/how-to/make-it-yours.md) for the bundled skills that write your product brief, landing copy, and theme.
|
|
42
|
+
|
|
43
|
+
## What you get
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
my-app/
|
|
47
|
+
apps/web/ Astro landing page (the base)
|
|
48
|
+
apps/api/ Hono Worker (saasaloy add api)
|
|
49
|
+
apps/admin/ TanStack Router SPA (saasaloy add admin)
|
|
50
|
+
packages/ui/ shared React + Tailwind components
|
|
51
|
+
packages/db/ Drizzle schema + client (saasaloy add database-d1 | database-postgres)
|
|
52
|
+
packages/auth/ Better Auth (saasaloy add auth)
|
|
53
|
+
packages/email/ email provider interface (saasaloy add email)
|
|
54
|
+
.agents/skills/ agent skills, symlinked from .claude/skills/
|
|
55
|
+
DESIGN.md the design contract
|
|
56
|
+
saasaloy.json installed modules + alias map
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
| Concern | Choice |
|
|
60
|
+
|---|---|
|
|
61
|
+
| Marketing site (`apps/web`) | Astro on Workers static assets |
|
|
62
|
+
| App (`apps/admin`) | TanStack Router + Vite SPA |
|
|
63
|
+
| Backend (`apps/api`) | Hono on Cloudflare Workers |
|
|
64
|
+
| Database | Drizzle ORM on D1 (SQLite) or Postgres |
|
|
65
|
+
| Auth | Better Auth |
|
|
66
|
+
| Email | Cloudflare Email Sending, Plunk, or a console logger |
|
|
67
|
+
| Infra | wrangler per workspace, or Pulumi via the `infra` module |
|
|
68
|
+
| Monorepo | Turborepo + pnpm |
|
|
69
|
+
|
|
70
|
+
## Commands
|
|
71
|
+
|
|
72
|
+
| Command | What it does |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `init` | scaffold a new project (Astro landing + ui + config) |
|
|
75
|
+
| `add` | apply a module into the current project, resolving `dependsOn` |
|
|
76
|
+
| `env` | fill in the environment variables the installed modules declare (`--check` gates a deploy) |
|
|
77
|
+
| `outdated` | report the base template and each installed module, current vs latest (`--check` gates CI) |
|
|
78
|
+
| `update` | re-apply the base and modules at a newer version, with a merge plan for anything you edited |
|
|
79
|
+
| `remove` | undo a module's applied files via the manifest, offline |
|
|
80
|
+
| `list` | list the modules a registry offers, marking the ones installed here |
|
|
81
|
+
| `new` | scaffold a new module in a registry repo (descriptor + files + skill stub) |
|
|
82
|
+
| `doctor` | validate module descriptors, or a project's state files against each other |
|
|
83
|
+
|
|
84
|
+
Every command answers `--help`. Flags, exit codes, coordinate grammar, and environment variables are in the [Reference](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/reference.md).
|
|
85
|
+
|
|
86
|
+
## Modules
|
|
87
|
+
|
|
88
|
+
Modules come in tiers. A **capability** scaffolds a workspace and sets conventions. A **feature** drops files into those conventions. A **provider** supplies one implementation behind a capability's interface. A **driver** supplies the connection half of a stateful capability, and only one may be installed.
|
|
89
|
+
|
|
90
|
+
| Tier | Modules |
|
|
91
|
+
|---|---|
|
|
92
|
+
| Capability | `api`, `database`, `validators`, `logger`, `auth`, `admin`, `email`, `sms`, `infra` |
|
|
93
|
+
| Feature | `waitlist`, `teams`, `email-react` |
|
|
94
|
+
| Provider | `email-console`, `email-cloudflare`, `email-plunk`, `logger-console`, `sms-console` |
|
|
95
|
+
| Driver | `database-d1`, `database-postgres` |
|
|
96
|
+
|
|
97
|
+
`saasaloy add <name> --dry-run` prints what a module would do to your project before it does it. The one-table map of every module, what it gives you, and what it depends on is on the [Modules](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/modules.md) page.
|
|
98
|
+
|
|
99
|
+
The default registry is this repo. `saasaloy add waitlist` fetches `modules/waitlist/` from GitHub at a pinned commit SHA. Any repo with a `modules/` directory can serve as a registry with `saasaloy add owner/repo/<name>`. To publish your own, start at [Contribute a module](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/how-to/contribute-a-module.md).
|
|
100
|
+
|
|
101
|
+
## Cost and requirements
|
|
102
|
+
|
|
103
|
+
`init`, `api`, `database` + `database-d1`, `validators`, `logger`, `auth`, `admin`, `waitlist`, and `teams` all run on Cloudflare's free tier. Cloudflare's limits are Cloudflare's to change, and a project that grows past them should expect to pay.
|
|
104
|
+
|
|
105
|
+
A few modules need something the free tier does not cover:
|
|
106
|
+
|
|
107
|
+
| Module | Needs |
|
|
108
|
+
|---|---|
|
|
109
|
+
| `email-cloudflare` | a Workers paid plan and a sending domain onboarded by hand in the Cloudflare dashboard |
|
|
110
|
+
| `email-plunk` | a [Plunk](https://www.useplunk.com) account and `PLUNK_API_KEY` |
|
|
111
|
+
| `database-postgres` | a Postgres server reachable from a Worker, with its URL in `DATABASE_URL`. Install instead of `database-d1`, never alongside |
|
|
112
|
+
| `sms` | a third-party SMS account for any real send. Cloudflare has no SMS product. `sms-console` is free |
|
|
113
|
+
|
|
114
|
+
The console providers (`email-console`, `sms-console`, `logger-console`) log instead of sending, so local development needs no plan, domain, or key. Details for each are in the [Reference](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/reference.md#email-providers).
|
|
115
|
+
|
|
116
|
+
## Deploy
|
|
117
|
+
|
|
118
|
+
Each deployable workspace owns its `wrangler.jsonc` and `deploy` script. Run them one at a time, or install the `infra` module and deploy 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).
|
|
119
|
+
|
|
120
|
+
## Documentation
|
|
121
|
+
|
|
122
|
+
All docs live in [`docs/wiki/`](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/index.md).
|
|
123
|
+
|
|
124
|
+
**Use Saasaloy**
|
|
125
|
+
|
|
126
|
+
- [Getting started](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/getting-started.md): install the CLI, scaffold a project, run it.
|
|
127
|
+
- [Make the project yours](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/how-to/make-it-yours.md): the bundled skills for the product brief, landing copy, and theme.
|
|
128
|
+
- [Modules](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/modules.md): every module in the default registry, in one table.
|
|
129
|
+
- [Add a module](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/how-to/add-a-module.md): install a feature and its prerequisites.
|
|
130
|
+
- [Remove a module](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/how-to/remove-a-module.md): take one back out, and what stays behind.
|
|
131
|
+
- [Deploy to Cloudflare](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/how-to/deploy-to-cloudflare.md): ship each workspace.
|
|
132
|
+
|
|
133
|
+
**Build a module**
|
|
134
|
+
|
|
135
|
+
- [Contribute a module](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/how-to/contribute-a-module.md): authoring guides and how to test a module before it ships.
|
|
136
|
+
- [A bad descriptor reached `main`](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/runbooks/bad-descriptor-on-main.md): the registry is live, so this is an incident.
|
|
137
|
+
|
|
138
|
+
**Both tracks**
|
|
139
|
+
|
|
140
|
+
- [Architecture](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/architecture.md): how the CLI, the registry, and a generated project fit together.
|
|
141
|
+
- [Reference](https://github.com/mimukit/saasaloy/blob/main/docs/wiki/reference.md): every command, flag, environment variable, and config file.
|
|
142
|
+
- [`CONTEXT.md`](https://github.com/mimukit/saasaloy/blob/main/CONTEXT.md): the vocabulary. Module, capability, provider, coordinate, applier.
|
|
143
|
+
- [`docs/adr/`](https://github.com/mimukit/saasaloy/blob/main/docs/adr/): why the design is what it is, one decision per file.
|
|
144
|
+
|
|
145
|
+
## Contributing
|
|
146
|
+
|
|
147
|
+
Issues and pull requests are welcome. [`CONTRIBUTING.md`](https://github.com/mimukit/saasaloy/blob/main/CONTRIBUTING.md) covers the `.dev/playground`, the lint and test gates, and the dependency update flow. The `billing` module is tracked in [#14](https://github.com/mimukit/saasaloy/issues/14).
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
[MIT](https://github.com/mimukit/saasaloy/blob/main/LICENSE.md)
|
package/dist/index.js
CHANGED
|
@@ -3667,7 +3667,7 @@ import { fileURLToPath as fileURLToPath3 } from "url";
|
|
|
3667
3667
|
// package.json
|
|
3668
3668
|
var package_default = {
|
|
3669
3669
|
name: "saasaloy",
|
|
3670
|
-
version: "0.1.
|
|
3670
|
+
version: "0.1.1",
|
|
3671
3671
|
description: "Composable SaaS accelerator kit.",
|
|
3672
3672
|
keywords: [
|
|
3673
3673
|
"saas",
|
|
@@ -3706,7 +3706,7 @@ var package_default = {
|
|
|
3706
3706
|
},
|
|
3707
3707
|
scripts: {
|
|
3708
3708
|
build: "tsup",
|
|
3709
|
-
prepack: "pnpm run build",
|
|
3709
|
+
prepack: "pnpm -w run readme:cli && pnpm run build",
|
|
3710
3710
|
dev: "tsup --watch",
|
|
3711
3711
|
start: "node ./dist/index.js",
|
|
3712
3712
|
typecheck: "tsc --noEmit",
|