@quickback-dev/cli 0.40.0 → 0.46.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.
- package/dist/commands/claude.d.ts.map +1 -1
- package/dist/commands/claude.js +8 -0
- package/dist/commands/claude.js.map +1 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +13 -2
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/compile.test.js +26 -21
- package/dist/commands/compile.test.js.map +1 -1
- package/dist/commands/create.js +6 -9
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +0 -9
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +6 -7
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +0 -4
- package/dist/commands/whoami.js.map +1 -1
- package/dist/docs/content.d.ts.map +1 -1
- package/dist/docs/content.js +23 -33
- package/dist/docs/content.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/api-client.d.ts +0 -12
- package/dist/lib/api-client.d.ts.map +1 -1
- package/dist/lib/api-client.js +0 -10
- package/dist/lib/api-client.js.map +1 -1
- package/dist/lib/api-client.test.js +13 -8
- package/dist/lib/api-client.test.js.map +1 -1
- package/dist/lib/auth.d.ts +0 -1
- package/dist/lib/auth.d.ts.map +1 -1
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/compiler-stubs.d.ts +12 -0
- package/dist/lib/compiler-stubs.d.ts.map +1 -1
- package/dist/lib/compiler-stubs.js +18 -0
- package/dist/lib/compiler-stubs.js.map +1 -1
- package/dist/lib/file-loader.d.ts +14 -0
- package/dist/lib/file-loader.d.ts.map +1 -1
- package/dist/lib/file-loader.js +63 -9
- package/dist/lib/file-loader.js.map +1 -1
- package/dist/skill/SKILL.md +76 -6
- package/dist/skill/docs/changelog.md +253 -0
- package/dist/skill/docs/compiler/cloud-compiler/authentication.md +1 -2
- package/dist/skill/docs/compiler/cloud-compiler/cli.md +7 -8
- package/dist/skill/docs/compiler/config/agents.md +49 -1
- package/dist/skill/docs/compiler/config/auth.md +20 -5
- package/dist/skill/docs/compiler/config/security.md +46 -0
- package/dist/skill/docs/compiler/definitions/access.md +1 -1
- package/dist/skill/docs/compiler/definitions/actions.md +46 -4
- package/dist/skill/docs/compiler/definitions/scopes.md +11 -3
- package/dist/skill/docs/compiler/getting-started/full-example.md +5 -3
- package/dist/skill/docs/compiler/getting-started/index.md +7 -7
- package/dist/skill/docs/compiler/getting-started/patterns.md +39 -5
- package/dist/skill/docs/compiler/getting-started/template-blog.md +65 -44
- package/dist/skill/docs/compiler/getting-started/template-cloudflare.md +4 -5
- package/dist/skill/docs/compiler/getting-started/template-empty.md +7 -1
- package/dist/skill/docs/compiler/getting-started/templates.md +6 -6
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +23 -0
- package/dist/skill/docs/stack/account-ui/features/passwordless.md +4 -10
- package/dist/skill/docs/stack/account-ui/hooks.md +24 -1
- package/dist/skill/docs/stack/auth/plugins/aws-ses.md +0 -7
- package/dist/skill/docs/stack/auth/plugins/index.md +71 -28
- package/dist/skill/docs/stack/storage/r2.md +8 -6
- package/dist/skill/docs/stack/storage/using-r2.md +58 -33
- package/dist/templates/registry.d.ts +0 -12
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +0 -42
- package/dist/templates/registry.js.map +1 -1
- package/package.json +1 -1
- package/src/skill/SKILL.md +76 -6
- package/src/skill/docs/changelog.md +253 -0
- package/src/skill/docs/compiler/cloud-compiler/authentication.md +1 -2
- package/src/skill/docs/compiler/cloud-compiler/cli.md +7 -8
- package/src/skill/docs/compiler/config/agents.md +49 -1
- package/src/skill/docs/compiler/config/auth.md +20 -5
- package/src/skill/docs/compiler/config/security.md +46 -0
- package/src/skill/docs/compiler/definitions/access.md +1 -1
- package/src/skill/docs/compiler/definitions/actions.md +46 -4
- package/src/skill/docs/compiler/definitions/scopes.md +11 -3
- package/src/skill/docs/compiler/getting-started/full-example.md +5 -3
- package/src/skill/docs/compiler/getting-started/index.md +7 -7
- package/src/skill/docs/compiler/getting-started/patterns.md +39 -5
- package/src/skill/docs/compiler/getting-started/template-blog.md +65 -44
- package/src/skill/docs/compiler/getting-started/template-cloudflare.md +4 -5
- package/src/skill/docs/compiler/getting-started/template-empty.md +7 -1
- package/src/skill/docs/compiler/getting-started/templates.md +6 -6
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +23 -0
- package/src/skill/docs/stack/account-ui/features/passwordless.md +4 -10
- package/src/skill/docs/stack/account-ui/hooks.md +24 -1
- package/src/skill/docs/stack/auth/plugins/aws-ses.md +0 -7
- package/src/skill/docs/stack/auth/plugins/index.md +71 -28
- package/src/skill/docs/stack/storage/r2.md +8 -6
- package/src/skill/docs/stack/storage/using-r2.md +58 -33
- package/dist/skill/docs/stack/auth/plugins/combo-auth.md +0 -74
- package/dist/skill/docs/stack/auth/plugins/upgrade-anonymous.md +0 -155
- package/src/skill/docs/stack/auth/plugins/combo-auth.md +0 -74
- package/src/skill/docs/stack/auth/plugins/upgrade-anonymous.md +0 -155
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The Cloudflare template creates a production-ready backend running on Cloudflare Workers with D1 (SQLite at the edge), KV storage, and Better Auth.
|
|
4
4
|
|
|
5
|
-
`cloudflare` is a **bare scaffold** — multi-tenant orgs + auth + DB are wired in, but there are no example features. Add your own feature files under `quickback/features/`. If you want a working example to read first, use the [todos template](/compiler/getting-started/templates#multi-tenant-scaffolds
|
|
5
|
+
`cloudflare` is a **bare scaffold** — multi-tenant orgs + auth + DB are wired in, but there are no example features. Add your own feature files under `quickback/features/`. If you want a working example to read first, use the [todos template](/compiler/getting-started/templates#multi-tenant-scaffolds) — same providers, but with a complete `todos` feature ready to extend.
|
|
6
6
|
|
|
7
7
|
## Create the Project
|
|
8
8
|
|
|
@@ -43,9 +43,6 @@ my-app/
|
|
|
43
43
|
export default {
|
|
44
44
|
name: "my-app",
|
|
45
45
|
template: "hono",
|
|
46
|
-
features: {
|
|
47
|
-
organizations: true,
|
|
48
|
-
},
|
|
49
46
|
auth: {
|
|
50
47
|
// Use "role+" in access rules to mean "this role and above".
|
|
51
48
|
// e.g. roles: ["member+"] expands to ["member", "admin", "owner"].
|
|
@@ -62,9 +59,11 @@ export default {
|
|
|
62
59
|
};
|
|
63
60
|
```
|
|
64
61
|
|
|
62
|
+
Multi-tenant organizations are on by default — no flag needed. To build a single-tenant app instead, set `organizations: false` on the database provider config.
|
|
63
|
+
|
|
65
64
|
### Adding your first feature
|
|
66
65
|
|
|
67
|
-
Create a file at `quickback/features/<name>/<name>.ts` and export a `defineTable(...)` default. The shape used by the `todos` template makes a good starting point — see [todos.ts in the template registry](/compiler/getting-started/templates#multi-tenant-scaffolds
|
|
66
|
+
Create a file at `quickback/features/<name>/<name>.ts` and export a `defineTable(...)` default. The shape used by the `todos` template makes a good starting point — see [todos.ts in the template registry](/compiler/getting-started/templates#multi-tenant-scaffolds) for a full multi-tenant example with masking, actions, and a named view.
|
|
68
67
|
|
|
69
68
|
```typescript
|
|
70
69
|
// quickback/features/posts/posts.ts
|
|
@@ -33,6 +33,12 @@ my-app/
|
|
|
33
33
|
export default {
|
|
34
34
|
name: "my-app",
|
|
35
35
|
template: "hono",
|
|
36
|
+
auth: {
|
|
37
|
+
// Role hierarchy: lowest → highest privilege.
|
|
38
|
+
// Use "role+" in access rules to mean "this role and above".
|
|
39
|
+
// e.g. roles: ["member+"] expands to ["member", "admin", "owner"].
|
|
40
|
+
roleHierarchy: ["member", "admin", "owner"],
|
|
41
|
+
},
|
|
36
42
|
providers: {
|
|
37
43
|
runtime: { name: "cloudflare", config: {} },
|
|
38
44
|
database: {
|
|
@@ -96,7 +102,7 @@ quickback compile
|
|
|
96
102
|
|
|
97
103
|
## Setup Steps
|
|
98
104
|
|
|
99
|
-
Follow the same setup steps as the [Cloudflare template](/compiler/getting-started/template-cloudflare#setup-steps).
|
|
105
|
+
Follow the same setup steps as the [Cloudflare template](/compiler/getting-started/template-cloudflare#setup-steps). Compiling with zero features works (you get an auth-only API); add feature files as you go and recompile.
|
|
100
106
|
|
|
101
107
|
## Next Steps
|
|
102
108
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Quickback provides pre-configured templates to get you started quickly. Each template combines a runtime, database, and auth provider into a working project.
|
|
4
4
|
|
|
5
|
-
The fastest way to start is `quickback start` — an interactive picker that asks for a template + project name and scaffolds in the current directory if it's empty, otherwise creates a subfolder.
|
|
5
|
+
The fastest way to start is `quickback start` — an interactive picker that asks for a template + project name and scaffolds in the current directory if it's empty, otherwise creates a subfolder. The picker offers `cloudflare`, `todos`, `blog`, and `empty`; every template (including `saas`) is available scriptably via `quickback create <template> <name>`.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# Interactive (recommended for first-time use)
|
|
@@ -12,7 +12,7 @@ npx @quickback-dev/cli start
|
|
|
12
12
|
|
|
13
13
|
## Available Templates
|
|
14
14
|
|
|
15
|
-
### Multi-tenant scaffolds
|
|
15
|
+
### Multi-tenant scaffolds
|
|
16
16
|
|
|
17
17
|
Cloudflare Workers + D1 + Better Auth with the organization plugin and a `member` / `admin` / `owner` role hierarchy wired in.
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@ Cloudflare Workers + D1 + Better Auth with the organization plugin and a `member
|
|
|
23
23
|
|
|
24
24
|
The **todos** template is the recommended first read — it exercises every security pillar (firewall, access, guards, masking) plus actions and views in ~80 lines you can scan in five minutes.
|
|
25
25
|
|
|
26
|
-
### Fixed-org starter
|
|
26
|
+
### Fixed-org starter
|
|
27
27
|
|
|
28
28
|
| Template | Includes | Command |
|
|
29
29
|
|----------|----------|---------|
|
|
@@ -31,7 +31,7 @@ The **todos** template is the recommended first read — it exercises every secu
|
|
|
31
31
|
|
|
32
32
|
The **blog** template uses [pinned organization mode](/compiler/config/single-tenant) and scaffolds `features.pinnedOrganizationId: "org_replace_me"`.
|
|
33
33
|
|
|
34
|
-
### Empty scaffold
|
|
34
|
+
### Empty scaffold
|
|
35
35
|
|
|
36
36
|
| Template | Includes | Command |
|
|
37
37
|
|----------|----------|---------|
|
|
@@ -39,7 +39,7 @@ The **blog** template uses [pinned organization mode](/compiler/config/single-te
|
|
|
39
39
|
|
|
40
40
|
The empty template creates the project structure with `quickback.config.ts` only. Add your first feature by creating a file under `quickback/features/<name>/<name>.ts` exporting `defineTable(...)` — there is no separate `init` step.
|
|
41
41
|
|
|
42
|
-
### B2B SaaS
|
|
42
|
+
### B2B SaaS
|
|
43
43
|
|
|
44
44
|
| Template | Includes | Command |
|
|
45
45
|
|----------|----------|---------|
|
|
@@ -80,7 +80,7 @@ Best for personal sites, blogs, or any app that only needs one organization at r
|
|
|
80
80
|
|
|
81
81
|
Best when you know exactly what you want to build. Gets you the project structure and config without any opinionated features.
|
|
82
82
|
|
|
83
|
-
### SaaS
|
|
83
|
+
### SaaS
|
|
84
84
|
|
|
85
85
|
Best for production B2B work. Adds R2 file uploads, outbound webhooks (with retry/dedupe), split auth/features/webhooks databases, realtime broadcast, and named views.
|
|
86
86
|
|
|
@@ -204,3 +204,26 @@ Or enable the in-project browser via the [`docs` config option](#interactive-api
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
```
|
|
207
|
+
|
|
208
|
+
## Operations manifest
|
|
209
|
+
|
|
210
|
+
Alongside the spec, every compile writes `reports/operations.manifest.json` — a
|
|
211
|
+
stable, machine-readable index of the full route surface (resource, action,
|
|
212
|
+
view, and auth routes):
|
|
213
|
+
|
|
214
|
+
```json
|
|
215
|
+
[
|
|
216
|
+
{ "operationId": "listCustomers", "method": "GET", "path": "/api/v1/customers", "auth": "session", "feature": "customers", "kind": "crud" }
|
|
217
|
+
]
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
The manifest is a public contract: entries are sorted by `operationId`, carry
|
|
221
|
+
no timestamps, and the shape is extend-only — new fields may be added, existing
|
|
222
|
+
ones won't change meaning. `operationId`s are stable across compiles for the
|
|
223
|
+
same configuration, which makes the manifest the recommended integration point
|
|
224
|
+
for agent/MCP tooling, route inventories, and diff-based change review.
|
|
225
|
+
|
|
226
|
+
A sibling artifact, `reports/conformance.manifest.json`, enumerates the
|
|
227
|
+
expected authorization outcome for every route × principal class (derived from
|
|
228
|
+
the same compiler model that emits the enforcement code). The compiler's own CI
|
|
229
|
+
executes it against a running build on every change.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Passwordless Authentication
|
|
2
2
|
|
|
3
|
-
Account UI supports passwordless authentication via email OTP
|
|
3
|
+
Account UI supports passwordless authentication via email OTP.
|
|
4
4
|
|
|
5
5
|
## Email OTP
|
|
6
6
|
|
|
@@ -10,17 +10,11 @@ When `ENABLE_EMAIL_OTP=true`:
|
|
|
10
10
|
- A one-time password is sent via email
|
|
11
11
|
- User enters the OTP code to authenticate
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
The sign-in email contains the six-digit code only — no magic-link companion. Mail-client URL prefetching burns single-use links, so a code the user types is the reliable path.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## What about magic links?
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
- A login link is sent via email
|
|
19
|
-
- Clicking the link authenticates the user
|
|
20
|
-
|
|
21
|
-
## Combo Auth
|
|
22
|
-
|
|
23
|
-
When both are enabled, Account UI uses the `@quickback-dev/better-auth-combo-auth` plugin to combine them into a single flow — the email contains both a clickable link and a code.
|
|
17
|
+
Account UI does not offer a magic-link sign-in flow. The `magicLink` Better Auth plugin is still available at the API level (see [Auth Plugins](/stack/auth/plugins#magic-links)) for apps that build their own sign-in UI, but the bundled Account SPA is OTP-only by design.
|
|
24
18
|
|
|
25
19
|
## Related
|
|
26
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Quickback discovers project-level auth hooks at `quickback/hooks/` and wires them into [Better Auth's `databaseHooks`](https://www.better-auth.com/docs/concepts/database#database-hooks). Use them for post-signup bootstrap, signup gating, and other lifecycle work.
|
|
4
4
|
|
|
5
|
-
The classic case is multi-tenant: when `account.auth.organizations: true` is set, a freshly signed-up user has no `activeOrganizationId`, so every authenticated `/api/v1/*` returns `
|
|
5
|
+
The classic case is multi-tenant: when `account.auth.organizations: true` is set, a freshly signed-up user has no `activeOrganizationId`, so every authenticated `/api/v1/*` returns `403 ORG_REQUIRED`. An `after-user-create` hook can auto-provision a personal workspace + member row so the next request just works.
|
|
6
6
|
|
|
7
7
|
## Folder layout
|
|
8
8
|
|
|
@@ -25,11 +25,34 @@ Each file has a single default export — an `async (entity, ctx) => ...` functi
|
|
|
25
25
|
| `after-user-create.ts` | `databaseHooks.user.create.after` | `User` | `void` |
|
|
26
26
|
| `after-session-create.ts` | `databaseHooks.session.create.after` | `Session` | `void` |
|
|
27
27
|
| `after-admin-user-create.ts` | `databaseHooks.user.create.after` (filtered) | `User` | `void` |
|
|
28
|
+
| `resolve-oauth-context.ts` | OAuth bearer middleware | OAuth identity + session | Partial `AppContext` tenant fields |
|
|
28
29
|
|
|
29
30
|
`after-admin-user-create.ts` is a **virtual event** — it wires into the same Better Auth `user.create.after` slot as the generic `after-user-create.ts`, but the compiler wraps the call in a runtime filter on the BA context path so it only fires when the row was created via the admin plugin's `POST /admin/create-user` endpoint. Use it for first-time-user provisioning (welcome email, default org assignment) without inspecting `_baCtx?.context?.path` by hand. The generic `after-user-create.ts` still runs for every signup, including admin-created ones.
|
|
30
31
|
|
|
31
32
|
Filenames outside this set are a hard compile-time error so a typo never silently disables a hook. Add events by extending [`apps/compiler/src/parser/hooks.ts`](https://github.com/paulstenhouse/quickback-compiler) (and the matching CLI mirror).
|
|
32
33
|
|
|
34
|
+
## OAuth context resolver
|
|
35
|
+
|
|
36
|
+
First-class MCP OAuth validates the access token and live Better Auth session
|
|
37
|
+
before calling `quickback/hooks/resolve-oauth-context.ts`. Use this trusted
|
|
38
|
+
server hook when tenant selection cannot be derived solely from the session's
|
|
39
|
+
active organization.
|
|
40
|
+
|
|
41
|
+
```ts title="quickback/hooks/resolve-oauth-context.ts"
|
|
42
|
+
export default async ({ token, session, user, context }, { authDb, authSchema, env }) => {
|
|
43
|
+
return {
|
|
44
|
+
activeOrgId: session.activeOrganizationId ?? null,
|
|
45
|
+
activeTeamId: session.activeTeamId ?? null,
|
|
46
|
+
tenantId: session.activeOrganizationId ?? null,
|
|
47
|
+
roles: context.roles,
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The returned object is merged into the standard `AppContext`. The compiler
|
|
53
|
+
always preserves the validated `authenticated`, `userId`, and `user` fields,
|
|
54
|
+
so this hook cannot replace the OAuth identity.
|
|
55
|
+
|
|
33
56
|
## ctx shape
|
|
34
57
|
|
|
35
58
|
Every hook receives `(entity, ctx)`:
|
|
@@ -24,13 +24,8 @@ The plugin handles 8 email types:
|
|
|
24
24
|
| `/ses/send-otp` | One-time password code |
|
|
25
25
|
| `/ses/send-welcome` | Post-signup welcome email |
|
|
26
26
|
| `/ses/send-organization-invitation` | Team/org invite with role |
|
|
27
|
-
| Combo auth | Magic link + OTP in a single email |
|
|
28
27
|
| Delete account | Account deletion confirmation |
|
|
29
28
|
|
|
30
|
-
### Combo Auth Mode
|
|
31
|
-
|
|
32
|
-
When `useComboAuthEmail: true` is set, the plugin sends a single email that includes both a magic link button and an OTP code. Users can choose either method to authenticate.
|
|
33
|
-
|
|
34
29
|
## AWS Signature V4
|
|
35
30
|
|
|
36
31
|
The plugin signs requests to SES using AWS Signature V4 with the Web Crypto API (`crypto.subtle`), making it compatible with Cloudflare Workers without any AWS SDK dependency.
|
|
@@ -122,7 +117,6 @@ const auth = betterAuth({
|
|
|
122
117
|
replyTo: env.EMAIL_REPLY_TO,
|
|
123
118
|
appName: env.APP_NAME || "My App",
|
|
124
119
|
appUrl: env.APP_URL,
|
|
125
|
-
useComboAuthEmail: true, // Optional: combine magic link + OTP
|
|
126
120
|
}),
|
|
127
121
|
],
|
|
128
122
|
});
|
|
@@ -183,5 +177,4 @@ awsSESPlugin({
|
|
|
183
177
|
|
|
184
178
|
## See Also
|
|
185
179
|
|
|
186
|
-
- [Combo Auth Plugin](/stack/auth/plugins/combo-auth) — Combined magic link + OTP authentication
|
|
187
180
|
- [Auth Configuration](/compiler/config/providers) — Configuring auth plugins
|
|
@@ -6,7 +6,7 @@ Quickback ships with a curated set of Better Auth plugins and helper wiring so y
|
|
|
6
6
|
|
|
7
7
|
### Email OTP (with AWS SES)
|
|
8
8
|
|
|
9
|
-
Quickback wires the Better Auth Email OTP flow to
|
|
9
|
+
Quickback wires the Better Auth Email OTP flow to your email provider. When `emailOtp` is enabled, the compiler emits an OTP-only sign-in email — a six-digit code, no magic-link companion.
|
|
10
10
|
|
|
11
11
|
**Enable in config:**
|
|
12
12
|
|
|
@@ -46,23 +46,32 @@ Use this to show UI warnings when SES isn't configured.
|
|
|
46
46
|
- `GET /api/v1/system/email-status`
|
|
47
47
|
- Response: `{ "emailConfigured": true|false }`
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
**Disabling sign-up via OTP:**
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
By default the Email OTP plugin **auto-creates an account** when a code is
|
|
52
|
+
verified for an unknown email — verifying an OTP doubles as registration. This
|
|
53
|
+
is a separate code path from `emailAndPassword.disableSignUp` (which only gates
|
|
54
|
+
`POST /auth/v1/sign-up/email`), so disabling password sign-up alone does *not*
|
|
55
|
+
close the OTP path.
|
|
52
56
|
|
|
53
|
-
|
|
57
|
+
To make OTP sign-in only (existing users can sign in; unknown emails are
|
|
58
|
+
rejected instead of registered), use the object form:
|
|
54
59
|
|
|
55
60
|
```ts
|
|
56
61
|
auth: defineAuth("better-auth", {
|
|
57
62
|
emailAndPassword: { enabled: true },
|
|
58
|
-
plugins:
|
|
63
|
+
plugins: {
|
|
64
|
+
emailOtp: { disableSignUp: true },
|
|
65
|
+
},
|
|
59
66
|
}),
|
|
60
67
|
```
|
|
61
68
|
|
|
62
|
-
**
|
|
63
|
-
|
|
69
|
+
> `emailOtp.disableSignUp` **inherits the global signup gate**: when
|
|
70
|
+
> `account.auth.signup: false` (i.e. `emailAndPassword.disableSignUp: true`) is
|
|
71
|
+
> set, the OTP plugin is gated automatically so it can't be used to bypass it. Set
|
|
72
|
+
> `emailOtp: { disableSignUp: false }` explicitly to opt the OTP path back open
|
|
73
|
+
> while password sign-up stays closed.
|
|
64
74
|
|
|
65
|
-
**Note:** If you send `Content-Type: application/json`, include a body (an empty `{}` is fine). This avoids request parsing errors in some clients.
|
|
66
75
|
|
|
67
76
|
### SMS OTP (with AWS SNS)
|
|
68
77
|
|
|
@@ -129,6 +138,25 @@ auth: defineAuth("better-auth", {
|
|
|
129
138
|
- `POST /auth/v1/magic-link/send` - Send magic link email
|
|
130
139
|
- `GET /auth/v1/magic-link/verify` - Verify magic link token
|
|
131
140
|
|
|
141
|
+
**Disabling sign-up via magic link:**
|
|
142
|
+
|
|
143
|
+
Like Email OTP, the magic-link plugin **auto-creates an account** when a link is
|
|
144
|
+
verified for an unknown email, on a code path independent of
|
|
145
|
+
`emailAndPassword.disableSignUp`. Gate it with the object form:
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
auth: defineAuth("better-auth", {
|
|
149
|
+
emailAndPassword: { enabled: true },
|
|
150
|
+
plugins: {
|
|
151
|
+
magicLink: { disableSignUp: true }, // sign-in only; unknown emails rejected
|
|
152
|
+
},
|
|
153
|
+
}),
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
It inherits the global signup gate the same way `emailOtp.disableSignUp` does:
|
|
157
|
+
`account.auth.signup: false` gates the magic-link path automatically; set
|
|
158
|
+
`magicLink: { disableSignUp: false }` to opt it back open.
|
|
159
|
+
|
|
132
160
|
**Email customization:**
|
|
133
161
|
|
|
134
162
|
Magic link emails use the same AWS SES configuration as Email OTP. Customize the email template via environment variables:
|
|
@@ -285,13 +313,36 @@ Turns your Quickback worker into a standards-compliant OAuth 2.1 + OIDC authoriz
|
|
|
285
313
|
|
|
286
314
|
```ts
|
|
287
315
|
auth: defineAuth("better-auth", {
|
|
288
|
-
|
|
316
|
+
oauth: {
|
|
317
|
+
enabled: true,
|
|
318
|
+
issuerUrl: {
|
|
319
|
+
env: "OAUTH_ISSUER_URL",
|
|
320
|
+
fallback: "http://localhost:8787/auth/v1",
|
|
321
|
+
},
|
|
322
|
+
loginPage: {
|
|
323
|
+
env: "OAUTH_LOGIN_URL",
|
|
324
|
+
fallback: "http://localhost:8787/account/login",
|
|
325
|
+
},
|
|
326
|
+
consentPage: {
|
|
327
|
+
env: "OAUTH_CONSENT_URL",
|
|
328
|
+
fallback: "http://localhost:8787/account/consent",
|
|
329
|
+
},
|
|
330
|
+
scopes: ["openid", "profile", "email", "offline_access"],
|
|
331
|
+
audiences: [
|
|
332
|
+
{ env: "OAUTH_API_AUDIENCE", fallback: "http://localhost:8787" },
|
|
333
|
+
{ env: "OAUTH_MCP_AUDIENCE", fallback: "http://localhost:8787/mcp" },
|
|
334
|
+
],
|
|
335
|
+
allowDynamicClientRegistration: true,
|
|
336
|
+
},
|
|
289
337
|
}),
|
|
290
338
|
```
|
|
291
339
|
|
|
292
|
-
The compiler auto-includes Better Auth's `
|
|
340
|
+
The compiler auto-includes Better Auth's `oauthProvider`, `jwt`, and bearer
|
|
341
|
+
plugins, protects `POST /mcp`, emits RFC 8414 and RFC 9728 discovery, and
|
|
342
|
+
accepts the provider's JWKS-signed access tokens in the standard Quickback
|
|
343
|
+
auth middleware.
|
|
293
344
|
|
|
294
|
-
|
|
345
|
+
The legacy plugin object remains available for provider-specific options:
|
|
295
346
|
|
|
296
347
|
```ts
|
|
297
348
|
auth: defineAuth("better-auth", {
|
|
@@ -312,6 +363,7 @@ auth: defineAuth("better-auth", {
|
|
|
312
363
|
|
|
313
364
|
Discovery (public, no auth):
|
|
314
365
|
- `GET /.well-known/oauth-authorization-server` — RFC 8414 metadata
|
|
366
|
+
- `GET /.well-known/oauth-authorization-server/auth/v1` — RFC 8414 path-insert discovery
|
|
315
367
|
- `GET /.well-known/oauth-protected-resource` — MCP resource metadata
|
|
316
368
|
- `GET /.well-known/openid-configuration` — OIDC discovery
|
|
317
369
|
|
|
@@ -337,25 +389,16 @@ Consent management:
|
|
|
337
389
|
|
|
338
390
|
The compiled Account SPA already serves `/consent`. When `oauthProvider` is enabled, Better Auth redirects unauthenticated users to `${ACCOUNT_URL}/login?redirect=...` and authenticated users straight to `${ACCOUNT_URL}/consent?client_id=...&scope=...&oauth_query=...`. The bundled consent screen reads those params, fetches client metadata via `/oauth2/public-client`, and POSTs back to `/oauth2/consent`.
|
|
339
391
|
|
|
340
|
-
**
|
|
392
|
+
**Token and tenant context:**
|
|
341
393
|
|
|
342
|
-
|
|
394
|
+
Generated middleware validates the provider JWKS, canonical issuer, configured
|
|
395
|
+
audience, expiration, subject, and backing Better Auth session. It then builds
|
|
396
|
+
the same `AppContext` used by session and Quickback JWT authentication.
|
|
397
|
+
Organization membership and role hierarchy are resolved automatically.
|
|
343
398
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
import { auth } from "./auth";
|
|
348
|
-
|
|
349
|
-
const serverClient = createAuthClient({
|
|
350
|
-
plugins: [oauthProviderResourceClient(auth)],
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
const token = req.headers.get("authorization")?.replace("Bearer ", "");
|
|
354
|
-
const payload = await serverClient.verifyAccessToken(token, {
|
|
355
|
-
verifyOptions: { issuer: env.BETTER_AUTH_URL, audience: env.BETTER_AUTH_URL },
|
|
356
|
-
});
|
|
357
|
-
// payload.sub → userId, payload.scope → granted scopes
|
|
358
|
-
```
|
|
399
|
+
For application-specific tenant selection, add
|
|
400
|
+
`quickback/hooks/resolve-oauth-context.ts`; see
|
|
401
|
+
[Auth Hooks](/stack/account-ui/hooks#oauth-context-resolver).
|
|
359
402
|
|
|
360
403
|
**Why this and not the deprecated `mcp` plugin?**
|
|
361
404
|
|
|
@@ -355,12 +355,14 @@ After compiling:
|
|
|
355
355
|
|
|
356
356
|
| Option | Type | Default | Description |
|
|
357
357
|
|--------|------|---------|-------------|
|
|
358
|
-
| `
|
|
359
|
-
| `bucketName` | `string` |
|
|
360
|
-
| `
|
|
361
|
-
| `
|
|
362
|
-
| `
|
|
363
|
-
| `
|
|
358
|
+
| `managed` | `boolean` | `false` | Opt into the FILES_DB subsystem + `/storage/v1/*` + files worker. Off = presign-only. |
|
|
359
|
+
| `bucketName` | `string` | `<project>-media` | R2 bucket the signer targets (override per-call with `signPutUrl(key, { bucket })`) |
|
|
360
|
+
| `presign` | `object` | - | Env-var name overrides: `{ accountIdEnv, accessKeyIdEnv, secretAccessKeyEnv, endpointEnv }` |
|
|
361
|
+
| `binding` | `string` | `R2_BUCKET` | R2 bucket binding name (managed mode) |
|
|
362
|
+
| `filesBinding` | `string` | `FILES_DB` | Files metadata D1 binding (managed mode) |
|
|
363
|
+
| `maxFileSize` | `number \| string` | 10MB | Max upload size — bytes or `"100mb"` (managed mode) |
|
|
364
|
+
| `allowedTypes` | `string[]` | Images only | Allowed MIME types (managed mode) |
|
|
365
|
+
| `publicDomain` | `string` | - | Custom domain for files worker (managed mode) |
|
|
364
366
|
|
|
365
367
|
## Security Model
|
|
366
368
|
|
|
@@ -2,53 +2,78 @@
|
|
|
2
2
|
|
|
3
3
|
Cloudflare R2 provides S3-compatible object storage for file uploads in the Quickback Stack.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
By default `defineFileStorage("cloudflare-r2")` is **presign-only**: you get the
|
|
6
|
+
`ctx.storage` signer and nothing else. The `/storage/v1/*` endpoints shown
|
|
7
|
+
further down only exist in the [managed subsystem](/stack/storage/r2#two-modes)
|
|
8
|
+
(`managed: true`).
|
|
9
|
+
|
|
10
|
+
## Upload Flow (default — `ctx.storage`)
|
|
11
|
+
|
|
12
|
+
Write a normal `defineAction` that signs a presigned URL and stores the key in
|
|
13
|
+
**your own table**. Bytes go directly to R2 — the Worker only signs.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
export default defineAction({
|
|
17
|
+
path: "/media/sign-upload",
|
|
18
|
+
method: "POST",
|
|
19
|
+
input: z.object({ filename: z.string(), contentType: z.string() }),
|
|
20
|
+
access: { roles: ["member"] },
|
|
21
|
+
async execute({ input, ctx, db, storage }) {
|
|
22
|
+
const key = `org/${ctx.activeOrgId}/${crypto.randomUUID()}-${input.filename}`;
|
|
23
|
+
const upload = await storage.signPutUrl(key, { contentType: input.contentType, expiresIn: 600 });
|
|
24
|
+
await db.insert(media).values({ key /* … */ });
|
|
25
|
+
return { uploadUrl: upload.url, key, headers: upload.headers };
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# 1. Ask your action for a signed URL (your auth/roles run here)
|
|
32
|
+
curl -X POST https://api.example.com/api/v1/media/sign-upload \
|
|
33
|
+
-H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
|
|
34
|
+
-d '{ "filename": "report.pdf", "contentType": "application/pdf" }'
|
|
35
|
+
# → { "uploadUrl": "https://<account>.r2.cloudflarestorage.com/...&X-Amz-Signature=...", "key": "...", "headers": { "Content-Type": "application/pdf" } }
|
|
36
|
+
|
|
37
|
+
# 2. Upload the bytes straight to R2 (replay the returned headers)
|
|
38
|
+
curl -X PUT "<uploadUrl>" -H "Content-Type: application/pdf" --data-binary @report.pdf
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`storage.signPutUrl(key, { contentType?, expiresIn?, bucket? })` returns
|
|
42
|
+
`{ url, method, headers, key, expiresAt }`; `storage.signGetUrl(key, { expiresIn?, downloadFilename?, bucket? })`
|
|
43
|
+
returns a presigned GET URL. Pass `bucket` to target a bucket other than the
|
|
44
|
+
configured default.
|
|
45
|
+
|
|
46
|
+
Presigning needs an R2 API token — set the `R2_ACCOUNT_ID`, `R2_ACCESS_KEY_ID`,
|
|
47
|
+
and `R2_SECRET_ACCESS_KEY` secrets. See [R2 Setup → Presigned uploads](/stack/storage/r2#presigned-uploads-recommended).
|
|
6
48
|
|
|
7
|
-
|
|
8
|
-
directly to R2 and never stream through your Worker:
|
|
49
|
+
## Upload Flow (managed mode — `/storage/v1/*`)
|
|
9
50
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
2. **Upload directly to R2** — Client `PUT`s the bytes to R2 (bypasses your Worker)
|
|
13
|
-
3. **Confirm** — `/storage/v1/confirm/...` reconciles the recorded size + etag
|
|
51
|
+
With `managed: true`, the generated API also exposes turnkey presigned
|
|
52
|
+
endpoints backed by the FILES_DB metadata system:
|
|
14
53
|
|
|
15
54
|
```bash
|
|
16
55
|
# 1. Request a presigned upload URL
|
|
17
56
|
curl -X POST https://api.example.com/storage/v1/presign/documents/report.pdf \
|
|
18
|
-
-H "Authorization: Bearer <token>" \
|
|
19
|
-
-H "Content-Type: application/json" \
|
|
57
|
+
-H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
|
|
20
58
|
-d '{ "contentType": "application/pdf", "size": 248000 }'
|
|
59
|
+
# → { "id": "obj_abc", "key": "...", "uploadUrl": "...", "headers": {...}, "expiresAt": "..." }
|
|
60
|
+
|
|
61
|
+
# 2. Upload directly to R2
|
|
62
|
+
curl -X PUT "<uploadUrl>" -H "Content-Type: application/pdf" --data-binary @report.pdf
|
|
21
63
|
|
|
22
|
-
#
|
|
23
|
-
# {
|
|
24
|
-
# "id": "obj_abc123",
|
|
25
|
-
# "key": "org_abc/documents/report.pdf",
|
|
26
|
-
# "uploadUrl": "https://<account>.r2.cloudflarestorage.com/...&X-Amz-Signature=...",
|
|
27
|
-
# "method": "PUT",
|
|
28
|
-
# "headers": { "Content-Type": "application/pdf" },
|
|
29
|
-
# "expiresAt": "2026-06-02T12:10:00.000Z"
|
|
30
|
-
# }
|
|
31
|
-
|
|
32
|
-
# 2. Upload directly to R2 using the presigned URL (replay the returned headers)
|
|
33
|
-
curl -X PUT "<uploadUrl>" \
|
|
34
|
-
-H "Content-Type: application/pdf" \
|
|
35
|
-
--data-binary @report.pdf
|
|
36
|
-
|
|
37
|
-
# 3. Confirm the upload
|
|
64
|
+
# 3. Confirm (reconciles size + etag)
|
|
38
65
|
curl -X POST https://api.example.com/storage/v1/confirm/documents/report.pdf \
|
|
39
66
|
-H "Authorization: Bearer <token>"
|
|
40
67
|
```
|
|
41
68
|
|
|
42
|
-
Presigning needs an R2 API token — set the `R2_ACCOUNT_ID`, `R2_ACCESS_KEY_ID`,
|
|
43
|
-
and `R2_SECRET_ACCESS_KEY` secrets. See [R2 Setup → Presigned uploads](/stack/storage/r2#presigned-uploads-recommended).
|
|
44
|
-
|
|
45
|
-
For uploads that should land in **your own table** (with your own access rules),
|
|
46
|
-
sign the URL from inside a `defineAction` via `ctx.storage` — see
|
|
47
|
-
[Signing from your own action](/stack/storage/r2#signing-from-your-own-action).
|
|
48
|
-
|
|
49
69
|
## Download Flow
|
|
50
70
|
|
|
51
|
-
|
|
71
|
+
In **presign-only** mode, mint a short-lived download URL with
|
|
72
|
+
`storage.signGetUrl(key, { downloadFilename })` from your action and hand it to
|
|
73
|
+
the client — the bytes come straight from R2.
|
|
74
|
+
|
|
75
|
+
In **managed** mode, files are also served through the worker with security
|
|
76
|
+
checks applied:
|
|
52
77
|
|
|
53
78
|
```bash
|
|
54
79
|
# Download a file (auth + firewall enforced)
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
* Template Registry
|
|
3
3
|
*
|
|
4
4
|
* Defines available project templates for quickback create command.
|
|
5
|
-
* The server is the source of truth for templates and tiers.
|
|
6
|
-
* This local registry serves as a fallback when offline.
|
|
7
5
|
*/
|
|
8
|
-
import { type TemplateInfo } from '../lib/api-client.js';
|
|
9
6
|
export interface TemplateDefinition {
|
|
10
7
|
name: string;
|
|
11
8
|
description: string;
|
|
@@ -16,16 +13,7 @@ export interface TemplateDefinition {
|
|
|
16
13
|
includes: string[];
|
|
17
14
|
preset: string;
|
|
18
15
|
requiresCloudflare: boolean;
|
|
19
|
-
tier: 'free' | 'pro';
|
|
20
16
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Fetch templates from server (with caching)
|
|
23
|
-
*/
|
|
24
|
-
export declare function fetchServerTemplates(): Promise<Record<string, TemplateInfo>>;
|
|
25
|
-
/**
|
|
26
|
-
* Check if a template requires pro tier
|
|
27
|
-
*/
|
|
28
|
-
export declare function isProTemplate(templateName: string): Promise<boolean>;
|
|
29
17
|
export declare const TEMPLATE_REGISTRY: Record<string, TemplateDefinition>;
|
|
30
18
|
export declare const TEMPLATE_ALIASES: Record<string, string>;
|
|
31
19
|
export declare function getTemplate(nameOrAlias: string): TemplateDefinition | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,CAAC;IAC/C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CA4DhE,CAAC;AAKF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQnD,CAAC;AAEF,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAG/E;AAED,wBAAgB,aAAa,IAAI,kBAAkB,EAAE,CAEpD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAE5C;AAED,wBAAgB,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEpD;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAgB3C"}
|
|
@@ -2,44 +2,8 @@
|
|
|
2
2
|
* Template Registry
|
|
3
3
|
*
|
|
4
4
|
* Defines available project templates for quickback create command.
|
|
5
|
-
* The server is the source of truth for templates and tiers.
|
|
6
|
-
* This local registry serves as a fallback when offline.
|
|
7
5
|
*/
|
|
8
|
-
import { fetchTemplates } from '../lib/api-client.js';
|
|
9
|
-
// Cache for server templates
|
|
10
|
-
let serverTemplatesCache = null;
|
|
11
|
-
/**
|
|
12
|
-
* Fetch templates from server (with caching)
|
|
13
|
-
*/
|
|
14
|
-
export async function fetchServerTemplates() {
|
|
15
|
-
if (serverTemplatesCache) {
|
|
16
|
-
return serverTemplatesCache;
|
|
17
|
-
}
|
|
18
|
-
try {
|
|
19
|
-
serverTemplatesCache = await fetchTemplates();
|
|
20
|
-
return serverTemplatesCache;
|
|
21
|
-
}
|
|
22
|
-
catch {
|
|
23
|
-
// Fallback to local registry
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Check if a template requires pro tier
|
|
29
|
-
*/
|
|
30
|
-
export async function isProTemplate(templateName) {
|
|
31
|
-
const serverTemplates = await fetchServerTemplates();
|
|
32
|
-
const resolved = TEMPLATE_ALIASES[templateName] || templateName;
|
|
33
|
-
// Check server first
|
|
34
|
-
if (serverTemplates[resolved]) {
|
|
35
|
-
return serverTemplates[resolved].tier === 'pro';
|
|
36
|
-
}
|
|
37
|
-
// Fallback to local
|
|
38
|
-
const local = TEMPLATE_REGISTRY[resolved];
|
|
39
|
-
return local?.tier === 'pro';
|
|
40
|
-
}
|
|
41
6
|
export const TEMPLATE_REGISTRY = {
|
|
42
|
-
// Free tier templates
|
|
43
7
|
"betterauth-d1-cloudflare": {
|
|
44
8
|
name: "Better Auth + D1 + Cloudflare",
|
|
45
9
|
description: "Authentication with Better Auth, D1 database, deployed to Cloudflare Workers — bare scaffold, add your own features",
|
|
@@ -50,7 +14,6 @@ export const TEMPLATE_REGISTRY = {
|
|
|
50
14
|
includes: ["betterauth", "d1", "hono", "drizzle"],
|
|
51
15
|
preset: "cloudflare",
|
|
52
16
|
requiresCloudflare: true,
|
|
53
|
-
tier: "free",
|
|
54
17
|
},
|
|
55
18
|
"todos-cloudflare": {
|
|
56
19
|
name: "Todos Example (Cloudflare)",
|
|
@@ -62,11 +25,9 @@ export const TEMPLATE_REGISTRY = {
|
|
|
62
25
|
includes: ["betterauth", "d1", "hono", "drizzle"],
|
|
63
26
|
preset: "cloudflare",
|
|
64
27
|
requiresCloudflare: true,
|
|
65
|
-
tier: "free",
|
|
66
28
|
},
|
|
67
29
|
// bun template hidden — see apps/compiler/src/providers/runtime/providers/bun/README.md
|
|
68
30
|
// → "Known Issues" for the list of generator drift bugs blocking it.
|
|
69
|
-
// Pro tier templates
|
|
70
31
|
"b2bsaas-cloudflare": {
|
|
71
32
|
name: "B2B SaaS Starter",
|
|
72
33
|
description: "Full B2B SaaS with auth, organizations, file storage (R2), webhooks, and views",
|
|
@@ -77,7 +38,6 @@ export const TEMPLATE_REGISTRY = {
|
|
|
77
38
|
includes: ["betterauth", "organizations", "d1", "r2", "files", "webhooks", "hono", "drizzle"],
|
|
78
39
|
preset: "cloudflare",
|
|
79
40
|
requiresCloudflare: true,
|
|
80
|
-
tier: "pro",
|
|
81
41
|
},
|
|
82
42
|
// api-minimal-bun also hidden alongside the other bun templates.
|
|
83
43
|
"blog-cloudflare": {
|
|
@@ -90,7 +50,6 @@ export const TEMPLATE_REGISTRY = {
|
|
|
90
50
|
includes: ["betterauth", "d1", "hono", "drizzle"],
|
|
91
51
|
preset: "blog",
|
|
92
52
|
requiresCloudflare: true,
|
|
93
|
-
tier: "free",
|
|
94
53
|
},
|
|
95
54
|
"empty-cloudflare": {
|
|
96
55
|
name: "Empty Scaffold (Cloudflare)",
|
|
@@ -102,7 +61,6 @@ export const TEMPLATE_REGISTRY = {
|
|
|
102
61
|
includes: ["betterauth", "d1", "hono", "drizzle"],
|
|
103
62
|
preset: "cloudflare",
|
|
104
63
|
requiresCloudflare: true,
|
|
105
|
-
tier: "free",
|
|
106
64
|
},
|
|
107
65
|
// empty-bun also hidden alongside the other bun templates.
|
|
108
66
|
};
|