@quickback-dev/cli 0.10.16 → 0.11.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/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +40 -2
- package/dist/commands/compile.js.map +1 -1
- package/dist/docs/content.d.ts.map +1 -1
- package/dist/docs/content.js +15 -10
- package/dist/docs/content.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/skill/SKILL.md +142 -1051
- package/dist/skill/agents/quickback-specialist/AGENT.md +36 -0
- package/dist/skill/docs/changelog.md +1225 -0
- package/dist/skill/docs/compiler/claude-code-skill.md +312 -0
- package/dist/skill/docs/compiler/cloud-compiler/authentication.md +63 -0
- package/dist/skill/docs/compiler/cloud-compiler/cli.md +307 -0
- package/dist/skill/docs/compiler/cloud-compiler/endpoints.md +78 -0
- package/dist/skill/docs/compiler/cloud-compiler/index.md +65 -0
- package/dist/skill/docs/compiler/cloud-compiler/local-compiler.md +115 -0
- package/dist/skill/docs/compiler/cloud-compiler/troubleshooting.md +76 -0
- package/dist/skill/docs/compiler/config/agents.md +144 -0
- package/dist/skill/docs/compiler/config/auth.md +109 -0
- package/dist/skill/docs/compiler/config/bindings.md +176 -0
- package/dist/skill/docs/compiler/config/domains.md +149 -0
- package/dist/skill/docs/compiler/config/index.md +419 -0
- package/dist/skill/docs/compiler/config/output.md +338 -0
- package/dist/skill/docs/compiler/config/providers.md +248 -0
- package/dist/skill/docs/compiler/config/security.md +255 -0
- package/dist/skill/docs/compiler/config/single-tenant.md +128 -0
- package/dist/skill/docs/compiler/config/variables.md +157 -0
- package/dist/skill/docs/compiler/definitions/access.md +445 -0
- package/dist/skill/docs/compiler/definitions/actions.md +884 -0
- package/dist/skill/docs/compiler/definitions/concepts.md +52 -0
- package/dist/skill/docs/compiler/definitions/feature.md +164 -0
- package/dist/skill/docs/compiler/definitions/firewall.md +285 -0
- package/dist/skill/docs/compiler/definitions/guards.md +241 -0
- package/dist/skill/docs/compiler/definitions/index.md +219 -0
- package/dist/skill/docs/compiler/definitions/masking.md +241 -0
- package/dist/skill/docs/compiler/definitions/read.md +220 -0
- package/dist/skill/docs/compiler/definitions/schema.md +697 -0
- package/dist/skill/docs/compiler/definitions/validation.md +35 -0
- package/dist/skill/docs/compiler/definitions/views.md +292 -0
- package/dist/skill/docs/compiler/getting-started/claude-code.md +126 -0
- package/dist/skill/docs/compiler/getting-started/full-example.md +431 -0
- package/dist/skill/docs/compiler/getting-started/hand-crafted.md +178 -0
- package/dist/skill/docs/compiler/getting-started/index.md +192 -0
- package/dist/skill/docs/compiler/getting-started/patterns.md +225 -0
- package/dist/skill/docs/compiler/getting-started/template-blog.md +280 -0
- package/dist/skill/docs/compiler/getting-started/template-cloudflare.md +260 -0
- package/dist/skill/docs/compiler/getting-started/template-empty.md +112 -0
- package/dist/skill/docs/compiler/getting-started/templates.md +111 -0
- package/dist/skill/docs/compiler/index.md +85 -0
- package/dist/skill/docs/compiler/targets/hono-api/cloudflare.md +94 -0
- package/dist/skill/docs/compiler/targets/hono-api/database/d1.md +246 -0
- package/dist/skill/docs/compiler/targets/hono-api/database/index.md +16 -0
- package/dist/skill/docs/compiler/targets/hono-api/database/neon.md +144 -0
- package/dist/skill/docs/compiler/targets/hono-api/database/using-d1.md +39 -0
- package/dist/skill/docs/compiler/targets/hono-api/index.md +37 -0
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/actions-api.md +323 -0
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +357 -0
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/caching.md +105 -0
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +652 -0
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/errors.md +224 -0
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/index.md +37 -0
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +203 -0
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/query-params.md +199 -0
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/views-api.md +161 -0
- package/dist/skill/docs/compiler/targets/index.md +47 -0
- package/dist/skill/docs/compiler/targets/supabase-rls/index.md +55 -0
- package/dist/skill/docs/compiler/targets/supabase-rls/limitations.md +48 -0
- package/dist/skill/docs/compiler/targets/supabase-rls/mappings.md +99 -0
- package/dist/skill/docs/compiler/targets/supabase-rls/setup.md +88 -0
- package/dist/skill/docs/compiler/troubleshooting.md +120 -0
- package/dist/skill/docs/index.md +77 -0
- package/dist/skill/docs/stack/account-ui/customization.md +378 -0
- package/dist/skill/docs/stack/account-ui/environment-variables.md +325 -0
- package/dist/skill/docs/stack/account-ui/features/admin.md +76 -0
- package/dist/skill/docs/stack/account-ui/features/api-keys.md +22 -0
- package/dist/skill/docs/stack/account-ui/features/avatars.md +37 -0
- package/dist/skill/docs/stack/account-ui/features/cli-authorize.md +21 -0
- package/dist/skill/docs/stack/account-ui/features/index.md +291 -0
- package/dist/skill/docs/stack/account-ui/features/organizations.md +29 -0
- package/dist/skill/docs/stack/account-ui/features/passkeys.md +31 -0
- package/dist/skill/docs/stack/account-ui/features/passwordless.md +28 -0
- package/dist/skill/docs/stack/account-ui/features/sessions.md +20 -0
- package/dist/skill/docs/stack/account-ui/hooks.md +209 -0
- package/dist/skill/docs/stack/account-ui/index.md +147 -0
- package/dist/skill/docs/stack/account-ui/library-usage.md +257 -0
- package/dist/skill/docs/stack/account-ui/standalone.md +149 -0
- package/dist/skill/docs/stack/account-ui/with-quickback.md +160 -0
- package/dist/skill/docs/stack/account-ui/worker.md +362 -0
- package/dist/skill/docs/stack/auth/api-keys.md +15 -0
- package/dist/skill/docs/stack/auth/device-auth.md +14 -0
- package/dist/skill/docs/stack/auth/index.md +64 -0
- package/dist/skill/docs/stack/auth/jwt-optimization.md +245 -0
- package/dist/skill/docs/stack/auth/plugins/aws-ses.md +127 -0
- package/dist/skill/docs/stack/auth/plugins/combo-auth.md +74 -0
- package/dist/skill/docs/stack/auth/plugins/index.md +340 -0
- package/dist/skill/docs/stack/auth/plugins/upgrade-anonymous.md +155 -0
- package/dist/skill/docs/stack/auth/security.md +455 -0
- package/dist/skill/docs/stack/auth/using-auth.md +39 -0
- package/dist/skill/docs/stack/cms/actions.md +199 -0
- package/dist/skill/docs/stack/cms/components.md +479 -0
- package/dist/skill/docs/stack/cms/connecting.md +199 -0
- package/dist/skill/docs/stack/cms/dashboard.md +39 -0
- package/dist/skill/docs/stack/cms/index.md +158 -0
- package/dist/skill/docs/stack/cms/inline-editing.md +136 -0
- package/dist/skill/docs/stack/cms/pages.md +275 -0
- package/dist/skill/docs/stack/cms/record-layouts.md +151 -0
- package/dist/skill/docs/stack/cms/schema-format.md +437 -0
- package/dist/skill/docs/stack/cms/schema-registry.md +200 -0
- package/dist/skill/docs/stack/cms/security.md +203 -0
- package/dist/skill/docs/stack/cms/table-views.md +142 -0
- package/dist/skill/docs/stack/index.md +65 -0
- package/dist/skill/docs/stack/queues/handlers.md +317 -0
- package/dist/skill/docs/stack/queues/index.md +56 -0
- package/dist/skill/docs/stack/queues/using-queues.md +192 -0
- package/dist/skill/docs/stack/realtime/durable-objects.md +488 -0
- package/dist/skill/docs/stack/realtime/index.md +73 -0
- package/dist/skill/docs/stack/realtime/partyserver-rooms.md +146 -0
- package/dist/skill/docs/stack/realtime/using-realtime.md +211 -0
- package/dist/skill/docs/stack/storage/index.md +17 -0
- package/dist/skill/docs/stack/storage/kv.md +204 -0
- package/dist/skill/docs/stack/storage/r2.md +232 -0
- package/dist/skill/docs/stack/storage/using-kv.md +70 -0
- package/dist/skill/docs/stack/storage/using-r2.md +55 -0
- package/dist/skill/docs/stack/vector/embeddings.md +554 -0
- package/dist/skill/docs/stack/vector/index.md +44 -0
- package/dist/skill/docs/stack/vector/using-embeddings.md +186 -0
- package/dist/skill/docs/stack/webhooks/inbound.md +186 -0
- package/dist/skill/docs/stack/webhooks/index.md +36 -0
- package/dist/skill/docs/stack/webhooks/outbound.md +281 -0
- package/package.json +1 -1
- package/src/skill/SKILL.md +142 -1051
- package/src/skill/agents/quickback-specialist/AGENT.md +36 -0
- package/src/skill/docs/changelog.md +1225 -0
- package/src/skill/docs/compiler/claude-code-skill.md +312 -0
- package/src/skill/docs/compiler/cloud-compiler/authentication.md +63 -0
- package/src/skill/docs/compiler/cloud-compiler/cli.md +307 -0
- package/src/skill/docs/compiler/cloud-compiler/endpoints.md +78 -0
- package/src/skill/docs/compiler/cloud-compiler/index.md +65 -0
- package/src/skill/docs/compiler/cloud-compiler/local-compiler.md +115 -0
- package/src/skill/docs/compiler/cloud-compiler/troubleshooting.md +76 -0
- package/src/skill/docs/compiler/config/agents.md +144 -0
- package/src/skill/docs/compiler/config/auth.md +109 -0
- package/src/skill/docs/compiler/config/bindings.md +176 -0
- package/src/skill/docs/compiler/config/domains.md +149 -0
- package/src/skill/docs/compiler/config/index.md +419 -0
- package/src/skill/docs/compiler/config/output.md +338 -0
- package/src/skill/docs/compiler/config/providers.md +248 -0
- package/src/skill/docs/compiler/config/security.md +255 -0
- package/src/skill/docs/compiler/config/single-tenant.md +128 -0
- package/src/skill/docs/compiler/config/variables.md +157 -0
- package/src/skill/docs/compiler/definitions/access.md +445 -0
- package/src/skill/docs/compiler/definitions/actions.md +884 -0
- package/src/skill/docs/compiler/definitions/concepts.md +52 -0
- package/src/skill/docs/compiler/definitions/feature.md +164 -0
- package/src/skill/docs/compiler/definitions/firewall.md +285 -0
- package/src/skill/docs/compiler/definitions/guards.md +241 -0
- package/src/skill/docs/compiler/definitions/index.md +219 -0
- package/src/skill/docs/compiler/definitions/masking.md +241 -0
- package/src/skill/docs/compiler/definitions/read.md +220 -0
- package/src/skill/docs/compiler/definitions/schema.md +697 -0
- package/src/skill/docs/compiler/definitions/validation.md +35 -0
- package/src/skill/docs/compiler/definitions/views.md +292 -0
- package/src/skill/docs/compiler/getting-started/claude-code.md +126 -0
- package/src/skill/docs/compiler/getting-started/full-example.md +431 -0
- package/src/skill/docs/compiler/getting-started/hand-crafted.md +178 -0
- package/src/skill/docs/compiler/getting-started/index.md +192 -0
- package/src/skill/docs/compiler/getting-started/patterns.md +225 -0
- package/src/skill/docs/compiler/getting-started/template-blog.md +280 -0
- package/src/skill/docs/compiler/getting-started/template-cloudflare.md +260 -0
- package/src/skill/docs/compiler/getting-started/template-empty.md +112 -0
- package/src/skill/docs/compiler/getting-started/templates.md +111 -0
- package/src/skill/docs/compiler/index.md +85 -0
- package/src/skill/docs/compiler/targets/hono-api/cloudflare.md +94 -0
- package/src/skill/docs/compiler/targets/hono-api/database/d1.md +246 -0
- package/src/skill/docs/compiler/targets/hono-api/database/index.md +16 -0
- package/src/skill/docs/compiler/targets/hono-api/database/neon.md +144 -0
- package/src/skill/docs/compiler/targets/hono-api/database/using-d1.md +39 -0
- package/src/skill/docs/compiler/targets/hono-api/index.md +37 -0
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/actions-api.md +323 -0
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +357 -0
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/caching.md +105 -0
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +652 -0
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/errors.md +224 -0
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/index.md +37 -0
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +203 -0
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/query-params.md +199 -0
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/views-api.md +161 -0
- package/src/skill/docs/compiler/targets/index.md +47 -0
- package/src/skill/docs/compiler/targets/supabase-rls/index.md +55 -0
- package/src/skill/docs/compiler/targets/supabase-rls/limitations.md +48 -0
- package/src/skill/docs/compiler/targets/supabase-rls/mappings.md +99 -0
- package/src/skill/docs/compiler/targets/supabase-rls/setup.md +88 -0
- package/src/skill/docs/compiler/troubleshooting.md +120 -0
- package/src/skill/docs/index.md +77 -0
- package/src/skill/docs/stack/account-ui/customization.md +378 -0
- package/src/skill/docs/stack/account-ui/environment-variables.md +325 -0
- package/src/skill/docs/stack/account-ui/features/admin.md +76 -0
- package/src/skill/docs/stack/account-ui/features/api-keys.md +22 -0
- package/src/skill/docs/stack/account-ui/features/avatars.md +37 -0
- package/src/skill/docs/stack/account-ui/features/cli-authorize.md +21 -0
- package/src/skill/docs/stack/account-ui/features/index.md +291 -0
- package/src/skill/docs/stack/account-ui/features/organizations.md +29 -0
- package/src/skill/docs/stack/account-ui/features/passkeys.md +31 -0
- package/src/skill/docs/stack/account-ui/features/passwordless.md +28 -0
- package/src/skill/docs/stack/account-ui/features/sessions.md +20 -0
- package/src/skill/docs/stack/account-ui/hooks.md +209 -0
- package/src/skill/docs/stack/account-ui/index.md +147 -0
- package/src/skill/docs/stack/account-ui/library-usage.md +257 -0
- package/src/skill/docs/stack/account-ui/standalone.md +149 -0
- package/src/skill/docs/stack/account-ui/with-quickback.md +160 -0
- package/src/skill/docs/stack/account-ui/worker.md +362 -0
- package/src/skill/docs/stack/auth/api-keys.md +15 -0
- package/src/skill/docs/stack/auth/device-auth.md +14 -0
- package/src/skill/docs/stack/auth/index.md +64 -0
- package/src/skill/docs/stack/auth/jwt-optimization.md +245 -0
- package/src/skill/docs/stack/auth/plugins/aws-ses.md +127 -0
- package/src/skill/docs/stack/auth/plugins/combo-auth.md +74 -0
- package/src/skill/docs/stack/auth/plugins/index.md +340 -0
- package/src/skill/docs/stack/auth/plugins/upgrade-anonymous.md +155 -0
- package/src/skill/docs/stack/auth/security.md +455 -0
- package/src/skill/docs/stack/auth/using-auth.md +39 -0
- package/src/skill/docs/stack/cms/actions.md +199 -0
- package/src/skill/docs/stack/cms/components.md +479 -0
- package/src/skill/docs/stack/cms/connecting.md +199 -0
- package/src/skill/docs/stack/cms/dashboard.md +39 -0
- package/src/skill/docs/stack/cms/index.md +158 -0
- package/src/skill/docs/stack/cms/inline-editing.md +136 -0
- package/src/skill/docs/stack/cms/pages.md +275 -0
- package/src/skill/docs/stack/cms/record-layouts.md +151 -0
- package/src/skill/docs/stack/cms/schema-format.md +437 -0
- package/src/skill/docs/stack/cms/schema-registry.md +200 -0
- package/src/skill/docs/stack/cms/security.md +203 -0
- package/src/skill/docs/stack/cms/table-views.md +142 -0
- package/src/skill/docs/stack/index.md +65 -0
- package/src/skill/docs/stack/queues/handlers.md +317 -0
- package/src/skill/docs/stack/queues/index.md +56 -0
- package/src/skill/docs/stack/queues/using-queues.md +192 -0
- package/src/skill/docs/stack/realtime/durable-objects.md +488 -0
- package/src/skill/docs/stack/realtime/index.md +73 -0
- package/src/skill/docs/stack/realtime/partyserver-rooms.md +146 -0
- package/src/skill/docs/stack/realtime/using-realtime.md +211 -0
- package/src/skill/docs/stack/storage/index.md +17 -0
- package/src/skill/docs/stack/storage/kv.md +204 -0
- package/src/skill/docs/stack/storage/r2.md +232 -0
- package/src/skill/docs/stack/storage/using-kv.md +70 -0
- package/src/skill/docs/stack/storage/using-r2.md +55 -0
- package/src/skill/docs/stack/vector/embeddings.md +554 -0
- package/src/skill/docs/stack/vector/index.md +44 -0
- package/src/skill/docs/stack/vector/using-embeddings.md +186 -0
- package/src/skill/docs/stack/webhooks/inbound.md +186 -0
- package/src/skill/docs/stack/webhooks/index.md +36 -0
- package/src/skill/docs/stack/webhooks/outbound.md +281 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Schema Registry
|
|
2
|
+
|
|
3
|
+
The schema registry is a static JSON file generated by the Quickback compiler. It contains full metadata about every table in your project — columns, types, guards, masking rules, views, actions, validation, and firewall config. The CMS reads this file to render its entire UI.
|
|
4
|
+
|
|
5
|
+
## Generation
|
|
6
|
+
|
|
7
|
+
Schema registry generation is **enabled by default**. Run `quickback compile` and the compiler outputs `schema-registry.json` alongside your compiled API files.
|
|
8
|
+
|
|
9
|
+
To disable generation:
|
|
10
|
+
|
|
11
|
+
```typescript title="quickback/quickback.config.ts"
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
schemaRegistry: { generate: false },
|
|
14
|
+
// ... rest of your config
|
|
15
|
+
});
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Output Shape
|
|
19
|
+
|
|
20
|
+
The top-level structure of `schema-registry.json`:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"generatedAt": "2026-02-14T06:26:53.554Z",
|
|
25
|
+
"generatedBy": "quickback-compiler",
|
|
26
|
+
"version": "1.0.0",
|
|
27
|
+
"singleTenant": false,
|
|
28
|
+
"features": { ... },
|
|
29
|
+
"tables": { ... },
|
|
30
|
+
"tablesByFeature": { ... },
|
|
31
|
+
"pages": { ... },
|
|
32
|
+
"pagesByFeature": { ... }
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
| Field | Type | Description |
|
|
37
|
+
|-------|------|-------------|
|
|
38
|
+
| `generatedAt` | `string` | ISO timestamp of generation |
|
|
39
|
+
| `generatedBy` | `string` | Always `"quickback-compiler"` |
|
|
40
|
+
| `version` | `string` | Compiler version used |
|
|
41
|
+
| `singleTenant` | `boolean?` | When `true`, no organization layer |
|
|
42
|
+
| `features` | `Record<string, string[]>` | Feature name to file list mapping |
|
|
43
|
+
| `tables` | `Record<string, TableMeta>` | Table name to full metadata |
|
|
44
|
+
| `tablesByFeature` | `Record<string, string[]>` | Feature name to table name list |
|
|
45
|
+
| `pages` | `Record<string, PageMeta>` | Page slug to full page metadata |
|
|
46
|
+
| `pagesByFeature` | `Record<string, string[]>` | Feature name to page slug list |
|
|
47
|
+
|
|
48
|
+
## TableMeta
|
|
49
|
+
|
|
50
|
+
Each table entry contains everything the CMS needs to render its UI:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
interface TableMeta {
|
|
54
|
+
name: string; // camelCase table name (e.g., "accountCode")
|
|
55
|
+
dbName: string; // SQL table name (e.g., "account_code")
|
|
56
|
+
feature: string; // Parent feature name
|
|
57
|
+
columns: ColumnMeta[]; // All columns including audit fields
|
|
58
|
+
firewall: Record<string, unknown>; // Tenant isolation config
|
|
59
|
+
crud: Record<string, CrudConfig>; // Per-operation access rules
|
|
60
|
+
guards: {
|
|
61
|
+
createable: string[]; // Fields allowed on create
|
|
62
|
+
updatable: string[]; // Fields allowed on update
|
|
63
|
+
immutable: string[]; // Fields locked after creation
|
|
64
|
+
protected: Record<string, string[]>; // Fields only updatable via actions
|
|
65
|
+
};
|
|
66
|
+
masking: Record<string, MaskingRule>; // Per-field masking rules
|
|
67
|
+
views: Record<string, ViewConfig>; // Named column projections
|
|
68
|
+
validation: Record<string, ValidationRule>; // Per-field validation
|
|
69
|
+
actions: ActionMeta[]; // Available actions for this table
|
|
70
|
+
displayColumn?: string; // Human-readable label column
|
|
71
|
+
internal?: boolean; // Hidden from CMS sidebar when true
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
> **Internal Tables**
|
|
76
|
+
>
|
|
77
|
+
> Tables without a `defineTable()` resource config are marked `internal: true` and hidden from the CMS sidebar. These are typically join tables or system tables.
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## ColumnMeta
|
|
81
|
+
|
|
82
|
+
Each column in the `columns` array:
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
interface ColumnMeta {
|
|
86
|
+
name: string; // Property name (camelCase)
|
|
87
|
+
dbName: string; // SQL column name (snake_case)
|
|
88
|
+
type: "text" | "integer" | "real" | "blob"; // SQLite type
|
|
89
|
+
mode?: "boolean"; // When an integer represents a boolean
|
|
90
|
+
primaryKey: boolean;
|
|
91
|
+
notNull: boolean;
|
|
92
|
+
defaultValue?: string | number | boolean;
|
|
93
|
+
fkTarget?: string; // Target table name for FK columns
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The compiler automatically includes the system columns (`id`, `organizationId`), the audit fields (`createdAt`, `createdBy`, `modifiedAt`, `modifiedBy`), and the soft-delete pair (`deletedAt`, `deletedBy` — when soft delete is enabled) at the beginning of every table's column list.
|
|
98
|
+
|
|
99
|
+
### fkTarget — FK Resolution
|
|
100
|
+
|
|
101
|
+
Columns ending in `Id` may have a `fkTarget` property indicating which table they reference. This is resolved in priority order:
|
|
102
|
+
|
|
103
|
+
1. **Explicit `references`** — from your `defineTable()` config (highest priority)
|
|
104
|
+
2. **Drizzle `.references()`** — parsed from schema source code
|
|
105
|
+
3. **Convention** — strip `Id` suffix, match table name directly
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"name": "vendorId",
|
|
110
|
+
"type": "text",
|
|
111
|
+
"fkTarget": "contact"
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The CMS uses `fkTarget` to render typeahead/lookup inputs that search the correct table instead of showing raw IDs.
|
|
116
|
+
|
|
117
|
+
## Input Hints
|
|
118
|
+
|
|
119
|
+
Tables with `inputHints` configured in `defineTable()` include an `inputHints` map in their metadata:
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"name": "invoice",
|
|
124
|
+
"inputHints": {
|
|
125
|
+
"status": "select",
|
|
126
|
+
"sortOrder": "radio",
|
|
127
|
+
"isPartialPaymentDisabled": "checkbox",
|
|
128
|
+
"headerMessage": "textarea",
|
|
129
|
+
"description": "richtext"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The CMS reads these hints to render the appropriate form control for each field. The `"richtext"` hint renders a tiptap editor in edit mode and formatted HTML in view mode. See [Input Hints](/compiler/definitions/schema#input-hints) for the full list of supported values.
|
|
135
|
+
|
|
136
|
+
## Display Column
|
|
137
|
+
|
|
138
|
+
The `displayColumn` field tells the CMS which column to use as a human-readable label for a record. This is used in:
|
|
139
|
+
|
|
140
|
+
- FK typeahead dropdowns (showing names instead of IDs)
|
|
141
|
+
- Record titles in detail views
|
|
142
|
+
- Breadcrumb labels
|
|
143
|
+
|
|
144
|
+
### Auto-Detection
|
|
145
|
+
|
|
146
|
+
If you don't explicitly set `displayColumn` in your resource config, the compiler auto-detects it by scanning column names in priority order:
|
|
147
|
+
|
|
148
|
+
1. `name`
|
|
149
|
+
2. `title`
|
|
150
|
+
3. `label`
|
|
151
|
+
4. `headline`
|
|
152
|
+
5. `subject`
|
|
153
|
+
6. `code`
|
|
154
|
+
7. `displayName`
|
|
155
|
+
8. `fullName`
|
|
156
|
+
9. `description`
|
|
157
|
+
|
|
158
|
+
The first match wins. If no candidate matches, the table has no display column and the CMS falls back to showing IDs.
|
|
159
|
+
|
|
160
|
+
### Explicit Config
|
|
161
|
+
|
|
162
|
+
Set it explicitly in your table definition:
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
export default defineTable(contacts, {
|
|
166
|
+
displayColumn: "companyName",
|
|
167
|
+
// ...
|
|
168
|
+
});
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## FK Label Resolution
|
|
172
|
+
|
|
173
|
+
When a table has foreign key columns (ending in `Id`), the API enriches list responses with `_label` fields. For example, a `roomTypeId` column gets a corresponding `roomType_label` field containing the display column value from the referenced table.
|
|
174
|
+
|
|
175
|
+
The CMS uses these `_label` fields to show human-readable names in table cells and FK typeahead dropdowns instead of raw UUIDs.
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
roomTypeId: "rt_abc123" → displayed as "Master Bedroom"
|
|
179
|
+
accountCodeId: "ac_xyz789" → displayed as "4100 - Revenue"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
The FK target table is resolved from the `fkTarget` property on each column. For simple cases like `roomTypeId` → `roomType`, the compiler auto-detects it. For non-obvious mappings (e.g., `vendorId` → `contact`), use explicit [`references`](/compiler/definitions/schema#references) in your `defineTable()` config.
|
|
183
|
+
|
|
184
|
+
## Pages
|
|
185
|
+
|
|
186
|
+
When features include `definePage()` files (in `features/{name}/pages/`), the compiler includes them in the registry under two fields:
|
|
187
|
+
|
|
188
|
+
- **`pages`** — Map of page slug to full `PageMeta` object (data sources, layout, matching rules, page actions)
|
|
189
|
+
- **`pagesByFeature`** — Map of feature name to array of page slugs belonging to that feature
|
|
190
|
+
|
|
191
|
+
The CMS reads these fields to render custom pages in the sidebar and route to the page renderer. See [Custom Pages](/stack/cms/pages) for the full `definePage()` API.
|
|
192
|
+
|
|
193
|
+
## Single-Tenant Mode
|
|
194
|
+
|
|
195
|
+
When `singleTenant` is `true` in the registry (set when the project config has `features.organizations: false`), the CMS skips the organization gate and reads the user's role directly from `user.role` on the session instead of from organization membership.
|
|
196
|
+
|
|
197
|
+
## Next Steps
|
|
198
|
+
|
|
199
|
+
- **[Connecting](/stack/cms/connecting)** — Demo mode vs. live mode setup
|
|
200
|
+
- **[Schema Format Reference](/stack/cms/schema-format)** — Full TypeScript types
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
The CMS respects all four Quickback security layers. Every UI element — buttons, form fields, table columns, action menus — adapts based on the current user's role and the security rules defined in your feature files.
|
|
4
|
+
|
|
5
|
+
## CMS Access (admin-only by default)
|
|
6
|
+
|
|
7
|
+
The CMS is restricted to Better Auth platform admins (`user.role === "admin"`) by default — non-admin authenticated users are redirected to `/account/profile`. To allow any authenticated user, opt out explicitly:
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
cms: { access: "user" }
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Under the default `access: "admin"`, the compiler emits server-side gates on every CMS-facing surface so a non-admin can't reach the CMS even by bypassing the SPA:
|
|
14
|
+
|
|
15
|
+
1. **Account UI** — the "Go to CMS" button is hidden.
|
|
16
|
+
2. **CMS SPA shell** — the Worker checks `ctx.userRole === "admin"` before serving `index.html`. Unauthenticated requests are redirected to login; authenticated non-admins get `403 Admin access required`.
|
|
17
|
+
3. **`/api/v1/schema`** — the CMS metadata endpoint returns `403` to non-admins.
|
|
18
|
+
4. **`custom_view` CRUD** — the CMS-internal saved-views table uses `userRole: ["admin"]` (see [`userRole`](/compiler/definitions/access#userrole-vs-roles)), so saved views can't be read or modified from outside the CMS by non-admin accounts.
|
|
19
|
+
5. **In-SPA gate** — if any earlier layer is bypassed, the SPA still redirects the user to `/account/profile`.
|
|
20
|
+
|
|
21
|
+
Your resource CRUD endpoints keep whatever `crud.access.roles` you defined — they're the app's data API and unaffected by the CMS gate.
|
|
22
|
+
|
|
23
|
+
## The Four Layers
|
|
24
|
+
|
|
25
|
+
Quickback enforces security through four complementary layers:
|
|
26
|
+
|
|
27
|
+
| Layer | Purpose | CMS Behavior |
|
|
28
|
+
|-------|---------|-------------|
|
|
29
|
+
| **Firewall** | Tenant isolation (org-scoped data) | Handled server-side. CMS cannot bypass it. |
|
|
30
|
+
| **CRUD Access** | Per-operation role requirements | Buttons hidden when role lacks permission |
|
|
31
|
+
| **Guards** | Field-level create/update control | Form fields enabled/disabled per guard rules |
|
|
32
|
+
| **Masking** | Sensitive field redaction | Masked values with lock icons per role |
|
|
33
|
+
|
|
34
|
+
## Role-Based Access
|
|
35
|
+
|
|
36
|
+
The CMS header includes a **role switcher** (in demo mode) or reads the user's actual role from their organization membership (in live mode). The three roles are:
|
|
37
|
+
|
|
38
|
+
- **owner** — Full access to all operations and data
|
|
39
|
+
- **admin** — Elevated access, typically all CRUD and most actions
|
|
40
|
+
- **member** — Standard access with restrictions on sensitive data and destructive actions
|
|
41
|
+
|
|
42
|
+
### CRUD Button Visibility
|
|
43
|
+
|
|
44
|
+
CRUD operation buttons are shown or hidden based on the current role's access:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
crud: {
|
|
48
|
+
create: { access: { roles: ['admin', 'owner'] } },
|
|
49
|
+
read: { access: { roles: ['member', 'admin', 'owner'] } },
|
|
50
|
+
update: { access: { roles: ['admin', 'owner'] } },
|
|
51
|
+
delete: { access: { roles: ['owner'] } },
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
With the config above:
|
|
56
|
+
|
|
57
|
+
- **Members** see the table (read) but no Create, Edit, or Delete buttons
|
|
58
|
+
- **Admins** see Create and Edit buttons but no Delete
|
|
59
|
+
- **Owners** see all buttons
|
|
60
|
+
|
|
61
|
+
The row action menu also adapts — Edit and Delete entries only appear when the role has the corresponding permission.
|
|
62
|
+
|
|
63
|
+
## Guards
|
|
64
|
+
|
|
65
|
+
Guards control which fields appear in create and edit forms, and which cells are editable in Data Table mode.
|
|
66
|
+
|
|
67
|
+
### Createable Fields
|
|
68
|
+
|
|
69
|
+
Fields listed in `guards.createable` appear in the create form. Fields not in this list are hidden from the form entirely:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
guards: {
|
|
73
|
+
createable: ['name', 'email', 'phone', 'status'],
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Updatable Fields
|
|
78
|
+
|
|
79
|
+
Fields listed in `guards.updatable` are editable in the edit form and in Data Table inline editing:
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
guards: {
|
|
83
|
+
updatable: ['name', 'email', 'phone'],
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Immutable Fields
|
|
88
|
+
|
|
89
|
+
Fields in `guards.immutable` can be set during creation but cannot be changed afterward. In edit mode, they appear as disabled inputs with a lock icon:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
guards: {
|
|
93
|
+
immutable: ['accountCode', 'type'],
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Protected Fields
|
|
98
|
+
|
|
99
|
+
Fields in `guards.protected` can only be updated via specific actions. They appear as disabled inputs with the message "Updated via actions only":
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
guards: {
|
|
103
|
+
protected: {
|
|
104
|
+
status: ['approve', 'void'], // Updated by approve or void actions
|
|
105
|
+
balance: ['applyPayment'], // Updated by applyPayment action
|
|
106
|
+
},
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Masking
|
|
111
|
+
|
|
112
|
+
Masking rules redact sensitive data based on the user's role. The CMS applies masking client-side for display and the API enforces it server-side in responses.
|
|
113
|
+
|
|
114
|
+
### Masking Types
|
|
115
|
+
|
|
116
|
+
| Type | Example Input | Masked Output |
|
|
117
|
+
|------|--------------|---------------|
|
|
118
|
+
| `email` | `john@acme.com` | `j***@acme.com` |
|
|
119
|
+
| `phone` | `(555) 123-4567` | `***-***-4567` |
|
|
120
|
+
| `ssn` | `123-45-6789` | `***-**-6789` |
|
|
121
|
+
| `redact` | `Confidential notes` | `------` |
|
|
122
|
+
|
|
123
|
+
### Configuration
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
masking: {
|
|
127
|
+
email: { type: 'email', show: { roles: ['admin', 'owner'] } },
|
|
128
|
+
phone: { type: 'phone', show: { roles: ['admin', 'owner'] } },
|
|
129
|
+
ssn: { type: 'ssn', show: { roles: ['owner'] } },
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
With the above config:
|
|
134
|
+
|
|
135
|
+
- **Members** see masked values for email, phone, and SSN
|
|
136
|
+
- **Admins** see unmasked email and phone, but masked SSN
|
|
137
|
+
- **Owners** see all values unmasked
|
|
138
|
+
|
|
139
|
+
### Visual Indicator
|
|
140
|
+
|
|
141
|
+
Masked fields display a lock icon next to the redacted value, making it clear that the field contains hidden data:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
Email: [lock] j***@acme.com
|
|
145
|
+
SSN: [lock] ***-**-6789
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Views
|
|
149
|
+
|
|
150
|
+
Views provide column-level projections per role. Only authorized views appear in the toolbar dropdown.
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
read: {
|
|
154
|
+
views: {
|
|
155
|
+
summary: {
|
|
156
|
+
fields: ['id', 'name', 'status'],
|
|
157
|
+
access: { roles: ['member', 'admin', 'owner'] },
|
|
158
|
+
},
|
|
159
|
+
financial: {
|
|
160
|
+
fields: ['id', 'name', 'balance', 'creditLimit', 'paymentTerms'],
|
|
161
|
+
access: { roles: ['admin', 'owner'] },
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Members only see the "summary" view option. Admins and owners see both "summary" and "financial". The "All Fields" option is always available.
|
|
168
|
+
|
|
169
|
+
## Firewall
|
|
170
|
+
|
|
171
|
+
The firewall layer handles tenant isolation — ensuring users can only access data within their organization. This is enforced entirely server-side:
|
|
172
|
+
|
|
173
|
+
- `organization_id` columns are filtered automatically by the API
|
|
174
|
+
- `owner` mode restricts records to the creating user
|
|
175
|
+
- The CMS never sees data outside the user's organization scope
|
|
176
|
+
|
|
177
|
+
The CMS does not display firewall config in its UI because there is nothing for the user to control. Tenant isolation is transparent and automatic.
|
|
178
|
+
|
|
179
|
+
## Actions
|
|
180
|
+
|
|
181
|
+
Action visibility is controlled by access conditions on each action:
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
actions: {
|
|
185
|
+
approve: {
|
|
186
|
+
access: {
|
|
187
|
+
roles: ['admin', 'owner'],
|
|
188
|
+
record: { status: { equals: 'pending' } },
|
|
189
|
+
},
|
|
190
|
+
cms: { destructive: true, confirm: true },
|
|
191
|
+
},
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The CMS evaluates both the role requirement and the record condition. In this example, the "Approve" action only appears for admins and owners, and only on records where `status === "pending"`.
|
|
196
|
+
|
|
197
|
+
Destructive actions (`cms.destructive: true`, or named `void`/`delete`) receive special warning styling with red text and an alert icon. Actions with `cms.hidden: true` are hidden from the CMS entirely (API-only).
|
|
198
|
+
|
|
199
|
+
## Next Steps
|
|
200
|
+
|
|
201
|
+
- **[Actions](/stack/cms/actions)** — Action dialogs and input forms
|
|
202
|
+
- **[Table Views](/stack/cms/table-views)** — View projections and toolbar
|
|
203
|
+
- **[Inline Editing](/stack/cms/inline-editing)** — How guards affect editability
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Table Views
|
|
2
|
+
|
|
3
|
+
The CMS provides two view modes for every table: **Table** mode for browsing and navigating records, and **Data Table** mode for spreadsheet-style inline editing. Switch between them with the toolbar toggle.
|
|
4
|
+
|
|
5
|
+
## Table Mode
|
|
6
|
+
|
|
7
|
+
Table mode is the default browse experience:
|
|
8
|
+
|
|
9
|
+
- **Click rows** to navigate to the record detail view
|
|
10
|
+
- **Row action menus** (three-dot icon) with view, edit, delete, and custom actions
|
|
11
|
+
- **Column headers** are sortable — click to toggle ascending/descending
|
|
12
|
+
- **Search bar** for full-text search across all fields
|
|
13
|
+
- **Responsive columns** that adapt to available space
|
|
14
|
+
|
|
15
|
+
Each row shows the most relevant columns for the table. Foreign key columns display human-readable labels (resolved via `_label` fields) instead of raw UUIDs. Boolean columns render as colored Yes/No badges. Enum columns use color-coded pills.
|
|
16
|
+
|
|
17
|
+
### Row Actions
|
|
18
|
+
|
|
19
|
+
The three-dot menu on each row provides:
|
|
20
|
+
|
|
21
|
+
| Action | Visibility | Description |
|
|
22
|
+
|--------|-----------|-------------|
|
|
23
|
+
| View details | Always | Navigate to the record detail page |
|
|
24
|
+
| Edit | When role has `update` access | Navigate to the edit form |
|
|
25
|
+
| Custom actions | Filtered by role + record state | Run actions like approve, void, post |
|
|
26
|
+
| Delete | When role has `delete` access | Delete with confirmation |
|
|
27
|
+
|
|
28
|
+
Actions are filtered by the current role's CRUD permissions and the action's access conditions. For example, an "approve" action that requires `status === "pending"` only appears on pending records.
|
|
29
|
+
|
|
30
|
+
## Data Table Mode
|
|
31
|
+
|
|
32
|
+
Data Table mode provides an Excel/Google Sheets-like editing experience:
|
|
33
|
+
|
|
34
|
+
- **Cell selection** with a blue focus ring
|
|
35
|
+
- **Keyboard navigation** using arrow keys, Tab, Enter, and Escape
|
|
36
|
+
- **Type-to-edit** — start typing to enter edit mode on the selected cell
|
|
37
|
+
- **Row numbers** displayed in the leftmost column
|
|
38
|
+
- **Hint bar** at the bottom showing keyboard shortcuts
|
|
39
|
+
|
|
40
|
+
### Editable Fields
|
|
41
|
+
|
|
42
|
+
Which cells are editable is determined by the table's guards:
|
|
43
|
+
|
|
44
|
+
- Fields in `guards.updatable` are editable
|
|
45
|
+
- Fields in `guards.immutable` are read-only (shown with a disabled style)
|
|
46
|
+
- Fields in `guards.protected` are read-only (marked "Updated via actions only")
|
|
47
|
+
- Audit fields (`createdAt`, `createdBy`, `modifiedAt`, `modifiedBy`) are always read-only
|
|
48
|
+
|
|
49
|
+
Non-editable cells can still be selected and copied, but they don't enter edit mode.
|
|
50
|
+
|
|
51
|
+
### Cell Types
|
|
52
|
+
|
|
53
|
+
| Column Type | Edit Control | Behavior |
|
|
54
|
+
|-------------|-------------|----------|
|
|
55
|
+
| Text | Text input | Free-text entry |
|
|
56
|
+
| Number | Number input | Numeric entry with step controls |
|
|
57
|
+
| Boolean | Yes/No dropdown | Toggle between Yes and No |
|
|
58
|
+
| FK reference | Typeahead dropdown | Server-side search with debounced queries |
|
|
59
|
+
| Enum | Select dropdown | Choose from allowed values |
|
|
60
|
+
|
|
61
|
+
### Saving
|
|
62
|
+
|
|
63
|
+
Changes are auto-saved when you:
|
|
64
|
+
|
|
65
|
+
- Press **Enter** to confirm and move down
|
|
66
|
+
- Press **Tab** to confirm and move to the next editable cell
|
|
67
|
+
- **Click away** from the editing cell (blur)
|
|
68
|
+
|
|
69
|
+
Press **Escape** to cancel an edit and revert to the previous value.
|
|
70
|
+
|
|
71
|
+
## Views
|
|
72
|
+
|
|
73
|
+
Views are named column projections defined in your table's resource config. They control which columns appear in the table based on the current role.
|
|
74
|
+
|
|
75
|
+
### Toolbar
|
|
76
|
+
|
|
77
|
+
The toolbar shows a view dropdown when the table has views defined. Options include:
|
|
78
|
+
|
|
79
|
+
- **All Fields** — Shows all columns (default)
|
|
80
|
+
- Custom views — Only show the columns specified in the view config
|
|
81
|
+
|
|
82
|
+
Views are filtered by role access. If a view's access rules require `admin` and the current user is a `member`, that view won't appear in the dropdown.
|
|
83
|
+
|
|
84
|
+
### Example
|
|
85
|
+
|
|
86
|
+
Given this definition:
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
read: {
|
|
90
|
+
views: {
|
|
91
|
+
summary: {
|
|
92
|
+
fields: ['id', 'name', 'status'],
|
|
93
|
+
access: { roles: ['member', 'admin'] },
|
|
94
|
+
},
|
|
95
|
+
full: {
|
|
96
|
+
fields: ['id', 'name', 'status', 'ssn', 'internalNotes'],
|
|
97
|
+
access: { roles: ['admin'] },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
- Members see: "All Fields" and "summary"
|
|
104
|
+
- Admins see: "All Fields", "summary", and "full"
|
|
105
|
+
- Owners see: "All Fields", "summary", and "full"
|
|
106
|
+
|
|
107
|
+
When a view is selected, the CMS calls the `listView` API endpoint instead of the standard `list`, fetching only the projected columns.
|
|
108
|
+
|
|
109
|
+
## Default Sort
|
|
110
|
+
|
|
111
|
+
You can set a default sort order for a table by adding `defaultSort` to your resource config:
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
export default defineTable(podcastEpisodes, {
|
|
115
|
+
defaultSort: { field: "createdAt", order: "desc" },
|
|
116
|
+
// ...
|
|
117
|
+
});
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
When the CMS loads the table, it applies this sort automatically. Users can still click column headers to change the sort — `defaultSort` only sets the initial state.
|
|
121
|
+
|
|
122
|
+
## Pagination
|
|
123
|
+
|
|
124
|
+
The bottom of every table view shows pagination controls:
|
|
125
|
+
|
|
126
|
+
- **Page range indicator** — "Showing 1-25 of 142"
|
|
127
|
+
- **Page buttons** — Navigate directly to a page, with ellipsis for large page counts
|
|
128
|
+
- **Previous/Next** arrows
|
|
129
|
+
|
|
130
|
+
The default page size is 25 records. The CMS resets to page 1 when you change the search query or switch views.
|
|
131
|
+
|
|
132
|
+
## Search
|
|
133
|
+
|
|
134
|
+
The search bar performs full-text search across all columns. Type a query and the CMS debounces the request, then fetches matching records from the API.
|
|
135
|
+
|
|
136
|
+
Search works in both Table and Data Table modes, and works with views (searching within the projected columns).
|
|
137
|
+
|
|
138
|
+
## Next Steps
|
|
139
|
+
|
|
140
|
+
- **[Inline Editing](/stack/cms/inline-editing)** — Deep dive into spreadsheet editing, FK typeahead, and keyboard shortcuts
|
|
141
|
+
- **[Security](/stack/cms/security)** — How roles and guards affect the table UI
|
|
142
|
+
- **[Actions](/stack/cms/actions)** — Custom actions in the row menu and detail view
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Quickback Stack
|
|
2
|
+
|
|
3
|
+
**Quickback Stack** is the runtime services that surround your compiled API. While the [Quickback Compiler](/compiler) generates your routes and security policies, the Stack is everything else you need to ship a real application — auth, storage, realtime, queues, an admin UI, an account UI — all on your own Cloudflare account.
|
|
4
|
+
|
|
5
|
+
## What you get
|
|
6
|
+
|
|
7
|
+
| Component | Service | Purpose |
|
|
8
|
+
|-----------|---------|---------|
|
|
9
|
+
| [Auth](/stack/auth) | Better Auth | Email/OTP, passkeys, organizations, admin |
|
|
10
|
+
| [Storage](/stack/storage) | KV, R2 | Sessions, cache, files |
|
|
11
|
+
| [Realtime](/stack/realtime) | Durable Objects | WebSocket for live updates |
|
|
12
|
+
| [Queues](/stack/queues) | Cloudflare Queues | Background jobs, webhook delivery |
|
|
13
|
+
| [Vector & AI](/stack/vector) | Workers AI | Embeddings, semantic search |
|
|
14
|
+
| [Webhooks](/stack/webhooks) | Hono + Queues | Signed inbound, retried outbound |
|
|
15
|
+
| [Quickback CMS](/stack/cms) | Embedded SPA | Schema-driven admin UI |
|
|
16
|
+
| [Account UI](/stack/account-ui) | Embedded SPA | Login, profile, orgs, admin |
|
|
17
|
+
|
|
18
|
+
## Architecture
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
22
|
+
│ Cloudflare Edge │
|
|
23
|
+
├─────────────────────────────────────────────────────────────┤
|
|
24
|
+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
|
|
25
|
+
│ │ Workers │ │ Durable │ │ KV │ │
|
|
26
|
+
│ │ (API/CMS) │ │ Objects │ │ (Cache) │ │
|
|
27
|
+
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
|
|
28
|
+
│ │ │ │ │
|
|
29
|
+
│ ┌──────┴──────┐ ┌──────┴──────┐ ┌──────┴──────┐ │
|
|
30
|
+
│ │ D1 │ │ Realtime │ │ R2 │ │
|
|
31
|
+
│ │ (or Neon) │ │ (WebSocket)│ │ (Storage) │ │
|
|
32
|
+
│ └─────────────┘ └─────────────┘ └─────────────┘ │
|
|
33
|
+
│ │
|
|
34
|
+
│ ┌─────────────┐ ┌─────────────────────────────────┐ │
|
|
35
|
+
│ │ Queues │ │ Better Auth │ │
|
|
36
|
+
│ │ (Background)│ │ (Email OTP, Passkeys, etc.) │ │
|
|
37
|
+
│ └─────────────┘ └─────────────────────────────────┘ │
|
|
38
|
+
└─────────────────────────────────────────────────────────────┘
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Your account, your data
|
|
42
|
+
|
|
43
|
+
Everything in Quickback Stack runs on your own Cloudflare account:
|
|
44
|
+
|
|
45
|
+
- **Workers** — your deployments, your logs
|
|
46
|
+
- **Storage** — your KV namespaces, your R2 buckets
|
|
47
|
+
- **Secrets** — your API keys, in your Wrangler secrets
|
|
48
|
+
|
|
49
|
+
Quickback provides the architecture and the code generation. You own the infrastructure.
|
|
50
|
+
|
|
51
|
+
## Quick start
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install -g wrangler @quickback-dev/cli
|
|
55
|
+
quickback create cloudflare my-app
|
|
56
|
+
cd my-app
|
|
57
|
+
quickback compile
|
|
58
|
+
wrangler deploy
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## See also
|
|
62
|
+
|
|
63
|
+
- [Quickback Compiler](/compiler) — the build tool that generates your API
|
|
64
|
+
- [Quickback for Hono API](/compiler/targets/hono-api) — what the compiler outputs
|
|
65
|
+
- [Definitions](/compiler/definitions) — the security model the Stack runs
|