@jskit-ai/agent-docs 0.1.148 → 0.1.150
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/guide/agent/app-setup/existing-application-migration.md +8 -6
- package/guide/agent/app-setup/initial-scaffolding.md +26 -7
- package/guide/agent/app-setup/quickstart.md +9 -6
- package/guide/agent/framework/application-operations.md +91 -0
- package/guide/agent/framework/crud-operations.md +83 -0
- package/guide/agent/framework/material-3.md +112 -0
- package/guide/agent/framework/ui-operations.md +78 -0
- package/guide/agent/index.md +13 -3
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +1 -1
- package/patterns/minimal-foundation/PATTERN.md +5 -0
- package/patterns/minimal-foundation/example/AGENTS.md +8 -8
- package/patterns/minimal-foundation/example/package.json +4 -5
- package/patterns/minimal-foundation/example/vite.config.mjs +0 -1
- package/patterns/shell-foundation/PATTERN.md +5 -0
- package/patterns/shell-foundation/example/AGENTS.md +8 -8
- package/patterns/shell-foundation/example/package.json +5 -6
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/patterns/shell-foundation/example/vite.config.mjs +0 -1
- package/reference/autogen/PATTERN_INDEX.md +61 -61
- package/reference/autogen/tooling/testUtils.md +1 -1
- package/skills/jskit/SKILL.md +8 -5
- package/skills/jskit/references/app-operations.md +12 -11
- package/skills/jskit/references/crud-operations.md +10 -6
- package/skills/jskit/references/existing-application-migration.md +9 -12
- package/skills/jskit/references/material-3.md +2 -0
- package/skills/jskit/references/pattern-index.md +61 -61
- package/skills/jskit/references/patterns/app/minimal-foundation/PATTERN.md +105 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/.nvmrc +1 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/AGENTS.md +17 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/Procfile +2 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/app.json +14 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/bin/develop.js +71 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/bin/server.js +8 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/config/public.js +40 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/config/server.js +1 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/config/surfaceAccessPolicies.js +3 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/eslint.config.mjs +19 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/favicon.svg +7 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/gitignore +9 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/index.html +13 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/jsconfig.json +8 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +62 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/packages/main/package.json +42 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/packages/main/src/shared/index.js +10 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/playwright.config.mjs +31 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/server/lib/runtimeEnv.js +45 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/server/lib/surfaceRuntime.js +10 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/server.js +195 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/App.vue +13 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/main.js +85 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/pages/home/index.vue +48 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/pages/home.vue +13 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/views/NotFound.vue +13 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/tests/client/smoke.vitest.js +7 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/tests/server/smoke.test.js +16 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/vite.config.mjs +80 -0
- package/skills/jskit/references/patterns/app/shell-foundation/PATTERN.md +111 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/.nvmrc +1 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/AGENTS.md +17 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/Procfile +2 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/app.json +14 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/bin/develop.js +71 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/bin/server.js +8 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/config/public.js +40 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/config/server.js +1 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/config/surfaceAccessPolicies.js +3 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/eslint.config.mjs +19 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/favicon.svg +7 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/gitignore +9 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/index.html +13 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/jsconfig.json +8 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +64 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +56 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/src/client/index.js +9 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/src/client/providers/MainClientProvider.js +18 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/src/shared/index.js +10 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/playwright.config.mjs +31 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/server/lib/runtimeEnv.js +45 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/server/lib/surfaceRuntime.js +10 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/server.js +195 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/App.vue +11 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/components/ShellLayout.vue +12 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/components/menus/MenuLinkItem.vue +30 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/components/menus/SurfaceAwareMenuLinkItem.vue +42 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/components/menus/TabLinkItem.vue +42 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/error.js +19 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/main.js +85 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/index.vue +116 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/settings/general/index.vue +40 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/settings/index.vue +7 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/settings.vue +109 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home.vue +20 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/placement.js +56 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/placementTopology.js +149 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/views/NotFound.vue +13 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/tests/client/smoke.vitest.js +7 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/tests/e2e/adaptive-shell.spec.ts +10 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/tests/server/smoke.test.js +16 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/vite.config.mjs +80 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/PATTERN.md +77 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/config/public.js +19 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/config/server.js +9 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/src/pages/admin/assistant/index.vue +7 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/src/pages/admin/settings/assistant/index.vue +7 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/src/placement.js +38 -0
- package/skills/jskit/references/patterns/auth/auth-surface/PATTERN.md +90 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/pages/auth/login.vue +17 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/pages/auth/reset-password.vue +17 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/pages/auth/signout.vue +17 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/runtime/authGuardRuntime.js +7 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/runtime/authHttpClient.js +1 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/runtime/useSignOut.js +1 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/views/auth/LoginView.vue +7 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/views/auth/ResetPasswordView.vue +7 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/views/auth/SignOutView.vue +7 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/tools/preview-identity +5 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/PATTERN.md +67 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/.env.example +4 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/config/server.js +11 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +7 -0
- package/skills/jskit/references/patterns/console/console-surface/PATTERN.md +58 -0
- package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console/index.vue +62 -0
- package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console/settings/index.vue +17 -0
- package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console/settings.vue +95 -0
- package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console.vue +20 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/PATTERN.md +88 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookEditPage.vue +54 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookFormFields.vue +52 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookListPage.vue +54 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookNewPage.vue +45 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookViewPage.vue +50 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/formFields.js +31 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/listExtensions.js +9 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/PATTERN.md +160 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/migrations/20260815000000_books.cjs +22 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/package.json +41 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/src/server/BooksFeature.js +13 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/src/shared/bookResource.js +83 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/src/shared/index.js +1 -0
- package/skills/jskit/references/patterns/crud/resource-contract/PATTERN.md +102 -0
- package/skills/jskit/references/patterns/crud/resource-contract/example/bookResource.js +87 -0
- package/skills/jskit/references/patterns/database/mysql-application/PATTERN.md +80 -0
- package/skills/jskit/references/patterns/database/mysql-application/example/.env.example +5 -0
- package/skills/jskit/references/patterns/database/mysql-application/example/.github/workflows/verify.yml +39 -0
- package/skills/jskit/references/patterns/database/mysql-application/example/knexfile.js +11 -0
- package/skills/jskit/references/patterns/database/mysql-application/example/package.json +13 -0
- package/skills/jskit/references/patterns/database/mysql-application/example/scripts/prepare-database.js +3 -0
- package/skills/jskit/references/patterns/database/postgres-application/PATTERN.md +80 -0
- package/skills/jskit/references/patterns/database/postgres-application/example/.env.example +5 -0
- package/skills/jskit/references/patterns/database/postgres-application/example/.github/workflows/verify.yml +38 -0
- package/skills/jskit/references/patterns/database/postgres-application/example/knexfile.js +11 -0
- package/skills/jskit/references/patterns/database/postgres-application/example/package.json +13 -0
- package/skills/jskit/references/patterns/database/postgres-application/example/scripts/prepare-database.js +3 -0
- package/skills/jskit/references/patterns/mobile/android-application/PATTERN.md +71 -0
- package/skills/jskit/references/patterns/mobile/android-application/example/capacitor.config.json +10 -0
- package/skills/jskit/references/patterns/realtime/realtime-application/PATTERN.md +69 -0
- package/skills/jskit/references/patterns/realtime/realtime-application/example/.env.example +1 -0
- package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +8 -0
- package/skills/jskit/references/patterns/realtime/realtime-application/example/src/placement.js +17 -0
- package/skills/jskit/references/patterns/server/feature-package/PATTERN.md +108 -0
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +48 -0
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/src/server/BookingEngineProvider.js +33 -0
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/src/server/actions.js +26 -0
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/src/server/inputSchemas.js +19 -0
- package/skills/jskit/references/patterns/server/feature-package/example/variations/AvailabilityEngineProvider.js +31 -0
- package/skills/jskit/references/patterns/server/feature-package/example/variations/InvoiceRollupProvider.js +36 -0
- package/skills/jskit/references/patterns/server/feature-package/example/variations/customKnexRepository.js +34 -0
- package/skills/jskit/references/patterns/server/feature-package/example/variations/orchestratorService.js +23 -0
- package/skills/jskit/references/patterns/shell/application-shell/PATTERN.md +66 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/expected-existing/src/App.vue +13 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/expected-existing/src/pages/home/index.vue +48 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/expected-existing/src/pages/home.vue +13 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/App.vue +11 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/components/ShellLayout.vue +13 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/components/menus/MenuLinkItem.vue +30 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/components/menus/SurfaceAwareMenuLinkItem.vue +42 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/components/menus/TabLinkItem.vue +42 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/error.js +19 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/index.vue +106 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/settings/general/index.vue +40 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/settings/index.vue +7 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/settings.vue +109 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home.vue +20 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/placement.js +56 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/placementTopology.js +149 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/tests/e2e/adaptive-shell.spec.ts +10 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/PATTERN.md +76 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/packages/main/src/client/providers/MainClientProvider.js +14 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/components/SyncStatusElement.vue +16 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports/activity.vue +8 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports/index.vue +7 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports/overview.vue +8 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports.vue +33 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/placement.js +52 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/placementTopology.js +29 -0
- package/skills/jskit/references/patterns/users/account-settings/PATTERN.md +61 -0
- package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsNotificationsSection.vue +81 -0
- package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsPreferencesSection.vue +151 -0
- package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsProfileSection.vue +120 -0
- package/skills/jskit/references/patterns/users/account-settings/example/src/pages/account/index.vue +17 -0
- package/skills/jskit/references/patterns/users/user-administration-server/PATTERN.md +64 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +42 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/src/server/UsersFeature.js +13 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/src/shared/index.js +1 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/src/shared/userResource.js +69 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +43 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/src/server/UsersWorkspaceFeature.js +22 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/src/shared/index.js +1 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/src/shared/userResource.js +56 -0
- package/skills/jskit/references/patterns/workspaces/workspace-server/PATTERN.md +60 -0
- package/skills/jskit/references/patterns/workspaces/workspace-server/example/config/roles.js +27 -0
- package/skills/jskit/references/patterns/workspaces/workspace-server/example/packages/main/src/server/email/workspaceInviteEmail.js +23 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/PATTERN.md +63 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/packages/main/src/client/components/AccountPendingInvitesCue.vue +106 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/packages/main/src/client/components/AccountSettingsInvitesSection.vue +7 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/components/WorkspaceNotFoundCard.vue +53 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/composables/useWorkspaceNotFoundState.js +41 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/pages/admin/members/index.vue +7 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/pages/admin/workspace/settings/index.vue +23 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/pages/admin/workspace/settings.vue +95 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/pages/invite/[token].vue +7 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/surfaces/admin/index.vue +85 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/surfaces/admin/root.vue +20 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/surfaces/app/index.vue +46 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/surfaces/app/root.vue +20 -0
- package/skills/jskit/references/ui-operations.md +5 -3
- package/templates/app/AGENTS.md +8 -8
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: auth/auth-surface
|
|
3
|
+
title: Authentication surface
|
|
4
|
+
summary: Compose JSKIT authentication routes, views, profile controls, and public surface configuration without generated source.
|
|
5
|
+
keywords: account, auth, login, logout, password, placement, profile, reset, surface
|
|
6
|
+
requires: @jskit-ai/auth-core, @jskit-ai/auth-web, @jskit-ai/shell-web
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Authentication surface
|
|
10
|
+
|
|
11
|
+
## Use when
|
|
12
|
+
|
|
13
|
+
Use this pattern when an application needs browser login, sign-out, password
|
|
14
|
+
reset, and authenticated profile controls through JSKIT's auth runtime.
|
|
15
|
+
|
|
16
|
+
## Do not use when
|
|
17
|
+
|
|
18
|
+
Do not use this pattern for an API-only service, an application that delegates
|
|
19
|
+
all authentication UI to another product, or a second auth stack beside JSKIT.
|
|
20
|
+
|
|
21
|
+
## Product decisions
|
|
22
|
+
|
|
23
|
+
Choose the auth provider, permitted login methods, public routes, post-login
|
|
24
|
+
destination, account language, and which profile actions belong in the shell.
|
|
25
|
+
Those choices must be known before adapting the example.
|
|
26
|
+
|
|
27
|
+
## Framework APIs
|
|
28
|
+
|
|
29
|
+
Use the views, auth guard, HTTP client integration, sign-out runtime, providers,
|
|
30
|
+
and Playwright auth helper exported by `@jskit-ai/auth-web`. Use auth policies
|
|
31
|
+
from `@jskit-ai/auth-core` for server authorization.
|
|
32
|
+
|
|
33
|
+
For a managed preview, copy the app-owned `tools/preview-identity` executable
|
|
34
|
+
and declare it under `#### Preview identity` in the project's web-presented
|
|
35
|
+
Vibe64 `Outputs` target with protocol `vibe64.preview-identity.command.v1`.
|
|
36
|
+
Declare `AUTH_DEV_BYPASS_ENABLED` as its Enabled environment and
|
|
37
|
+
`AUTH_DEV_BYPASS_SECRET` as its Secret environment so the preview host supplies
|
|
38
|
+
fresh output-run-scoped values; users do not set those values by hand. JSKIT
|
|
39
|
+
owns this executable/library pattern, Vibe64 owns the `Outputs` grammar and
|
|
40
|
+
runtime behavior, and Genesis only composes that consumer-owned section as
|
|
41
|
+
opaque text. The executable calls the exported managed-preview identity library
|
|
42
|
+
directly; it does not require a JSKIT CLI.
|
|
43
|
+
|
|
44
|
+
Choose local-auth storage through the installed capability provider. A
|
|
45
|
+
database-backed application installs `@jskit-ai/auth-provider-local-db-core`,
|
|
46
|
+
which provides `auth.local.backend`; no environment switch selects it. When no
|
|
47
|
+
backend package provides that capability, local auth deliberately uses its file
|
|
48
|
+
store. Managed preview selectors name an existing auth-backend user whose
|
|
49
|
+
application profile already exists; preview identity never creates or projects
|
|
50
|
+
a user as a side effect.
|
|
51
|
+
|
|
52
|
+
## Invariants
|
|
53
|
+
|
|
54
|
+
- Credentials and provider secrets come from environment values.
|
|
55
|
+
- Auth backend selection comes from the installed provider graph, not an
|
|
56
|
+
`AUTH_LOCAL_BACKEND` environment value.
|
|
57
|
+
- The selected auth backend and the storage containing the application's users
|
|
58
|
+
agree before registration, login, session bootstrap, or preview identity is
|
|
59
|
+
exercised.
|
|
60
|
+
- Public auth routes do not require an existing session.
|
|
61
|
+
- Protected routes use the framework auth policy rather than page-local checks.
|
|
62
|
+
- Login, sign-out, and reset views use the public auth components/composables.
|
|
63
|
+
- Profile placements are conditional on the current authenticated state.
|
|
64
|
+
- Transient mutation failures use the application toast; initial load failures
|
|
65
|
+
remain in the affected surface.
|
|
66
|
+
|
|
67
|
+
## Example files
|
|
68
|
+
|
|
69
|
+
`example/` contains concrete route wrappers, editable view wrappers, and the
|
|
70
|
+
client runtime helpers needed by an authentication surface. It also contains
|
|
71
|
+
the optional app-owned managed-preview identity executable. Compose their
|
|
72
|
+
surface and placement declarations into the application's ordinary config and
|
|
73
|
+
placement files.
|
|
74
|
+
|
|
75
|
+
## Variation points
|
|
76
|
+
|
|
77
|
+
Change provider, routes, labels, page wrappers, permitted login methods, profile
|
|
78
|
+
placements, and post-auth destinations while retaining the runtime contracts.
|
|
79
|
+
|
|
80
|
+
## Verification
|
|
81
|
+
|
|
82
|
+
Exercise failed and successful login, sign-out, reset, protected navigation,
|
|
83
|
+
keyboard interaction, warm-cache return navigation, and browser refresh.
|
|
84
|
+
|
|
85
|
+
## Avoid
|
|
86
|
+
|
|
87
|
+
- storing credentials in source
|
|
88
|
+
- copying auth repositories or session mechanics into the app
|
|
89
|
+
- redirect loops between public and protected surfaces
|
|
90
|
+
- generator commands, mutation metadata, or setup receipts
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<route lang="json">
|
|
2
|
+
{
|
|
3
|
+
"meta": {
|
|
4
|
+
"guard": {
|
|
5
|
+
"policy": "public"
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
</route>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import DefaultLoginView from "@jskit-ai/auth-web/client/views/DefaultLoginView";
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<DefaultLoginView />
|
|
17
|
+
</template>
|
package/skills/jskit/references/patterns/auth/auth-surface/example/src/pages/auth/reset-password.vue
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<route lang="json">
|
|
2
|
+
{
|
|
3
|
+
"meta": {
|
|
4
|
+
"guard": {
|
|
5
|
+
"policy": "public"
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
</route>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import DefaultResetPasswordView from "@jskit-ai/auth-web/client/views/DefaultResetPasswordView";
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<DefaultResetPasswordView />
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<route lang="json">
|
|
2
|
+
{
|
|
3
|
+
"meta": {
|
|
4
|
+
"guard": {
|
|
5
|
+
"policy": "public"
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
</route>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import DefaultSignOutView from "@jskit-ai/auth-web/client/views/DefaultSignOutView";
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<DefaultSignOutView />
|
|
17
|
+
</template>
|
package/skills/jskit/references/patterns/auth/auth-surface/example/src/runtime/authHttpClient.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { authHttpRequest, clearAuthCsrfTokenCache } from "@jskit-ai/auth-web/client/runtime/authHttpClient";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useSignOut, createSignOutAction, performSignOutRequest } from "@jskit-ai/auth-web/client/runtime/useSignOut";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: auth/supabase-auth
|
|
3
|
+
title: Supabase authentication
|
|
4
|
+
summary: Add Supabase authentication through normal npm composition, explicit environment values, and app-owned auth policy.
|
|
5
|
+
keywords: auth, authentication, oauth, sessions, supabase
|
|
6
|
+
requires: @jskit-ai/auth-provider-supabase-core
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Supabase authentication
|
|
10
|
+
|
|
11
|
+
## Use when
|
|
12
|
+
|
|
13
|
+
Use this pattern when the product deliberately chooses Supabase as its identity
|
|
14
|
+
provider. Install the runtime package normally and configure the application
|
|
15
|
+
environment and visible OAuth providers explicitly.
|
|
16
|
+
|
|
17
|
+
## Do not use when
|
|
18
|
+
|
|
19
|
+
Do not use this pattern for local credential storage, a custom identity
|
|
20
|
+
provider, or an application whose authentication decision is still open.
|
|
21
|
+
|
|
22
|
+
## Product decisions
|
|
23
|
+
|
|
24
|
+
Decide the public application URL, allowed sign-in methods, visible OAuth
|
|
25
|
+
providers, callback URLs, account-linking policy, and where deployment secrets
|
|
26
|
+
live. Obtain the project URL and publishable key from the selected Supabase
|
|
27
|
+
project.
|
|
28
|
+
|
|
29
|
+
## Invariants
|
|
30
|
+
|
|
31
|
+
- Secrets and environment-specific values stay outside committed source.
|
|
32
|
+
- The application owns auth/profile and OAuth visibility policy.
|
|
33
|
+
- The installed runtime package supplies the provider implementation and its
|
|
34
|
+
npm dependency closure.
|
|
35
|
+
- No setup questionnaire or source mutation is required.
|
|
36
|
+
|
|
37
|
+
## Framework APIs
|
|
38
|
+
|
|
39
|
+
Use `@jskit-ai/auth-provider-supabase-core` for the provider and
|
|
40
|
+
`@jskit-ai/auth-core` policy contracts. Configure `config.auth` through the
|
|
41
|
+
application's ordinary server configuration.
|
|
42
|
+
|
|
43
|
+
## Example files
|
|
44
|
+
|
|
45
|
+
`example/package.json` declares the selected provider. `example/.env.example`
|
|
46
|
+
names required environment inputs without credentials. `example/config/server.js`
|
|
47
|
+
shows the app-owned profile and OAuth visibility decisions.
|
|
48
|
+
|
|
49
|
+
## Variation points
|
|
50
|
+
|
|
51
|
+
Change the OAuth provider list, default provider, profile projection mode,
|
|
52
|
+
public URL, and deployment secret source. Compose account/profile packages only
|
|
53
|
+
when the product needs their behavior.
|
|
54
|
+
|
|
55
|
+
## Verification
|
|
56
|
+
|
|
57
|
+
- Start the application with missing values and confirm concise diagnostics.
|
|
58
|
+
- Complete sign-in, callback, refresh, sign-out, and rejected-session cases.
|
|
59
|
+
- Verify allowed redirect origins and negative cross-origin behavior.
|
|
60
|
+
- Run the application auth and browser tests.
|
|
61
|
+
|
|
62
|
+
## Avoid
|
|
63
|
+
|
|
64
|
+
- committing provider keys
|
|
65
|
+
- silently selecting Supabase for the user
|
|
66
|
+
- generated configuration fragments with hidden overwrite rules
|
|
67
|
+
- setup receipts, provenance, replay logs, or questionnaire answers
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: console/console-surface
|
|
3
|
+
title: Owner console surface
|
|
4
|
+
summary: Add a protected administration surface, settings shell, and semantic navigation through JSKIT console and shell APIs.
|
|
5
|
+
keywords: admin, console, navigation, owner, placement, settings, surface
|
|
6
|
+
requires: @jskit-ai/console-core, @jskit-ai/console-web, @jskit-ai/shell-web
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Owner console surface
|
|
10
|
+
|
|
11
|
+
## Use when
|
|
12
|
+
|
|
13
|
+
Use this pattern for a separate owner-only or operator-only application surface.
|
|
14
|
+
|
|
15
|
+
## Do not use when
|
|
16
|
+
|
|
17
|
+
Do not create a separate console merely for one settings page or when normal
|
|
18
|
+
workspace roles already express the required access boundary.
|
|
19
|
+
|
|
20
|
+
## Product decisions
|
|
21
|
+
|
|
22
|
+
Choose who can enter the console, its route and label, which settings sections
|
|
23
|
+
it owns, and how authorized users switch to and from it.
|
|
24
|
+
|
|
25
|
+
## Framework APIs
|
|
26
|
+
|
|
27
|
+
Use `@jskit-ai/console-core` for console capabilities,
|
|
28
|
+
`@jskit-ai/console-web` for the web provider, and JSKIT shell surface,
|
|
29
|
+
placement, and topology APIs for application composition.
|
|
30
|
+
|
|
31
|
+
## Invariants
|
|
32
|
+
|
|
33
|
+
- Server policy enforces console access before application actions run.
|
|
34
|
+
- The surface definition and route pages use the same surface id.
|
|
35
|
+
- The profile switch is visible only to authorized authenticated users.
|
|
36
|
+
- Settings navigation uses semantic placements and responsive topology.
|
|
37
|
+
- Loading screens use skeletons and do not shift the surrounding shell.
|
|
38
|
+
|
|
39
|
+
## Example files
|
|
40
|
+
|
|
41
|
+
`example/` contains concrete console root, landing, and settings routes. Adapt
|
|
42
|
+
them together with the surface policy and placement examples described here.
|
|
43
|
+
|
|
44
|
+
## Variation points
|
|
45
|
+
|
|
46
|
+
Change the surface id, access policy, settings hierarchy, routes, labels, icons,
|
|
47
|
+
and switch placement to fit the product's administration model.
|
|
48
|
+
|
|
49
|
+
## Verification
|
|
50
|
+
|
|
51
|
+
Test forbidden and authorized entry, switching between surfaces, direct route
|
|
52
|
+
loads, compact navigation, settings navigation, and production build output.
|
|
53
|
+
|
|
54
|
+
## Avoid
|
|
55
|
+
|
|
56
|
+
- treating a hidden navigation item as authorization
|
|
57
|
+
- sharing normal-user pages merely by changing their route prefix
|
|
58
|
+
- generator ownership or appended source fragments
|
package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console/index.vue
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="console-home-screen d-flex flex-column ga-4">
|
|
3
|
+
<header class="console-home-screen__header">
|
|
4
|
+
<div>
|
|
5
|
+
<p class="text-overline text-medium-emphasis mb-1">Console</p>
|
|
6
|
+
<h1 class="console-home-screen__title">Operations Console</h1>
|
|
7
|
+
<p class="text-body-2 text-medium-emphasis mb-0">Operator tools, scripts, and diagnostics.</p>
|
|
8
|
+
</div>
|
|
9
|
+
<v-btn color="primary" variant="flat" to="/home">Back to home</v-btn>
|
|
10
|
+
</header>
|
|
11
|
+
|
|
12
|
+
<v-sheet rounded="lg" border class="console-home-screen__panel">
|
|
13
|
+
<div class="console-home-screen__status-row">
|
|
14
|
+
<v-chip color="secondary" variant="tonal" label>Route: /console</v-chip>
|
|
15
|
+
<v-chip color="info" variant="tonal" label>Surface status: enabled</v-chip>
|
|
16
|
+
</div>
|
|
17
|
+
<p class="text-body-2 text-medium-emphasis mb-0">
|
|
18
|
+
Use this surface for operator actions and technical insights that should stay out of the end-user app.
|
|
19
|
+
</p>
|
|
20
|
+
</v-sheet>
|
|
21
|
+
</section>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<style scoped>
|
|
25
|
+
.console-home-screen__header {
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 1rem;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.console-home-screen__title {
|
|
33
|
+
font-size: clamp(1.5rem, 2.5vw, 2.25rem);
|
|
34
|
+
font-weight: 700;
|
|
35
|
+
letter-spacing: -0.03em;
|
|
36
|
+
line-height: 1.1;
|
|
37
|
+
margin: 0 0 0.4rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.console-home-screen__panel {
|
|
41
|
+
display: grid;
|
|
42
|
+
gap: 1rem;
|
|
43
|
+
padding: 1rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.console-home-screen__status-row {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-wrap: wrap;
|
|
49
|
+
gap: 0.5rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@media (max-width: 640px) {
|
|
53
|
+
.console-home-screen__header {
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.console-home-screen__header :deep(.v-btn) {
|
|
58
|
+
min-height: 48px;
|
|
59
|
+
width: 100%;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="console-settings-empty">
|
|
3
|
+
<h2 class="text-h6 mb-2">No console settings yet</h2>
|
|
4
|
+
<p class="text-body-2 text-medium-emphasis mb-0">
|
|
5
|
+
Console settings sections will appear here when installed.
|
|
6
|
+
</p>
|
|
7
|
+
</section>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<style scoped>
|
|
11
|
+
.console-settings-empty {
|
|
12
|
+
margin-inline: auto;
|
|
13
|
+
max-width: 34rem;
|
|
14
|
+
padding: 2rem 1.25rem;
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ShellOutlet from "@jskit-ai/shell-web/client/components/ShellOutlet";
|
|
3
|
+
import { RouterView } from "vue-router";
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<section class="settings-shell d-flex flex-column ga-4">
|
|
8
|
+
<header>
|
|
9
|
+
<p class="text-overline text-medium-emphasis mb-1">Console</p>
|
|
10
|
+
<h1 class="settings-shell__title">Console settings</h1>
|
|
11
|
+
<p class="text-body-2 text-medium-emphasis mb-0">Global configuration and reference data for the whole app.</p>
|
|
12
|
+
</header>
|
|
13
|
+
|
|
14
|
+
<v-sheet rounded="lg" border class="settings-shell__panel">
|
|
15
|
+
<nav class="settings-shell__nav" aria-label="Console settings sections">
|
|
16
|
+
<v-list nav density="compact" class="settings-shell__nav-list">
|
|
17
|
+
<ShellOutlet target="console-settings:primary-menu" />
|
|
18
|
+
</v-list>
|
|
19
|
+
</nav>
|
|
20
|
+
<main class="settings-shell__content">
|
|
21
|
+
<RouterView />
|
|
22
|
+
</main>
|
|
23
|
+
</v-sheet>
|
|
24
|
+
</section>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<style scoped>
|
|
28
|
+
.settings-shell__title {
|
|
29
|
+
font-size: clamp(1.35rem, 2vw, 1.85rem);
|
|
30
|
+
font-weight: 650;
|
|
31
|
+
letter-spacing: -0.02em;
|
|
32
|
+
line-height: 1.15;
|
|
33
|
+
margin: 0 0 0.35rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.settings-shell__panel {
|
|
37
|
+
display: grid;
|
|
38
|
+
gap: 1rem;
|
|
39
|
+
grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
|
|
40
|
+
padding: 1rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.settings-shell__nav-list {
|
|
44
|
+
padding: 0.35rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.settings-shell__nav-list :deep(.v-list-item) {
|
|
48
|
+
min-height: 48px;
|
|
49
|
+
padding-inline: 0.6rem 0.7rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.settings-shell__nav-list :deep(.v-list-item__prepend) {
|
|
53
|
+
margin-inline-end: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.settings-shell__nav-list :deep(.v-list-item__spacer) {
|
|
57
|
+
min-width: 0.5rem;
|
|
58
|
+
width: 0.5rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.settings-shell__nav-list :deep(.v-list-item-title) {
|
|
62
|
+
line-height: 1.2;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.settings-shell__content {
|
|
66
|
+
border-left: 1px solid rgba(var(--v-theme-on-surface), 0.18);
|
|
67
|
+
min-width: 0;
|
|
68
|
+
padding-left: 1rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media (max-width: 960px) {
|
|
72
|
+
.settings-shell__panel {
|
|
73
|
+
grid-template-columns: 1fr;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.settings-shell__nav {
|
|
77
|
+
overflow-x: auto;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.settings-shell__nav-list {
|
|
81
|
+
display: flex;
|
|
82
|
+
gap: 0.25rem;
|
|
83
|
+
min-width: max-content;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.settings-shell__nav-list :deep(.v-list-item) {
|
|
87
|
+
min-height: 48px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.settings-shell__content {
|
|
91
|
+
border-left: 0;
|
|
92
|
+
padding-left: 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</style>
|
package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console.vue
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<route lang="json">
|
|
2
|
+
{
|
|
3
|
+
"meta": {
|
|
4
|
+
"jskit": {
|
|
5
|
+
"surface": "console"
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
</route>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import ShellLayout from "@/components/ShellLayout.vue";
|
|
13
|
+
import { RouterView } from "vue-router";
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<ShellLayout title="" subtitle="">
|
|
18
|
+
<RouterView />
|
|
19
|
+
</ShellLayout>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: crud/crud-screen-set
|
|
3
|
+
title: CRUD list, view, create, and edit screens
|
|
4
|
+
summary: Build a routed CRUD user interface as thin application pages over JSKIT's shared screen components and composables.
|
|
5
|
+
keywords: actions, add, crud, delete, edit, filters, list, material, routes, view, vue
|
|
6
|
+
requires: @jskit-ai/http-web, @jskit-ai/resource-crud-core
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# CRUD list, view, create, and edit screens
|
|
10
|
+
|
|
11
|
+
## Use when
|
|
12
|
+
|
|
13
|
+
Use this pattern when a shared CRUD resource should have normal list, detail,
|
|
14
|
+
create, edit, and delete routes. The shared JSKIT screens own responsive chrome,
|
|
15
|
+
loading skeletons, load-error retry states, mutation feedback, route-aware data
|
|
16
|
+
operations, and common extensions. Application pages supply product copy,
|
|
17
|
+
fields, routes, and optional actions.
|
|
18
|
+
|
|
19
|
+
## Do not use when
|
|
20
|
+
|
|
21
|
+
Do not use this pattern for a one-off command, an embedded read-only value, or a
|
|
22
|
+
domain whose operations are not CRUD. Do not replace the shared screens simply
|
|
23
|
+
to add filters, row actions, bulk actions, permission gating, includes, or
|
|
24
|
+
supporting detail content; those are public extension seams.
|
|
25
|
+
|
|
26
|
+
## Product decisions
|
|
27
|
+
|
|
28
|
+
Decide which operations exist, the route hierarchy, record title, visible
|
|
29
|
+
fields, create/edit participation, destructive confirmation language, access
|
|
30
|
+
surface, filters, and domain actions. The resource contract and product intent
|
|
31
|
+
are authoritative. Do not derive these decisions from a live table or a field
|
|
32
|
+
questionnaire.
|
|
33
|
+
|
|
34
|
+
## Invariants
|
|
35
|
+
|
|
36
|
+
- Route pages stay thin and use `useCrudListScreen()`, `useCrudViewScreen()`,
|
|
37
|
+
or `useCrudAddEditScreen()`.
|
|
38
|
+
- Transport and validators come from the shared resource contract.
|
|
39
|
+
- Initial visible loading uses structure-matching skeletons; pending buttons use
|
|
40
|
+
stable disabled labels, never spinners.
|
|
41
|
+
- Resource-load errors stay inside the screen with retry. Command success and
|
|
42
|
+
failure use JSKIT's shared toast/snackbar feedback path.
|
|
43
|
+
- URLs are route templates or route objects resolved through the screen runtime.
|
|
44
|
+
- Product field components are ordinary application source.
|
|
45
|
+
- Query keys and placement sources describe the resource, not an authoring tool.
|
|
46
|
+
- No generated-file markers, overwrite contracts, receipts, or provenance remain.
|
|
47
|
+
|
|
48
|
+
## Framework APIs
|
|
49
|
+
|
|
50
|
+
Use `CrudListScreen`, `CrudViewScreen`, `CrudAddEditScreen`, and
|
|
51
|
+
`CrudDeleteAction` with their matching composables from `@jskit-ai/http-web`.
|
|
52
|
+
Use `defineCrudListFilters()`, `defineCrudListRowActions()`, and
|
|
53
|
+
`defineCrudListBulkActions()` for optional list extensions. The resource comes
|
|
54
|
+
from `defineCrudResource()` in `@jskit-ai/resource-crud-core`.
|
|
55
|
+
|
|
56
|
+
## Example files
|
|
57
|
+
|
|
58
|
+
`example/books/` contains concrete list, view, new, and edit pages for the
|
|
59
|
+
owner-scoped `bookResource` pattern. `BookFormFields.vue` and `formFields.js`
|
|
60
|
+
show the small product-owned form seam. `listExtensions.js` makes optional
|
|
61
|
+
filters and actions explicit without adding empty screen machinery elsewhere.
|
|
62
|
+
|
|
63
|
+
## Variation points
|
|
64
|
+
|
|
65
|
+
Change routes, labels, visible fields, field components, filters, query params,
|
|
66
|
+
realtime events, delete availability, and action definitions. Use the screen
|
|
67
|
+
slots for domain-specific content. Use a lower-level request composable only
|
|
68
|
+
when the wire contract genuinely is not CRUD.
|
|
69
|
+
|
|
70
|
+
## Verification
|
|
71
|
+
|
|
72
|
+
- Mount each route with a representative resource response.
|
|
73
|
+
- Verify skeleton, empty, success, local load-error, and retry states.
|
|
74
|
+
- Verify create, edit, validation failure, delete confirmation, and navigation.
|
|
75
|
+
- Verify filters and actions when declared.
|
|
76
|
+
- Exercise compact, medium, and expanded widths with Playwright.
|
|
77
|
+
- Confirm keyboard access, 48 CSS-pixel compact targets, no horizontal overflow,
|
|
78
|
+
and toast-based mutation feedback.
|
|
79
|
+
|
|
80
|
+
## Avoid
|
|
81
|
+
|
|
82
|
+
- route-local `fetch()` or duplicated request serializers
|
|
83
|
+
- copying shared screen chrome into every route
|
|
84
|
+
- spinner or circular-progress loading states
|
|
85
|
+
- transient in-page command-error banners that push the layout
|
|
86
|
+
- generator-branded CSS classes, cache keys, or placement ids
|
|
87
|
+
- comments or metadata reserving fields for a future authoring command
|
|
88
|
+
- a second source of truth for resource field validation
|