@quickback-dev/cli 0.10.15 → 0.10.20

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 (249) hide show
  1. package/dist/commands/compile.d.ts.map +1 -1
  2. package/dist/commands/compile.js +40 -2
  3. package/dist/commands/compile.js.map +1 -1
  4. package/dist/docs/content.js +6 -6
  5. package/dist/docs/content.js.map +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/skill/SKILL.md +142 -1051
  8. package/dist/skill/agents/quickback-specialist/AGENT.md +36 -0
  9. package/dist/skill/docs/changelog.md +1192 -0
  10. package/dist/skill/docs/compiler/claude-code-skill.md +312 -0
  11. package/dist/skill/docs/compiler/cloud-compiler/authentication.md +63 -0
  12. package/dist/skill/docs/compiler/cloud-compiler/cli.md +307 -0
  13. package/dist/skill/docs/compiler/cloud-compiler/endpoints.md +78 -0
  14. package/dist/skill/docs/compiler/cloud-compiler/index.md +65 -0
  15. package/dist/skill/docs/compiler/cloud-compiler/local-compiler.md +115 -0
  16. package/dist/skill/docs/compiler/cloud-compiler/troubleshooting.md +76 -0
  17. package/dist/skill/docs/compiler/config/agents.md +144 -0
  18. package/dist/skill/docs/compiler/config/auth.md +109 -0
  19. package/dist/skill/docs/compiler/config/bindings.md +176 -0
  20. package/dist/skill/docs/compiler/config/domains.md +149 -0
  21. package/dist/skill/docs/compiler/config/index.md +419 -0
  22. package/dist/skill/docs/compiler/config/output.md +338 -0
  23. package/dist/skill/docs/compiler/config/providers.md +248 -0
  24. package/dist/skill/docs/compiler/config/security.md +255 -0
  25. package/dist/skill/docs/compiler/config/single-tenant.md +128 -0
  26. package/dist/skill/docs/compiler/config/variables.md +157 -0
  27. package/dist/skill/docs/compiler/definitions/access.md +445 -0
  28. package/dist/skill/docs/compiler/definitions/actions.md +884 -0
  29. package/dist/skill/docs/compiler/definitions/concepts.md +52 -0
  30. package/dist/skill/docs/compiler/definitions/feature.md +164 -0
  31. package/dist/skill/docs/compiler/definitions/firewall.md +285 -0
  32. package/dist/skill/docs/compiler/definitions/guards.md +241 -0
  33. package/dist/skill/docs/compiler/definitions/index.md +219 -0
  34. package/dist/skill/docs/compiler/definitions/masking.md +241 -0
  35. package/dist/skill/docs/compiler/definitions/read.md +220 -0
  36. package/dist/skill/docs/compiler/definitions/schema.md +697 -0
  37. package/dist/skill/docs/compiler/definitions/validation.md +35 -0
  38. package/dist/skill/docs/compiler/definitions/views.md +292 -0
  39. package/dist/skill/docs/compiler/getting-started/claude-code.md +126 -0
  40. package/dist/skill/docs/compiler/getting-started/full-example.md +431 -0
  41. package/dist/skill/docs/compiler/getting-started/hand-crafted.md +178 -0
  42. package/dist/skill/docs/compiler/getting-started/index.md +192 -0
  43. package/dist/skill/docs/compiler/getting-started/patterns.md +225 -0
  44. package/dist/skill/docs/compiler/getting-started/template-blog.md +280 -0
  45. package/dist/skill/docs/compiler/getting-started/template-cloudflare.md +260 -0
  46. package/dist/skill/docs/compiler/getting-started/template-empty.md +112 -0
  47. package/dist/skill/docs/compiler/getting-started/templates.md +111 -0
  48. package/dist/skill/docs/compiler/index.md +85 -0
  49. package/dist/skill/docs/compiler/targets/hono-api/cloudflare.md +94 -0
  50. package/dist/skill/docs/compiler/targets/hono-api/database/d1.md +246 -0
  51. package/dist/skill/docs/compiler/targets/hono-api/database/index.md +16 -0
  52. package/dist/skill/docs/compiler/targets/hono-api/database/neon.md +144 -0
  53. package/dist/skill/docs/compiler/targets/hono-api/database/using-d1.md +39 -0
  54. package/dist/skill/docs/compiler/targets/hono-api/index.md +37 -0
  55. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/actions-api.md +323 -0
  56. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +357 -0
  57. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/caching.md +105 -0
  58. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +652 -0
  59. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/errors.md +224 -0
  60. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/index.md +37 -0
  61. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +203 -0
  62. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/query-params.md +199 -0
  63. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/views-api.md +161 -0
  64. package/dist/skill/docs/compiler/targets/index.md +47 -0
  65. package/dist/skill/docs/compiler/targets/supabase-rls/index.md +55 -0
  66. package/dist/skill/docs/compiler/targets/supabase-rls/limitations.md +48 -0
  67. package/dist/skill/docs/compiler/targets/supabase-rls/mappings.md +99 -0
  68. package/dist/skill/docs/compiler/targets/supabase-rls/setup.md +88 -0
  69. package/dist/skill/docs/compiler/troubleshooting.md +120 -0
  70. package/dist/skill/docs/index.md +77 -0
  71. package/dist/skill/docs/stack/account-ui/customization.md +378 -0
  72. package/dist/skill/docs/stack/account-ui/environment-variables.md +325 -0
  73. package/dist/skill/docs/stack/account-ui/features/admin.md +76 -0
  74. package/dist/skill/docs/stack/account-ui/features/api-keys.md +22 -0
  75. package/dist/skill/docs/stack/account-ui/features/avatars.md +37 -0
  76. package/dist/skill/docs/stack/account-ui/features/cli-authorize.md +21 -0
  77. package/dist/skill/docs/stack/account-ui/features/index.md +291 -0
  78. package/dist/skill/docs/stack/account-ui/features/organizations.md +29 -0
  79. package/dist/skill/docs/stack/account-ui/features/passkeys.md +31 -0
  80. package/dist/skill/docs/stack/account-ui/features/passwordless.md +28 -0
  81. package/dist/skill/docs/stack/account-ui/features/sessions.md +20 -0
  82. package/dist/skill/docs/stack/account-ui/hooks.md +209 -0
  83. package/dist/skill/docs/stack/account-ui/index.md +147 -0
  84. package/dist/skill/docs/stack/account-ui/library-usage.md +257 -0
  85. package/dist/skill/docs/stack/account-ui/standalone.md +149 -0
  86. package/dist/skill/docs/stack/account-ui/with-quickback.md +160 -0
  87. package/dist/skill/docs/stack/account-ui/worker.md +362 -0
  88. package/dist/skill/docs/stack/auth/api-keys.md +15 -0
  89. package/dist/skill/docs/stack/auth/device-auth.md +14 -0
  90. package/dist/skill/docs/stack/auth/index.md +64 -0
  91. package/dist/skill/docs/stack/auth/jwt-optimization.md +245 -0
  92. package/dist/skill/docs/stack/auth/plugins/aws-ses.md +127 -0
  93. package/dist/skill/docs/stack/auth/plugins/combo-auth.md +74 -0
  94. package/dist/skill/docs/stack/auth/plugins/index.md +228 -0
  95. package/dist/skill/docs/stack/auth/plugins/upgrade-anonymous.md +155 -0
  96. package/dist/skill/docs/stack/auth/security.md +455 -0
  97. package/dist/skill/docs/stack/auth/using-auth.md +39 -0
  98. package/dist/skill/docs/stack/cms/actions.md +199 -0
  99. package/dist/skill/docs/stack/cms/components.md +479 -0
  100. package/dist/skill/docs/stack/cms/connecting.md +199 -0
  101. package/dist/skill/docs/stack/cms/dashboard.md +39 -0
  102. package/dist/skill/docs/stack/cms/index.md +158 -0
  103. package/dist/skill/docs/stack/cms/inline-editing.md +136 -0
  104. package/dist/skill/docs/stack/cms/pages.md +275 -0
  105. package/dist/skill/docs/stack/cms/record-layouts.md +151 -0
  106. package/dist/skill/docs/stack/cms/schema-format.md +437 -0
  107. package/dist/skill/docs/stack/cms/schema-registry.md +200 -0
  108. package/dist/skill/docs/stack/cms/security.md +203 -0
  109. package/dist/skill/docs/stack/cms/table-views.md +142 -0
  110. package/dist/skill/docs/stack/index.md +65 -0
  111. package/dist/skill/docs/stack/queues/handlers.md +317 -0
  112. package/dist/skill/docs/stack/queues/index.md +56 -0
  113. package/dist/skill/docs/stack/queues/using-queues.md +192 -0
  114. package/dist/skill/docs/stack/realtime/durable-objects.md +488 -0
  115. package/dist/skill/docs/stack/realtime/index.md +67 -0
  116. package/dist/skill/docs/stack/realtime/using-realtime.md +211 -0
  117. package/dist/skill/docs/stack/storage/index.md +17 -0
  118. package/dist/skill/docs/stack/storage/kv.md +204 -0
  119. package/dist/skill/docs/stack/storage/r2.md +232 -0
  120. package/dist/skill/docs/stack/storage/using-kv.md +70 -0
  121. package/dist/skill/docs/stack/storage/using-r2.md +55 -0
  122. package/dist/skill/docs/stack/vector/embeddings.md +554 -0
  123. package/dist/skill/docs/stack/vector/index.md +44 -0
  124. package/dist/skill/docs/stack/vector/using-embeddings.md +186 -0
  125. package/dist/skill/docs/stack/webhooks/inbound.md +186 -0
  126. package/dist/skill/docs/stack/webhooks/index.md +36 -0
  127. package/dist/skill/docs/stack/webhooks/outbound.md +281 -0
  128. package/package.json +1 -1
  129. package/src/skill/SKILL.md +142 -1051
  130. package/src/skill/agents/quickback-specialist/AGENT.md +36 -0
  131. package/src/skill/docs/changelog.md +1192 -0
  132. package/src/skill/docs/compiler/claude-code-skill.md +312 -0
  133. package/src/skill/docs/compiler/cloud-compiler/authentication.md +63 -0
  134. package/src/skill/docs/compiler/cloud-compiler/cli.md +307 -0
  135. package/src/skill/docs/compiler/cloud-compiler/endpoints.md +78 -0
  136. package/src/skill/docs/compiler/cloud-compiler/index.md +65 -0
  137. package/src/skill/docs/compiler/cloud-compiler/local-compiler.md +115 -0
  138. package/src/skill/docs/compiler/cloud-compiler/troubleshooting.md +76 -0
  139. package/src/skill/docs/compiler/config/agents.md +144 -0
  140. package/src/skill/docs/compiler/config/auth.md +109 -0
  141. package/src/skill/docs/compiler/config/bindings.md +176 -0
  142. package/src/skill/docs/compiler/config/domains.md +149 -0
  143. package/src/skill/docs/compiler/config/index.md +419 -0
  144. package/src/skill/docs/compiler/config/output.md +338 -0
  145. package/src/skill/docs/compiler/config/providers.md +248 -0
  146. package/src/skill/docs/compiler/config/security.md +255 -0
  147. package/src/skill/docs/compiler/config/single-tenant.md +128 -0
  148. package/src/skill/docs/compiler/config/variables.md +157 -0
  149. package/src/skill/docs/compiler/definitions/access.md +445 -0
  150. package/src/skill/docs/compiler/definitions/actions.md +884 -0
  151. package/src/skill/docs/compiler/definitions/concepts.md +52 -0
  152. package/src/skill/docs/compiler/definitions/feature.md +164 -0
  153. package/src/skill/docs/compiler/definitions/firewall.md +285 -0
  154. package/src/skill/docs/compiler/definitions/guards.md +241 -0
  155. package/src/skill/docs/compiler/definitions/index.md +219 -0
  156. package/src/skill/docs/compiler/definitions/masking.md +241 -0
  157. package/src/skill/docs/compiler/definitions/read.md +220 -0
  158. package/src/skill/docs/compiler/definitions/schema.md +697 -0
  159. package/src/skill/docs/compiler/definitions/validation.md +35 -0
  160. package/src/skill/docs/compiler/definitions/views.md +292 -0
  161. package/src/skill/docs/compiler/getting-started/claude-code.md +126 -0
  162. package/src/skill/docs/compiler/getting-started/full-example.md +431 -0
  163. package/src/skill/docs/compiler/getting-started/hand-crafted.md +178 -0
  164. package/src/skill/docs/compiler/getting-started/index.md +192 -0
  165. package/src/skill/docs/compiler/getting-started/patterns.md +225 -0
  166. package/src/skill/docs/compiler/getting-started/template-blog.md +280 -0
  167. package/src/skill/docs/compiler/getting-started/template-cloudflare.md +260 -0
  168. package/src/skill/docs/compiler/getting-started/template-empty.md +112 -0
  169. package/src/skill/docs/compiler/getting-started/templates.md +111 -0
  170. package/src/skill/docs/compiler/index.md +85 -0
  171. package/src/skill/docs/compiler/targets/hono-api/cloudflare.md +94 -0
  172. package/src/skill/docs/compiler/targets/hono-api/database/d1.md +246 -0
  173. package/src/skill/docs/compiler/targets/hono-api/database/index.md +16 -0
  174. package/src/skill/docs/compiler/targets/hono-api/database/neon.md +144 -0
  175. package/src/skill/docs/compiler/targets/hono-api/database/using-d1.md +39 -0
  176. package/src/skill/docs/compiler/targets/hono-api/index.md +37 -0
  177. package/src/skill/docs/compiler/targets/hono-api/using-the-api/actions-api.md +323 -0
  178. package/src/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +357 -0
  179. package/src/skill/docs/compiler/targets/hono-api/using-the-api/caching.md +105 -0
  180. package/src/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +652 -0
  181. package/src/skill/docs/compiler/targets/hono-api/using-the-api/errors.md +224 -0
  182. package/src/skill/docs/compiler/targets/hono-api/using-the-api/index.md +37 -0
  183. package/src/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +203 -0
  184. package/src/skill/docs/compiler/targets/hono-api/using-the-api/query-params.md +199 -0
  185. package/src/skill/docs/compiler/targets/hono-api/using-the-api/views-api.md +161 -0
  186. package/src/skill/docs/compiler/targets/index.md +47 -0
  187. package/src/skill/docs/compiler/targets/supabase-rls/index.md +55 -0
  188. package/src/skill/docs/compiler/targets/supabase-rls/limitations.md +48 -0
  189. package/src/skill/docs/compiler/targets/supabase-rls/mappings.md +99 -0
  190. package/src/skill/docs/compiler/targets/supabase-rls/setup.md +88 -0
  191. package/src/skill/docs/compiler/troubleshooting.md +120 -0
  192. package/src/skill/docs/index.md +77 -0
  193. package/src/skill/docs/stack/account-ui/customization.md +378 -0
  194. package/src/skill/docs/stack/account-ui/environment-variables.md +325 -0
  195. package/src/skill/docs/stack/account-ui/features/admin.md +76 -0
  196. package/src/skill/docs/stack/account-ui/features/api-keys.md +22 -0
  197. package/src/skill/docs/stack/account-ui/features/avatars.md +37 -0
  198. package/src/skill/docs/stack/account-ui/features/cli-authorize.md +21 -0
  199. package/src/skill/docs/stack/account-ui/features/index.md +291 -0
  200. package/src/skill/docs/stack/account-ui/features/organizations.md +29 -0
  201. package/src/skill/docs/stack/account-ui/features/passkeys.md +31 -0
  202. package/src/skill/docs/stack/account-ui/features/passwordless.md +28 -0
  203. package/src/skill/docs/stack/account-ui/features/sessions.md +20 -0
  204. package/src/skill/docs/stack/account-ui/hooks.md +209 -0
  205. package/src/skill/docs/stack/account-ui/index.md +147 -0
  206. package/src/skill/docs/stack/account-ui/library-usage.md +257 -0
  207. package/src/skill/docs/stack/account-ui/standalone.md +149 -0
  208. package/src/skill/docs/stack/account-ui/with-quickback.md +160 -0
  209. package/src/skill/docs/stack/account-ui/worker.md +362 -0
  210. package/src/skill/docs/stack/auth/api-keys.md +15 -0
  211. package/src/skill/docs/stack/auth/device-auth.md +14 -0
  212. package/src/skill/docs/stack/auth/index.md +64 -0
  213. package/src/skill/docs/stack/auth/jwt-optimization.md +245 -0
  214. package/src/skill/docs/stack/auth/plugins/aws-ses.md +127 -0
  215. package/src/skill/docs/stack/auth/plugins/combo-auth.md +74 -0
  216. package/src/skill/docs/stack/auth/plugins/index.md +228 -0
  217. package/src/skill/docs/stack/auth/plugins/upgrade-anonymous.md +155 -0
  218. package/src/skill/docs/stack/auth/security.md +455 -0
  219. package/src/skill/docs/stack/auth/using-auth.md +39 -0
  220. package/src/skill/docs/stack/cms/actions.md +199 -0
  221. package/src/skill/docs/stack/cms/components.md +479 -0
  222. package/src/skill/docs/stack/cms/connecting.md +199 -0
  223. package/src/skill/docs/stack/cms/dashboard.md +39 -0
  224. package/src/skill/docs/stack/cms/index.md +158 -0
  225. package/src/skill/docs/stack/cms/inline-editing.md +136 -0
  226. package/src/skill/docs/stack/cms/pages.md +275 -0
  227. package/src/skill/docs/stack/cms/record-layouts.md +151 -0
  228. package/src/skill/docs/stack/cms/schema-format.md +437 -0
  229. package/src/skill/docs/stack/cms/schema-registry.md +200 -0
  230. package/src/skill/docs/stack/cms/security.md +203 -0
  231. package/src/skill/docs/stack/cms/table-views.md +142 -0
  232. package/src/skill/docs/stack/index.md +65 -0
  233. package/src/skill/docs/stack/queues/handlers.md +317 -0
  234. package/src/skill/docs/stack/queues/index.md +56 -0
  235. package/src/skill/docs/stack/queues/using-queues.md +192 -0
  236. package/src/skill/docs/stack/realtime/durable-objects.md +488 -0
  237. package/src/skill/docs/stack/realtime/index.md +67 -0
  238. package/src/skill/docs/stack/realtime/using-realtime.md +211 -0
  239. package/src/skill/docs/stack/storage/index.md +17 -0
  240. package/src/skill/docs/stack/storage/kv.md +204 -0
  241. package/src/skill/docs/stack/storage/r2.md +232 -0
  242. package/src/skill/docs/stack/storage/using-kv.md +70 -0
  243. package/src/skill/docs/stack/storage/using-r2.md +55 -0
  244. package/src/skill/docs/stack/vector/embeddings.md +554 -0
  245. package/src/skill/docs/stack/vector/index.md +44 -0
  246. package/src/skill/docs/stack/vector/using-embeddings.md +186 -0
  247. package/src/skill/docs/stack/webhooks/inbound.md +186 -0
  248. package/src/skill/docs/stack/webhooks/index.md +36 -0
  249. package/src/skill/docs/stack/webhooks/outbound.md +281 -0
