@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,158 @@
|
|
|
1
|
+
# Quickback CMS
|
|
2
|
+
|
|
3
|
+
> **Early Access**
|
|
4
|
+
>
|
|
5
|
+
> The Quickback CMS is in early access. It works with any Quickback-compiled API that outputs a schema registry. Expect active development and potential changes.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Quickback CMS
|
|
9
|
+
|
|
10
|
+
A schema-driven admin interface that reads `schema-registry.json` generated by the Quickback compiler. Every table, column, action, view, and security rule is rendered automatically. Zero UI code per table.
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
The CMS generates its entire UI from your Quickback definitions. Define a table with columns, guards, masking, views, and actions in your feature files. Run the compiler. The CMS reads the resulting schema registry and renders a complete admin interface — data tables, inline editing, action dialogs, role-based access, and field masking — all without writing a single line of UI code.
|
|
15
|
+
|
|
16
|
+
## Key Features
|
|
17
|
+
|
|
18
|
+
- **Schema-driven** — Zero UI code per table. Add a table, recompile, and it appears in the CMS.
|
|
19
|
+
- **Dashboard** — Stats grid and feature cards showing tables, columns, actions, views, and masked fields at a glance.
|
|
20
|
+
- **Custom pages** — Split-panel layouts with drag-and-drop, matching engine, and page-level actions for workflows like reconciliation.
|
|
21
|
+
- **Embedded in your Worker** — Set `cms: true` in config. The CMS is served as static assets from the same Cloudflare Worker as your API — same origin, no CORS, auth cookies work naturally.
|
|
22
|
+
- **Dual view modes** — Table browse mode for navigation and Data Table mode for spreadsheet-style editing.
|
|
23
|
+
- **Role-based access** — Owner, admin, and member roles with live switching. CRUD buttons hidden when unauthorized.
|
|
24
|
+
- **Multi-tenant & single-tenant** — Org-scoped access by default, with single-tenant mode for simpler projects.
|
|
25
|
+
- **Inline spreadsheet editing** — Excel/Google Sheets-like editing with keyboard navigation (arrows, Tab, Enter, Escape).
|
|
26
|
+
- **FK typeahead** — Server-side search for foreign key fields with debounced queries and keyboard navigation.
|
|
27
|
+
- **Field masking** — Email, phone, SSN, and redaction patterns applied per role. Masked fields show a lock icon.
|
|
28
|
+
- **Custom actions** — Action dialogs with auto-generated input forms, access filtering, CMS metadata (icons, categories, confirmations), and side effects warnings.
|
|
29
|
+
- **Views** — Named column-level projections per role. "All Fields" plus custom views in the toolbar.
|
|
30
|
+
- **Auto-form generation** — Create and edit forms built from guards (createable/updatable fields).
|
|
31
|
+
- **Display column auto-detection** — FK labels resolved automatically from `name`, `title`, `label`, `code`, and other common patterns.
|
|
32
|
+
|
|
33
|
+
## Architecture
|
|
34
|
+
|
|
35
|
+
The CMS sits at the end of the Quickback compilation pipeline:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Quickback Definitions (feature files)
|
|
39
|
+
|
|
|
40
|
+
v
|
|
41
|
+
Compiler
|
|
42
|
+
|
|
|
43
|
+
v
|
|
44
|
+
schema-registry.json
|
|
45
|
+
|
|
|
46
|
+
v
|
|
47
|
+
CMS reads it
|
|
48
|
+
|
|
|
49
|
+
v
|
|
50
|
+
Renders admin UI
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Your feature definitions are the single source of truth. The compiler extracts all metadata — columns, types, guards, masking rules, views, actions, validation, and firewall config — into a static JSON file. The CMS consumes that file and renders the appropriate UI for each table.
|
|
54
|
+
|
|
55
|
+
### How Embedded Serving Works
|
|
56
|
+
|
|
57
|
+
When `cms: true` is set, the compiler builds the CMS SPA from source at compile time (with your project-specific env vars baked in) and outputs the assets to `src/apps/cms/`. It also configures `wrangler.toml`:
|
|
58
|
+
|
|
59
|
+
```toml
|
|
60
|
+
[assets]
|
|
61
|
+
binding = "ASSETS"
|
|
62
|
+
directory = "src/apps"
|
|
63
|
+
not_found_handling = "none"
|
|
64
|
+
run_worker_first = true
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
All requests go through the Worker first. The Worker handles SPA routing — serving CMS at `/cms/` on the unified domain and at root (`/`) on a custom CMS domain. API paths (`/api/*`, `/auth/*`, etc.) are handled by Hono as normal.
|
|
68
|
+
|
|
69
|
+
See [Multi-Domain Architecture](/compiler/config/domains) for details on hostname-based routing.
|
|
70
|
+
|
|
71
|
+
> **Zero UI Code**
|
|
72
|
+
>
|
|
73
|
+
> The CMS generates its entire UI from your Quickback definitions. Add a table, recompile, and it appears in the CMS. No UI code to write.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## Quick Start
|
|
77
|
+
|
|
78
|
+
### 1. Enable CMS in config
|
|
79
|
+
|
|
80
|
+
```typescript title="quickback/quickback.config.ts"
|
|
81
|
+
export default defineConfig({
|
|
82
|
+
name: "my-app",
|
|
83
|
+
cms: true,
|
|
84
|
+
// ...providers
|
|
85
|
+
});
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 2. Compile
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
quickback compile
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The compiler generates `schema-registry.json` and copies CMS static assets to `src/apps/`. It also adds an `[assets]` section to `wrangler.toml` so Cloudflare serves the CMS SPA automatically.
|
|
95
|
+
|
|
96
|
+
### 3. Run
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npm run dev
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Open your Worker URL in a browser — the CMS is served at the root. API routes (`/api/*`, `/auth/*`, etc.) pass through to your Hono app as normal. Everything runs on the same origin — no CORS configuration needed, auth cookies work naturally.
|
|
103
|
+
|
|
104
|
+
### Optional: Custom CMS domain
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
cms: { domain: "cms.example.com" }
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This adds a custom domain route to `wrangler.toml`. Both domains serve the same Worker — `api.example.com` for the API, `cms.example.com` for the CMS. The compiler also auto-infers a unified `quickback.example.com` domain where everything is available. See [Multi-Domain Architecture](/compiler/config/domains).
|
|
111
|
+
|
|
112
|
+
### Access gate (admin-only by default)
|
|
113
|
+
|
|
114
|
+
CMS access defaults to `access: "admin"` — only `user.role === "admin"` (the user-table role from Better Auth's admin plugin) can reach `/cms/*`. Non-admin authenticated users are redirected to `/account/profile`. The gate is enforced at **four layers** — defense in depth:
|
|
115
|
+
|
|
116
|
+
1. **Account UI link** — the "Go to CMS" button is hidden for non-admins.
|
|
117
|
+
2. **CMS SPA shell** — the Worker returns `403 Admin access required` before serving `index.html` to a non-admin. Unauthenticated requests are redirected to the login page.
|
|
118
|
+
3. **`/api/v1/schema`** — the CMS metadata endpoint checks `ctx.userRole === "admin"` and returns `403` otherwise.
|
|
119
|
+
4. **`custom_view` CRUD** — the CMS-internal saved-views table is gated on `userRole: ["admin"]` (see the [`userRole` access primitive](/compiler/definitions/access#userrole)) rather than org membership.
|
|
120
|
+
|
|
121
|
+
Your resource CRUD endpoints (`/api/v1/<resource>`) are **not** affected — they continue to use the per-resource `crud.access.roles` you defined.
|
|
122
|
+
|
|
123
|
+
To allow any authenticated user, opt out explicitly:
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
cms: { access: "user" }
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Optional: Skip SPA rebuild
|
|
130
|
+
|
|
131
|
+
After the first compile, you can skip rebuilding the CMS SPA on subsequent compiles:
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
cms: { build: false }
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This is useful when you're iterating on API features and don't need to rebuild the CMS UI each time — it saves significant compile time. Set `build: true` (or omit it) when you need to update the CMS assets.
|
|
138
|
+
|
|
139
|
+
### Optional: Custom output directory
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
cms: { outputDir: "my-custom-path/cms" }
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
This changes where the compiled CMS assets are placed (relative to project root), instead of the default `src/apps/cms/`.
|
|
146
|
+
|
|
147
|
+
## Next Steps
|
|
148
|
+
|
|
149
|
+
- **[Schema Registry](/stack/cms/schema-registry)** — Understand the JSON format the compiler generates
|
|
150
|
+
- **[Connecting](/stack/cms/connecting)** — Demo mode, live mode, CLI command, and auth modes
|
|
151
|
+
- **[Dashboard](/stack/cms/dashboard)** — Stats grid and feature navigation
|
|
152
|
+
- **[Table Views](/stack/cms/table-views)** — Browse and Data Table view modes
|
|
153
|
+
- **[Custom Pages](/stack/cms/pages)** — Split-panel layouts, matching engine, and drag-drop
|
|
154
|
+
- **[Inline Editing](/stack/cms/inline-editing)** — Spreadsheet-style editing and FK typeahead
|
|
155
|
+
- **[Security](/stack/cms/security)** — How the CMS enforces all four security layers
|
|
156
|
+
- **[Actions](/stack/cms/actions)** — Custom actions with input forms, access filtering, and CMS metadata
|
|
157
|
+
- **[Schema Format Reference](/stack/cms/schema-format)** — Full TypeScript types for schema-registry.json
|
|
158
|
+
- **[Components Reference](/stack/cms/components)** — All CMS components and their props
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Inline Editing
|
|
2
|
+
|
|
3
|
+
The CMS provides spreadsheet-style inline editing in Data Table mode, plus auto-generated create and edit forms in the record detail view. All editable fields are determined from your table's guard configuration.
|
|
4
|
+
|
|
5
|
+
## Spreadsheet Editing
|
|
6
|
+
|
|
7
|
+
In Data Table mode, every editable cell becomes an inline editor. Select a cell, start typing, and the value is saved automatically when you move to another cell or press Enter.
|
|
8
|
+
|
|
9
|
+
### Editable Fields
|
|
10
|
+
|
|
11
|
+
The CMS determines which fields are editable from the table's guards:
|
|
12
|
+
|
|
13
|
+
- **`guards.updatable`** fields are editable in existing records
|
|
14
|
+
- **`guards.createable`** fields are editable in new record forms
|
|
15
|
+
- **`guards.immutable`** fields are locked after creation (shown as disabled in edit mode)
|
|
16
|
+
- **`guards.protected`** fields can only be changed via actions (marked "Updated via actions only")
|
|
17
|
+
|
|
18
|
+
If a table has no explicit guard config, the CMS falls back to making all non-system columns editable (excluding `id`, audit fields, `organizationId`, and `deletedAt`).
|
|
19
|
+
|
|
20
|
+
## Cell Types
|
|
21
|
+
|
|
22
|
+
Each column type gets a specialized editor:
|
|
23
|
+
|
|
24
|
+
### Text
|
|
25
|
+
|
|
26
|
+
Standard text input. Type freely and press Enter or Tab to save.
|
|
27
|
+
|
|
28
|
+
### Number
|
|
29
|
+
|
|
30
|
+
Numeric input with step controls. Supports decimal values (step `0.01` for currency fields). The CMS detects money fields from column names containing `amount`, `total`, `price`, `cost`, `balance`, `rate`, etc.
|
|
31
|
+
|
|
32
|
+
### Boolean
|
|
33
|
+
|
|
34
|
+
A Yes/No dropdown. Click to toggle between the two values.
|
|
35
|
+
|
|
36
|
+
### FK Typeahead
|
|
37
|
+
|
|
38
|
+
Foreign key columns (ending in `Id`) get a typeahead dropdown with server-side search:
|
|
39
|
+
|
|
40
|
+
- **Debounced search** — Queries are debounced at 200ms to avoid flooding the API
|
|
41
|
+
- **Server-side filtering** — Sends `?search=query&pageSize=20` to the FK target table's list endpoint
|
|
42
|
+
- **Keyboard navigation** — Arrow keys to navigate options, Enter to select, Escape to close
|
|
43
|
+
- **Auto-loads initial options** — Opens with the first 20 records sorted by display column
|
|
44
|
+
- **Display labels** — Shows the target table's display column value (e.g., "John Smith" instead of `usr_abc123`)
|
|
45
|
+
|
|
46
|
+
The FK target table is derived by stripping the `Id` suffix from the column name. For example, `contactId` searches the `contact` table, and `accountCodeId` searches the `accountCode` table.
|
|
47
|
+
|
|
48
|
+
### Enum / Select
|
|
49
|
+
|
|
50
|
+
Columns with `validation.enum` render as a select dropdown with all allowed values.
|
|
51
|
+
|
|
52
|
+
## Display Labels
|
|
53
|
+
|
|
54
|
+
FK cells in the table view show human-readable names instead of raw IDs. The API enriches list responses with `_label` fields:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
contactId: "cnt_abc123" → displays "Acme Corporation"
|
|
58
|
+
projectId: "prj_xyz789" → displays "Beach House Renovation"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The label comes from the referenced table's display column (auto-detected from `name`, `title`, `code`, etc.). This works in both Table mode and Data Table mode.
|
|
62
|
+
|
|
63
|
+
## Keyboard Shortcuts
|
|
64
|
+
|
|
65
|
+
| Shortcut | Action |
|
|
66
|
+
|----------|--------|
|
|
67
|
+
| Arrow keys | Navigate between cells |
|
|
68
|
+
| Tab | Move to next editable cell |
|
|
69
|
+
| Shift + Tab | Move to previous editable cell |
|
|
70
|
+
| Enter | Start editing / confirm edit and move down |
|
|
71
|
+
| Escape | Cancel current edit / deselect cell |
|
|
72
|
+
| Type any character | Start editing the selected cell |
|
|
73
|
+
|
|
74
|
+
### Navigation Flow
|
|
75
|
+
|
|
76
|
+
1. **Select** a cell by clicking or using arrow keys
|
|
77
|
+
2. **Edit** by pressing Enter, Tab, or just typing
|
|
78
|
+
3. **Save** by pressing Enter (moves down), Tab (moves right to next editable), or clicking elsewhere
|
|
79
|
+
4. **Cancel** by pressing Escape (reverts to previous value)
|
|
80
|
+
|
|
81
|
+
When you press Tab, the cursor skips non-editable cells and jumps to the next editable cell in the row. At the end of a row, it wraps to the first editable cell of the next row.
|
|
82
|
+
|
|
83
|
+
## Record Detail View
|
|
84
|
+
|
|
85
|
+
Clicking a row in Table mode navigates to the record detail view. Fields are automatically grouped by type:
|
|
86
|
+
|
|
87
|
+
| Group | Fields Included |
|
|
88
|
+
|-------|----------------|
|
|
89
|
+
| Identity | `name`, `code`, `status`, `title`, `companyName`, fields ending in `Type` or `Status` |
|
|
90
|
+
| Contact Info | `email`, `phone`, `mobile`, `website`, `address1`, `address2`, `city`, `state`, `zip`, `country` |
|
|
91
|
+
| Financial | Money fields, fields with `Percent`, `Rate`, `Markup`, `Discount`, `Currency`, `exchange` |
|
|
92
|
+
| References | All FK columns (ending in `Id`, excluding `id` and `organizationId`) |
|
|
93
|
+
| Settings | Boolean fields |
|
|
94
|
+
| Dates | Date/time fields |
|
|
95
|
+
| Audit | `createdAt`, `createdBy`, `modifiedAt`, `modifiedBy` |
|
|
96
|
+
| Other | Remaining ungrouped fields |
|
|
97
|
+
|
|
98
|
+
Each group is rendered as a card with the group label as a header. Fields display formatted values — dates are localized, money shows currency formatting, booleans render as Yes/No badges, enums use color-coded pills, and FK references are clickable links to the target record.
|
|
99
|
+
|
|
100
|
+
## Auto-Generated Forms
|
|
101
|
+
|
|
102
|
+
The CMS generates create and edit forms from the table's guard configuration:
|
|
103
|
+
|
|
104
|
+
### Create Form
|
|
105
|
+
|
|
106
|
+
Shows all fields listed in `guards.createable`. Required fields (notNull without a default) are marked with a red asterisk. Validation rules from the schema (min/max length, enum constraints, email format) are enforced client-side.
|
|
107
|
+
|
|
108
|
+
### Edit Form
|
|
109
|
+
|
|
110
|
+
Shows all fields listed in `guards.updatable`. Additionally:
|
|
111
|
+
|
|
112
|
+
- **Immutable fields** appear as disabled inputs with a lock icon
|
|
113
|
+
- **Protected fields** appear as disabled inputs with the note "Updated via actions only"
|
|
114
|
+
- **Validation** is applied on submit, with error messages shown per field
|
|
115
|
+
|
|
116
|
+
### Field Input Types
|
|
117
|
+
|
|
118
|
+
The auto-form selects the appropriate input control based on column type and validation:
|
|
119
|
+
|
|
120
|
+
| Detection | Input Type |
|
|
121
|
+
|-----------|-----------|
|
|
122
|
+
| `mode: "boolean"` | Checkbox |
|
|
123
|
+
| `validation.enum` present | Select dropdown |
|
|
124
|
+
| Column name matches date pattern | Date/time picker |
|
|
125
|
+
| Column name matches money pattern | Number input (step 0.01) |
|
|
126
|
+
| Column name matches URL pattern | URL input |
|
|
127
|
+
| `validation.email: true` | Email input |
|
|
128
|
+
| `type: "integer"` or `type: "real"` | Number input |
|
|
129
|
+
| Long text (description, notes) | Textarea |
|
|
130
|
+
| Default | Text input |
|
|
131
|
+
|
|
132
|
+
## Next Steps
|
|
133
|
+
|
|
134
|
+
- **[Table Views](/stack/cms/table-views)** — Browse mode and view projections
|
|
135
|
+
- **[Security](/stack/cms/security)** — How guards control editability
|
|
136
|
+
- **[Actions](/stack/cms/actions)** — Trigger actions from the detail view
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# Custom Pages
|
|
2
|
+
|
|
3
|
+
Custom pages extend the CMS beyond standard table views. Define split-panel layouts, matching rules for record reconciliation, drag-and-drop interactions, and page-level actions — all from a single `definePage()` call.
|
|
4
|
+
|
|
5
|
+
## Defining a Page
|
|
6
|
+
|
|
7
|
+
Pages are defined in your feature directory under a `pages/` folder:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
quickback/definitions/features/
|
|
11
|
+
banking/
|
|
12
|
+
bank-accounts.ts # One table per file — any filename
|
|
13
|
+
bank-transactions.ts
|
|
14
|
+
actions.ts
|
|
15
|
+
pages/
|
|
16
|
+
bank-reconciliation.ts
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Each page file exports a `definePage()` call:
|
|
20
|
+
|
|
21
|
+
```typescript title="features/banking/pages/bank-reconciliation.ts"
|
|
22
|
+
import { definePage } from '@quickback/compiler';
|
|
23
|
+
|
|
24
|
+
export default definePage({
|
|
25
|
+
slug: 'bank-reconciliation',
|
|
26
|
+
title: 'Bank Reconciliation',
|
|
27
|
+
description: 'Match bank transactions to ledger entries',
|
|
28
|
+
icon: 'landmark',
|
|
29
|
+
feature: 'banking',
|
|
30
|
+
|
|
31
|
+
access: { roles: ['owner', 'admin'] },
|
|
32
|
+
|
|
33
|
+
dataSources: {
|
|
34
|
+
bankTransactions: {
|
|
35
|
+
table: 'bankTransaction',
|
|
36
|
+
defaultSort: { field: 'date', order: 'desc' },
|
|
37
|
+
displayColumns: ['date', 'description', 'amount'],
|
|
38
|
+
},
|
|
39
|
+
ledgerEntries: {
|
|
40
|
+
table: 'ledgerEntry',
|
|
41
|
+
defaultSort: { field: 'date', order: 'desc' },
|
|
42
|
+
displayColumns: ['date', 'memo', 'amount'],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
layout: {
|
|
47
|
+
type: 'split-panel',
|
|
48
|
+
panels: [
|
|
49
|
+
{
|
|
50
|
+
id: 'bank',
|
|
51
|
+
title: 'Bank Transactions',
|
|
52
|
+
dataSource: 'bankTransactions',
|
|
53
|
+
position: 'left',
|
|
54
|
+
features: ['drag-source'],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'ledger',
|
|
58
|
+
title: 'Ledger Entries',
|
|
59
|
+
dataSource: 'ledgerEntries',
|
|
60
|
+
position: 'right',
|
|
61
|
+
features: ['drop-target'],
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
matching: {
|
|
67
|
+
enabled: true,
|
|
68
|
+
confidenceThreshold: 0.5,
|
|
69
|
+
rules: [
|
|
70
|
+
{
|
|
71
|
+
name: 'Amount Match',
|
|
72
|
+
weight: 0.5,
|
|
73
|
+
condition: {
|
|
74
|
+
left: 'bankTransactions.amount',
|
|
75
|
+
right: 'ledgerEntries.amount',
|
|
76
|
+
operator: 'abs-equals',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Date Proximity',
|
|
81
|
+
weight: 0.3,
|
|
82
|
+
condition: {
|
|
83
|
+
left: 'bankTransactions.date',
|
|
84
|
+
right: 'ledgerEntries.date',
|
|
85
|
+
operator: 'within-days',
|
|
86
|
+
value: 7,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Description Match',
|
|
91
|
+
weight: 0.2,
|
|
92
|
+
condition: {
|
|
93
|
+
left: 'bankTransactions.description',
|
|
94
|
+
right: 'ledgerEntries.memo',
|
|
95
|
+
operator: 'fuzzy-match',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
pageActions: {
|
|
102
|
+
reconcile: {
|
|
103
|
+
table: 'bankTransaction',
|
|
104
|
+
action: 'reconcile',
|
|
105
|
+
label: 'Reconcile',
|
|
106
|
+
icon: 'check-circle',
|
|
107
|
+
confirm: 'Match this bank transaction to the selected ledger entry?',
|
|
108
|
+
inputMapping: {
|
|
109
|
+
transactionId: 'bankTransactions.$id',
|
|
110
|
+
ledgerEntryId: 'ledgerEntries.$id',
|
|
111
|
+
amount: 'bankTransactions.$amount',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Data Sources
|
|
119
|
+
|
|
120
|
+
Each page declares one or more named data sources that bind to tables in your schema:
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
dataSources: {
|
|
124
|
+
bankTransactions: {
|
|
125
|
+
table: 'bankTransaction', // Table name from your schema
|
|
126
|
+
defaultFilters: { status: 'pending' }, // Applied on load
|
|
127
|
+
defaultSort: { field: 'date', order: 'desc' },
|
|
128
|
+
displayColumns: ['date', 'description', 'amount'],
|
|
129
|
+
},
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
| Field | Type | Description |
|
|
134
|
+
|-------|------|-------------|
|
|
135
|
+
| `table` | `string` | Table name to query (required) |
|
|
136
|
+
| `defaultFilters` | `Record<string, unknown>` | Filters applied on initial load |
|
|
137
|
+
| `defaultSort` | `{ field, order }` | Default sort column and direction |
|
|
138
|
+
| `displayColumns` | `string[]` | Columns shown in the panel (defaults to `["id"]`) |
|
|
139
|
+
|
|
140
|
+
## Layout
|
|
141
|
+
|
|
142
|
+
Pages use a layout configuration to arrange panels. Currently the only layout type is `split-panel`:
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
layout: {
|
|
146
|
+
type: 'split-panel',
|
|
147
|
+
panels: [
|
|
148
|
+
{ id: 'bank', title: 'Bank Txs', dataSource: 'bankTransactions', position: 'left', features: ['drag-source'] },
|
|
149
|
+
{ id: 'ledger', title: 'Ledger', dataSource: 'ledgerEntries', position: 'right', features: ['drop-target'] },
|
|
150
|
+
],
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Panel Features
|
|
155
|
+
|
|
156
|
+
Panels can enable interactive features:
|
|
157
|
+
|
|
158
|
+
| Feature | Description |
|
|
159
|
+
|---------|-------------|
|
|
160
|
+
| `drag-source` | Rows in this panel can be dragged |
|
|
161
|
+
| `drop-target` | Rows in this panel accept drops |
|
|
162
|
+
|
|
163
|
+
When a row is dragged from one panel and dropped onto a row in the other panel, the first page action is triggered with both records as context.
|
|
164
|
+
|
|
165
|
+
## Matching Engine
|
|
166
|
+
|
|
167
|
+
The matching engine compares records across two panels and computes confidence scores for potential matches. Matched rows display a colored confidence badge.
|
|
168
|
+
|
|
169
|
+
### Rules
|
|
170
|
+
|
|
171
|
+
Each rule defines a comparison between fields from two data sources:
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
matching: {
|
|
175
|
+
enabled: true,
|
|
176
|
+
confidenceThreshold: 0.5, // Minimum score to show (0-1)
|
|
177
|
+
rules: [
|
|
178
|
+
{
|
|
179
|
+
name: 'Amount Match',
|
|
180
|
+
weight: 0.5, // Weight in final score (0-1)
|
|
181
|
+
condition: {
|
|
182
|
+
left: 'bankTransactions.amount', // dataSourceName.fieldName
|
|
183
|
+
right: 'ledgerEntries.amount',
|
|
184
|
+
operator: 'abs-equals',
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Operators
|
|
192
|
+
|
|
193
|
+
| Operator | Description | Returns |
|
|
194
|
+
|----------|-------------|---------|
|
|
195
|
+
| `abs-equals` | Absolute values are equal | `1.0` if match, `0` otherwise |
|
|
196
|
+
| `within-days` | Dates are within N days | `1 - (daysDiff / maxDays)`, clamped to 0 |
|
|
197
|
+
| `fuzzy-match` | Word overlap between strings | Overlap ratio (0-1) |
|
|
198
|
+
|
|
199
|
+
The `within-days` operator uses the `value` parameter to set the maximum number of days (defaults to 7).
|
|
200
|
+
|
|
201
|
+
### Confidence Scoring
|
|
202
|
+
|
|
203
|
+
The final confidence score is the weighted average of all rule scores:
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
score = sum(ruleScore * ruleWeight) / sum(ruleWeights)
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Only matches above `confidenceThreshold` are shown. Confidence badges are color-coded:
|
|
210
|
+
|
|
211
|
+
| Score | Color |
|
|
212
|
+
|-------|-------|
|
|
213
|
+
| 80%+ | Green |
|
|
214
|
+
| 50-79% | Yellow |
|
|
215
|
+
| Below 50% | Orange |
|
|
216
|
+
|
|
217
|
+
## Page Actions
|
|
218
|
+
|
|
219
|
+
Page actions trigger table actions using data from both the source (dragged) and target (dropped-on) records:
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
pageActions: {
|
|
223
|
+
reconcile: {
|
|
224
|
+
table: 'bankTransaction', // Target table for the action
|
|
225
|
+
action: 'reconcile', // Action name on that table
|
|
226
|
+
label: 'Reconcile',
|
|
227
|
+
icon: 'check-circle',
|
|
228
|
+
confirm: 'Match this transaction?',
|
|
229
|
+
inputMapping: {
|
|
230
|
+
transactionId: 'bankTransactions.$id',
|
|
231
|
+
ledgerEntryId: 'ledgerEntries.$id',
|
|
232
|
+
amount: 'bankTransactions.$amount',
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Input Mapping
|
|
239
|
+
|
|
240
|
+
Input mapping resolves field references from the source and target records into the action's input fields. The format is `"dataSourceName.$fieldName"`:
|
|
241
|
+
|
|
242
|
+
- `bankTransactions.$id` — resolves to the `id` field of the dragged record from the `bankTransactions` data source
|
|
243
|
+
- `ledgerEntries.$amount` — resolves to the `amount` field of the drop-target record from the `ledgerEntries` data source
|
|
244
|
+
|
|
245
|
+
The `$` prefix denotes a field reference on the record. The data source name determines which record (source or target) to read from.
|
|
246
|
+
|
|
247
|
+
## Access Control
|
|
248
|
+
|
|
249
|
+
Restrict page access by role:
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
access: { roles: ['owner', 'admin'] }
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
When set, only users with the specified roles can view the page. The page link is hidden from the sidebar for unauthorized users.
|
|
256
|
+
|
|
257
|
+
## Sidebar Navigation
|
|
258
|
+
|
|
259
|
+
Custom pages appear in the CMS sidebar under their feature group. Each page is listed alongside the feature's tables, making them easily discoverable.
|
|
260
|
+
|
|
261
|
+
## Validation
|
|
262
|
+
|
|
263
|
+
The compiler validates page definitions at compile time:
|
|
264
|
+
|
|
265
|
+
- `slug` must start with a lowercase letter and contain only lowercase letters, digits, and hyphens
|
|
266
|
+
- At least one data source is required
|
|
267
|
+
- Every panel's `dataSource` must reference a declared data source
|
|
268
|
+
- Matching rule weights must be between 0 and 1
|
|
269
|
+
- `confidenceThreshold` must be between 0 and 1
|
|
270
|
+
|
|
271
|
+
## Next Steps
|
|
272
|
+
|
|
273
|
+
- **[Dashboard](/stack/cms/dashboard)** — The CMS home page with schema stats
|
|
274
|
+
- **[Components Reference](/stack/cms/components)** — Page-related component details
|
|
275
|
+
- **[Schema Format Reference](/stack/cms/schema-format)** — PageMeta type definition
|