@@ -0,0 +1,419 @@
1
+ # Configuration
2
+
3
+ The `quickback.config.ts` file configures your Quickback project. It defines which providers to use, which features to enable, and how the compiler generates code.
4
+
5
+ ```typescript
6
+ import { defineConfig, defineRuntime, defineDatabase, defineAuth } from "@quickback/compiler";
7
+
8
+ export default defineConfig({
9
+ name: "my-app",
10
+ template: "hono",
11
+ features: { organizations: true },
12
+ providers: {
13
+ runtime: defineRuntime("cloudflare"),
14
+ database: defineDatabase("cloudflare-d1"),
15
+ auth: defineAuth("better-auth"),
16
+ },
17
+ });
18
+ ```
19
+
20
+ ## Discoverable options block
21
+
22
+ After your first `quickback compile`, the file gets a managed block bracketed by sentinel comments:
23
+
24
+ ```typescript
25
+ export default defineConfig({
26
+ name: "my-app",
27
+ template: "hono",
28
+ providers: cloudflare({}),
29
+
30
+ // [quickback:options-start]
31
+ // ── Project ──
32
+ //
33
+ // Primary custom domain (auto-inferred from cms/account/api domains if unset).
34
+ // domain: "example.com",
35
+ //
36
+ // ── Embedded UIs (CMS / Account) ──
37
+ //
38
+ // Login/signup/profile/orgs SPA. Set `true` for default, or object to customize.
39
+ // account: {
40
+ // fileUploads: false, // show the avatar upload UI on the profile page
41
+ // auth: { passkey: false, emailOTP: false, ... },
42
+ // ...
43
+ // },
44
+ //
45
+ // ... every other option Quickback supports
46
+ // [quickback:options-end]
47
+ });
48
+ ```
49
+
50
+ This block is **regenerated on every compile** — the compiler is the source of truth, so newly added options surface automatically when you upgrade Quickback (no CLI bump needed).
51
+
52
+ **To enable an option**, copy the line you care about *above* the `[quickback:options-start]` sentinel and uncomment it:
53
+
54
+ ```typescript
55
+ export default defineConfig({
56
+ name: "my-app",
57
+ template: "hono",
58
+ providers: cloudflare({}),
59
+
60
+ account: {
61
+ fileUploads: true, // ← lifted out of the managed block
62
+ },
63
+
64
+ // [quickback:options-start]
65
+ // ... account is now omitted from this block on next compile
66
+ // [quickback:options-end]
67
+ });
68
+ ```
69
+
70
+ Quickback notices that `account` is set above the marker and drops it from the managed block on the next compile to avoid duplicate definitions. Anything outside the marker block is yours and never touched.
71
+
72
+ If you ever want to opt out of the auto-managed block, run:
73
+
74
+ ```bash
75
+ quickback compile --no-sync-config
76
+ ```
77
+
78
+ ## Required Fields
79
+
80
+ | Field | Type | Description |
81
+ |-------|------|-------------|
82
+ | `name` | `string` | Project name |
83
+ | `template` | `"hono"` | Application template (`"nextjs"` is experimental) |
84
+ | `providers` | `object` | Runtime, database, and auth provider configuration |
85
+
86
+ ## Optional Fields
87
+
88
+ | Field | Type | Description |
89
+ |-------|------|-------------|
90
+ | `features` | `object` | Feature flags — see [Single-Tenant Mode](/compiler/config/single-tenant) |
91
+ | `build` | `object` | Build options (`outputDir`, `packageManager`, `dependencies`) |
92
+ | `compiler` | `object` | Compiler options — `features.auditFields: false` disables audit field injection project-wide; `migrations.renames` provides rename hints for headless CI; `securityContracts` tunes the route/SQL invariants checker |
93
+ | `openapi` | `object` | OpenAPI spec generation (`generate`, `publish`, `docs: 'scalar' \| 'swagger'` for an in-browser API reference) — see [OpenAPI](/compiler/targets/hono-api/using-the-api/openapi) |
94
+ | `schemaRegistry` | `object` | Schema registry generation for the CMS (enabled by default, `{ generate: false }` to disable) — see [Schema Registry](/stack/cms/schema-registry) |
95
+ | `etag` | `object` | ETag caching for GET responses (enabled by default, `{ enabled: false }` to disable) — see [Caching & ETags](/compiler/targets/hono-api/using-the-api/caching) |
96
+ | `cms` | `boolean \| object` | Embed CMS in compiled Worker — see [CMS](/stack/cms) |
97
+ | `account` | `boolean \| object` | Embed Account UI in compiled Worker — see [Account UI](/stack/account-ui) |
98
+ | `trustedOrigins` | `string[]` | CORS trusted origins for cross-domain auth |
99
+ | `domain` | `string` | Primary API domain (auto-inferred from custom domains if not set) |
100
+ | `dev` | `object` | Local development settings (`port`) |
101
+ | `auth` | `object` | App-level auth settings (`roleHierarchy`) — see [Access](/compiler/definitions/access#role-hierarchy) |
102
+ | `email` | `object` | Email delivery config (`provider`, `from`, `fromName`) |
103
+
104
+ ## Custom Dependencies
105
+
106
+ Add third-party npm packages to the generated `package.json` using `build.dependencies`. This is useful when your action handlers import external libraries.
107
+
108
+ ```typescript
109
+ export default defineConfig({
110
+ name: "my-app",
111
+ template: "hono",
112
+ build: {
113
+ dependencies: {
114
+ "fast-xml-parser": "^4.5.0",
115
+ "lodash-es": "^4.17.21",
116
+ },
117
+ },
118
+ providers: {
119
+ runtime: defineRuntime("cloudflare"),
120
+ database: defineDatabase("cloudflare-d1"),
121
+ auth: defineAuth("better-auth"),
122
+ },
123
+ });
124
+ ```
125
+
126
+ These are merged into the generated `package.json` alongside Quickback's own dependencies. Run `npm install` after compiling to install them.
127
+
128
+ ## Headless Migration Rename Hints
129
+
130
+ When `drizzle-kit generate` detects a potential rename, it normally prompts for confirmation. Cloud/CI compiles are non-interactive, so you must provide explicit rename hints.
131
+
132
+ Add hints in `compiler.migrations.renames`:
133
+
134
+ ```typescript
135
+ export default defineConfig({
136
+ // ...
137
+ compiler: {
138
+ migrations: {
139
+ renames: {
140
+ // Keys are NEW names, values are OLD names
141
+ tables: {
142
+ events_v2: "events",
143
+ },
144
+ columns: {
145
+ events: {
146
+ summary_text: "summary",
147
+ },
148
+ },
149
+ },
150
+ },
151
+ },
152
+ });
153
+ ```
154
+
155
+ Rules:
156
+ - `tables`: `new_table_name -> old_table_name`
157
+ - `columns.<table>`: `new_column_name -> old_column_name`
158
+ - Keys must match the names in your current schema (the new names)
159
+ - Validation fails fast for malformed rename config, unsupported keys, or conflicting legacy/new rename paths.
160
+
161
+ ## Disable Audit Field Injection
162
+
163
+ By default, Quickback auto-injects four **audit fields** (`createdAt`, `createdBy`, `modifiedAt`, `modifiedBy`) into every feature table, plus two **soft-delete fields** (`deletedAt`, `deletedBy`) into tables that use soft delete (the default delete mode). The audit fields drive record-provenance queries and the CMS audit panel; the soft-delete pair drives soft-delete filtering.
164
+
165
+ To opt out project-wide:
166
+
167
+ ```typescript
168
+ export default defineConfig({
169
+ name: "my-app",
170
+ compiler: {
171
+ features: {
172
+ auditFields: false, // skip audit-field injection globally
173
+ },
174
+ },
175
+ providers: { /* ... */ },
176
+ });
177
+ ```
178
+
179
+ When disabled, you're responsible for supplying these columns yourself if you want soft delete, audit trails, or modifiedAt-based optimistic concurrency. See the [Schema → Audit Fields](/compiler/definitions/schema#audit-fields) section for the full list and what each field drives.
180
+
181
+ ## Security Contract Reports and Signing
182
+
183
+ After generation, Quickback verifies machine-checkable security contracts for Hono routes and RLS SQL.
184
+
185
+ It also emits a report artifact and signature artifact by default:
186
+
187
+ - `reports/security-contracts.report.json`
188
+ - `reports/security-contracts.report.sig.json`
189
+
190
+ You can configure output paths and signing behavior:
191
+
192
+ ```typescript
193
+ export default defineConfig({
194
+ // ...
195
+ compiler: {
196
+ securityContracts: {
197
+ failMode: "error", // or "warn"
198
+ report: {
199
+ path: "reports/security-contracts.report.json",
200
+ signature: {
201
+ enabled: true,
202
+ required: true,
203
+ keyEnv: "QUICKBACK_SECURITY_REPORT_SIGNING_KEY",
204
+ keyId: "prod-k1",
205
+ path: "reports/security-contracts.report.sig.json",
206
+ },
207
+ },
208
+ },
209
+ },
210
+ });
211
+ ```
212
+
213
+ If `signature.required: true` and no key is available, compilation fails with a clear error message (or warning in `failMode: "warn"`).
214
+
215
+ ## CMS Configuration
216
+
217
+ Embed the [Quickback CMS](/stack/cms) in your compiled Worker. The CMS reads your schema registry and renders a complete admin interface — zero UI code per table.
218
+
219
+ ```typescript
220
+ // Simple — embed CMS at root
221
+ cms: true,
222
+
223
+ // With custom domain
224
+ cms: { domain: "cms.example.com" },
225
+
226
+ // With access control (only admins can access CMS)
227
+ cms: { domain: "cms.example.com", access: "admin" },
228
+ ```
229
+
230
+ | Option | Type | Default | Description |
231
+ |--------|------|---------|-------------|
232
+ | `domain` | `string` | — | Custom domain for CMS. Adds a `custom_domain` route to `wrangler.toml`. |
233
+ | `access` | `"user" \| "admin"` | `"user"` | Controls who can access the CMS. When `"admin"`, only users with `user.role === "admin"` can enter — enforced at the Worker level (SPA shell, `/api/v1/schema`, and `custom_view` CRUD all return 403 to non-admins) and in the SPA. Also hides the CMS link in Account UI. See [CMS Connecting](/stack/cms/connecting) for the full enforcement model. |
234
+
235
+ ## Account UI Configuration
236
+
237
+ Embed the [Account UI](/stack/account-ui) in your compiled Worker. Provides login, signup, profile management, organization management, and admin — all built from your config at compile time.
238
+
239
+ For post-signup logic — auto-provisioning a workspace, gating signup, setting an active organization — drop a file in `quickback/hooks/`. See [Auth Hooks](/stack/account-ui/hooks).
240
+
241
+ ```typescript
242
+ // Simple — embed Account UI with defaults
243
+ account: true,
244
+
245
+ // Full configuration
246
+ account: {
247
+ domain: "auth.example.com",
248
+ adminDomain: "admin.example.com",
249
+ name: "My App",
250
+ companyName: "My Company",
251
+ auth: {
252
+ password: true,
253
+ emailOTP: false,
254
+ passkey: true,
255
+ organizations: true,
256
+ admin: true,
257
+ },
258
+ },
259
+ ```
260
+
261
+ | Option | Type | Description |
262
+ |--------|------|-------------|
263
+ | `domain` | `string` | Custom domain for Account UI (e.g., `auth.example.com`) |
264
+ | `adminDomain` | `string` | Custom domain for admin-only access (e.g., `admin.example.com`). Serves the same Account SPA — the client-side router handles admin routing. |
265
+ | `appUrl` | `string` | URL of the tenant's main application — where users are redirected after login. Baked into the Account SPA as `VITE_QUICKBACK_APP_URL`. Independent from `domain`. |
266
+ | `name` | `string` | App display name shown on login, profile, and email templates |
267
+ | `companyName` | `string` | Company name for branding |
268
+ | `tagline` | `string` | App tagline shown on login page |
269
+ | `description` | `string` | App description |
270
+
271
+ ### Auth Feature Flags
272
+
273
+ Control which authentication features are included in the Account UI bundle. Disabled features are excluded at compile time — their routes are removed before the Vite build, keeping bundle sizes minimal.
274
+
275
+ | Flag | Type | Default | Description |
276
+ |------|------|---------|-------------|
277
+ | `auth.password` | `boolean` | `true` | Email/password authentication |
278
+ | `auth.emailOTP` | `boolean` | `false` | Email one-time password login |
279
+ | `auth.passkey` | `boolean` | `false` | WebAuthn/FIDO2 passkey authentication |
280
+ | `auth.signup` | `boolean` | `true` | Self-service account registration |
281
+ | `auth.organizations` | `boolean` | `false` | Multi-tenant organization management (dashboard, invitations, roles) |
282
+ | `auth.admin` | `boolean` | `false` | Admin panel for user management (requires Better Auth admin plugin) |
283
+ | `auth.emailVerification` | `boolean` | `false` | Require email verification after signup |
284
+
285
+ ## Trusted Origins
286
+
287
+ List of origins allowed to make cross-origin requests to your API. Required when your CMS, Account UI, or frontend app run on different domains.
288
+
289
+ ```typescript
290
+ trustedOrigins: [
291
+ "https://auth.example.com",
292
+ "https://admin.example.com",
293
+ "https://cms.example.com",
294
+ "https://app.example.com",
295
+ ],
296
+ ```
297
+
298
+ ## Local Development
299
+
300
+ Configure local development URLs. These are automatically added to the trusted origins list for CORS and Better Auth, so authentication works out of the box during local development.
301
+
302
+ ```typescript
303
+ dev: {
304
+ port: 8787, // wrangler dev port (default: 8787)
305
+ api: "http://localhost:8787", // API backend URL
306
+ cms: "http://localhost:8787/cms", // CMS URL (path on same worker)
307
+ account: "http://localhost:8787/account", // Account URL (path on same worker)
308
+ },
309
+ ```
310
+
311
+ If you run a SPA standalone on its own Vite dev server, set its URL here so CORS allows it:
312
+
313
+ ```typescript
314
+ dev: {
315
+ port: 8787,
316
+ api: "http://localhost:8787",
317
+ account: "http://localhost:5173", // standalone Account dev server
318
+ },
319
+ ```
320
+
321
+ | Field | Type | Default | Description |
322
+ |-------|------|---------|-------------|
323
+ | `port` | `number` | `8787` | Local dev server port (sets `[dev].port` in wrangler.toml) |
324
+ | `api` | `string` | `http://localhost:{port}` | API backend URL |
325
+ | `cms` | `string` | — | CMS dev URL (added to trusted origins if set) |
326
+ | `account` | `string` | — | Account dev URL (added to trusted origins if set) |
327
+
328
+ ## Email Configuration
329
+
330
+ Configure email delivery for authentication emails (verification, password reset, invitations).
331
+
332
+ > **Cloudflare Email Sending is now in public beta** and is Quickback's default transport for Cloudflare deploys. The Workers `send_email` binding is zero-config — no API keys, no third-party accounts. AWS SES remains supported as an explicit opt-in (`email.provider: 'aws-ses'`) for non-Cloudflare runtimes or existing SES setups.
333
+
334
+ ```typescript
335
+ // Cloudflare Email Service (default) — uses send_email binding, no API keys needed
336
+ email: {
337
+ from: "noreply@example.com",
338
+ fromName: "My App",
339
+ },
340
+
341
+ // AWS SES — requires AWS credentials set as Wrangler secrets
342
+ email: {
343
+ provider: "aws-ses",
344
+ region: "us-east-2",
345
+ from: "noreply@example.com",
346
+ fromName: "My App",
347
+ },
348
+ ```
349
+
350
+ | Field | Type | Default | Description |
351
+ |-------|------|---------|-------------|
352
+ | `provider` | `"cloudflare" \| "aws-ses"` | `"cloudflare"` | Email transport |
353
+ | `from` | `string` | `"noreply@example.com"` | Sender email address |
354
+ | `fromName` | `string` | `"{name} \| Account Services"` | Sender display name |
355
+ | `region` | `string` | `"us-east-2"` | AWS SES region (aws-ses only) |
356
+
357
+ ### Auto-wiring
358
+
359
+ For the Cloudflare provider (the default), the compiler automatically:
360
+ - Emits `[[send_email]] EMAIL` into `wrangler.toml`
361
+ - Generates `src/lib/cloudflare-email.ts`
362
+ - Wires `sendResetPassword`, `sendVerificationEmail`, `sendInvitationEmail`, etc. into Better Auth
363
+
364
+ …whenever any auth surface needs to send mail — `emailAndPassword.enabled`, the `emailOtp` / `magicLink` / `organization` plugins — or you set the top-level `email: {…}` config. You don't need to add `bindings.sendEmail` by hand for the standard cases.
365
+
366
+ > **Cloudflare Email Routing setup is required.** The binding alone does not deliver mail. Enable Email Routing on the sending zone and add at least one verified destination address ([Cloudflare docs](https://developers.cloudflare.com/email-routing/get-started/)). Otherwise sends fail at runtime even with the binding present and the `/auth/v1/ses/status` check passing locally.
367
+
368
+ ## Multi-Domain Example
369
+
370
+ A complete config with CMS, Account UI, and Admin on separate subdomains:
371
+
372
+ ```typescript
373
+ export default {
374
+ name: "my-app",
375
+ template: "hono",
376
+ cms: { domain: "cms.example.com", access: "admin" },
377
+ account: {
378
+ domain: "auth.example.com",
379
+ adminDomain: "admin.example.com",
380
+ name: "My App",
381
+ companyName: "Example Inc.",
382
+ auth: {
383
+ password: true,
384
+ emailOTP: false,
385
+ passkey: true,
386
+ organizations: false,
387
+ admin: true,
388
+ },
389
+ },
390
+ email: {
391
+ from: "noreply@example.com",
392
+ fromName: "My App",
393
+ },
394
+ trustedOrigins: [
395
+ "https://auth.example.com",
396
+ "https://admin.example.com",
397
+ "https://cms.example.com",
398
+ "https://example.com",
399
+ ],
400
+ providers: {
401
+ runtime: { name: "cloudflare", config: {
402
+ routes: [{ pattern: "api.example.com", custom_domain: true }],
403
+ }},
404
+ database: { name: "cloudflare-d1", config: { binding: "DB" } },
405
+ auth: { name: "better-auth", config: { plugins: ["admin"] } },
406
+ },
407
+ };
408
+ ```
409
+
410
+ This produces a single Cloudflare Worker serving five domains. See [Multi-Domain Architecture](/compiler/config/domains) for details on hostname routing, cross-subdomain cookies, and the unified fallback domain.
411
+
412
+ ---
413
+
414
+ See the sub-pages for detailed reference on each section:
415
+ - [Providers](/compiler/config/providers) — Runtime, database, and auth options
416
+ - [Variables](/compiler/config/variables) — Environment variables and flags
417
+ - [Output](/compiler/config/output) — Generated file structure
418
+ - [Single-Tenant Mode](/compiler/config/single-tenant) — Admin-only and public-facing apps without organizations
419
+ - [Multi-Domain Architecture](/compiler/config/domains) — Custom domains, hostname routing, and cross-subdomain auth