rcf-lite 0.12.0 → 0.14.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/CHANGELOG.md +39 -0
- package/README.md +2 -0
- package/bin/rcf.js +3 -1
- package/bin/view-supervisor-child.mjs +0 -0
- package/blueprints/application-api-rest/README.md +40 -0
- package/blueprints/application-api-rest/assets/middleware/auth-classes.md +45 -0
- package/blueprints/application-api-rest/assets/openapi/openapi-skeleton.yaml +322 -0
- package/blueprints/application-api-rest/assets/sample-data/sample-resources.json +53 -0
- package/blueprints/application-api-rest/assets/samples/request-response-pairs.md +204 -0
- package/blueprints/application-api-rest/blueprint.json +265 -0
- package/blueprints/application-api-rest/contributions/adrs/adr-301-application-api-rest-error-envelope.json +25 -0
- package/blueprints/application-api-rest/contributions/adrs/adr-302-application-api-rest-auth-model.json +25 -0
- package/blueprints/application-api-rest/contributions/adrs/adr-303-application-api-rest-api-versioning.json +25 -0
- package/blueprints/application-api-rest/contributions/adrs/adr-304-application-api-rest-logging.json +25 -0
- package/blueprints/application-api-rest/contributions/adrs/adr-305-application-api-rest-pagination.json +25 -0
- package/blueprints/application-api-rest/contributions/adrs/adr-306-application-api-rest-idempotency.json +25 -0
- package/blueprints/application-api-rest/contributions/adrs/adr-307-application-api-rest-openapi-generation.json +25 -0
- package/blueprints/application-api-rest/contributions/adrs/adr-308-application-api-rest-rate-limiting.json +25 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-001.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-002.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-003.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-004.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-005.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-006.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-007.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-008.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-009.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-010.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-011.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-012.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-013.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-014.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-015.json +18 -0
- package/blueprints/application-api-rest/contributions/requirements/application-api-rest-req-016.json +18 -0
- package/blueprints/application-api-rest/contributions/tacs/tac-301-application-api-rest-request-pipeline.json +48 -0
- package/blueprints/application-api-rest/contributions/tacs/tac-302-application-api-rest-auth-middleware.json +41 -0
- package/blueprints/application-api-rest/contributions/tacs/tac-303-application-api-rest-contract-surface.json +46 -0
- package/blueprints/application-api-rest/contributions/tacs/tac-304-application-api-rest-resource-layer.json +46 -0
- package/blueprints/application-api-rest/contributions/tacs/tac-305-application-api-rest-observability.json +40 -0
- package/blueprints/application-api-rest/contributions/tacs/tac-306-application-api-rest-operability.json +46 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2101.json +72 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2102.json +73 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2103.json +63 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2104.json +72 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2105.json +63 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2106.json +73 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2107.json +90 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2108.json +90 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2109.json +72 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2110.json +72 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2111.json +72 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2112.json +72 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2113.json +73 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2114.json +63 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2115.json +63 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2116.json +63 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2117.json +64 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2118.json +72 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2119.json +63 -0
- package/blueprints/application-api-rest/contributions/user-stories/application-api-rest-us-2120.json +73 -0
- package/blueprints/application-api-rest/docs/topics.md +46 -0
- package/blueprints/application-api-rest/guide/application-api-rest.md +41 -0
- package/blueprints/application-spa/README.md +90 -0
- package/blueprints/application-spa/assets/component-specs/actions-and-text-inputs.md +36 -0
- package/blueprints/application-spa/assets/component-specs/data-display.md +19 -0
- package/blueprints/application-spa/assets/component-specs/feedback-and-status.md +27 -0
- package/blueprints/application-spa/assets/component-specs/overlays.md +23 -0
- package/blueprints/application-spa/assets/component-specs/selection-controls.md +23 -0
- package/blueprints/application-spa/assets/sample-data/sample-entities.json +41 -0
- package/blueprints/application-spa/assets/tokens/design-tokens.json +140 -0
- package/blueprints/application-spa/assets/tokens/theme.css +169 -0
- package/blueprints/application-spa/assets/viewports.md +18 -0
- package/blueprints/application-spa/assets/wireframes/dashboard.md +48 -0
- package/blueprints/application-spa/assets/wireframes/detail.md +40 -0
- package/blueprints/application-spa/assets/wireframes/empty.md +31 -0
- package/blueprints/application-spa/assets/wireframes/error.md +46 -0
- package/blueprints/application-spa/assets/wireframes/form.md +50 -0
- package/blueprints/application-spa/assets/wireframes/list.md +45 -0
- package/blueprints/application-spa/assets/wireframes/session-expired.md +35 -0
- package/blueprints/application-spa/assets/wireframes/sign-in.md +41 -0
- package/blueprints/application-spa/assets/wireframes/sign-out.md +32 -0
- package/blueprints/application-spa/blueprint.json +387 -0
- package/blueprints/application-spa/contributions/adrs/adr-201-application-spa-routing.json +25 -0
- package/blueprints/application-spa/contributions/adrs/adr-202-application-spa-theming.json +25 -0
- package/blueprints/application-spa/contributions/adrs/adr-203-application-spa-client-state.json +25 -0
- package/blueprints/application-spa/contributions/adrs/adr-204-application-spa-error-envelope.json +25 -0
- package/blueprints/application-spa/contributions/adrs/adr-205-application-spa-auth-model.json +25 -0
- package/blueprints/application-spa/contributions/adrs/adr-206-application-spa-iconography.json +13 -0
- package/blueprints/application-spa/contributions/adrs/adr-207-application-spa-motion.json +13 -0
- package/blueprints/application-spa/contributions/adrs/adr-208-application-spa-i18n.json +13 -0
- package/blueprints/application-spa/contributions/adrs/adr-209-application-spa-telemetry-naming.json +13 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-001.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-002.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-003.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-004.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-005.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-006.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-007.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-008.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-009.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-010.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-011.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-012.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-013.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-014.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-015.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-016.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-017.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-018.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-019.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-020.json +18 -0
- package/blueprints/application-spa/contributions/requirements/application-spa-req-021.json +18 -0
- package/blueprints/application-spa/contributions/tacs/tac-201-application-spa-app-shell.json +45 -0
- package/blueprints/application-spa/contributions/tacs/tac-202-application-spa-theme-system.json +32 -0
- package/blueprints/application-spa/contributions/tacs/tac-203-application-spa-component-library.json +32 -0
- package/blueprints/application-spa/contributions/tacs/tac-204-application-spa-client-data-layer.json +27 -0
- package/blueprints/application-spa/contributions/tacs/tac-205-application-spa-forms-engine.json +27 -0
- package/blueprints/application-spa/contributions/tacs/tac-206-application-spa-telemetry.json +19 -0
- package/blueprints/application-spa/contributions/tacs/tac-207-application-spa-token-adherence-probe.json +57 -0
- package/blueprints/application-spa/contributions/tacs/tac-208-application-spa-icon-adherence-probe.json +56 -0
- package/blueprints/application-spa/contributions/tacs/tac-209-application-spa-csp-styled-adherence-probe.json +61 -0
- package/blueprints/application-spa/contributions/tacs/tac-210-application-spa-external-dependency-provisioning-probe.json +70 -0
- package/blueprints/application-spa/contributions/tacs/tac-211-application-spa-core-flow-e2e-probe.json +70 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1101.json +72 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1102.json +63 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1103.json +72 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1104.json +63 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1105.json +69 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1106.json +63 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1107.json +63 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1108.json +90 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1109.json +90 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1110.json +100 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1111.json +90 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1112.json +81 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1113.json +82 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1114.json +60 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1115.json +73 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1116.json +72 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1117.json +73 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1118.json +54 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1119.json +63 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1120.json +72 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1121.json +73 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1122.json +69 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1123.json +63 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1124.json +60 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1125.json +69 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1126.json +78 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1127.json +63 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1128.json +51 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1129.json +54 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1130.json +54 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1131.json +72 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1132.json +72 -0
- package/blueprints/application-spa/contributions/user-stories/application-spa-us-1133.json +72 -0
- package/blueprints/application-spa/docs/topics.md +57 -0
- package/blueprints/application-spa/guide/application-spa.md +40 -0
- package/blueprints/delivery-ci-workflows/CHANGELOG.md +39 -0
- package/blueprints/delivery-ci-workflows/README.md +57 -0
- package/blueprints/delivery-ci-workflows/assets/ci-provider-examples/github-actions/default-branch-checks.yml +55 -0
- package/blueprints/delivery-ci-workflows/assets/ci-provider-examples/github-actions/pull-request-checks.yml +65 -0
- package/blueprints/delivery-ci-workflows/assets/ci-provider-examples/github-actions/release.yml +71 -0
- package/blueprints/delivery-ci-workflows/assets/ci-provider-examples/github-actions/scheduled-audit.yml +61 -0
- package/blueprints/delivery-ci-workflows/assets/ci-provider-examples/notes.md +61 -0
- package/blueprints/delivery-ci-workflows/assets/report-samples/per-gate.json +13 -0
- package/blueprints/delivery-ci-workflows/assets/report-samples/pipeline.json +28 -0
- package/blueprints/delivery-ci-workflows/blueprint.json +87 -0
- package/blueprints/delivery-ci-workflows/contributions/adrs/adr-701-delivery-ci-workflows-ci-gates.json +30 -0
- package/blueprints/delivery-ci-workflows/contributions/adrs/adr-702-delivery-ci-workflows-strict-coverage-gate.json +25 -0
- package/blueprints/delivery-ci-workflows/contributions/adrs/adr-703-delivery-ci-workflows-node-only-runner.json +25 -0
- package/blueprints/delivery-ci-workflows/contributions/adrs/adr-704-delivery-ci-workflows-report-shape.json +25 -0
- package/blueprints/delivery-ci-workflows/contributions/adrs/adr-705-delivery-ci-workflows-elicitation-surface.json +25 -0
- package/blueprints/delivery-ci-workflows/contributions/adrs/adr-706-delivery-ci-workflows-branch-model-defaults.json +25 -0
- package/blueprints/delivery-ci-workflows/contributions/adrs/adr-707-delivery-ci-workflows-release-workflow-shape.json +25 -0
- package/blueprints/delivery-ci-workflows/contributions/adrs/adr-708-delivery-ci-workflows-provider-hint-shape.json +25 -0
- package/blueprints/delivery-ci-workflows/contributions/adrs/adr-709-delivery-ci-workflows-release-artefacts.json +25 -0
- package/blueprints/delivery-ci-workflows/contributions/adrs/adr-710-delivery-ci-workflows-scheduled-audit.json +25 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-001.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-002.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-003.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-004.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-005.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-006.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-007.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-008.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-009.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-010.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-011.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-012.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-013.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-014.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-015.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-016.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-017.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-018.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-019.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-020.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-021.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-022.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/requirements/delivery-ci-workflows-req-023.json +18 -0
- package/blueprints/delivery-ci-workflows/contributions/tacs/tac-701-delivery-ci-workflows-gate-runner.json +59 -0
- package/blueprints/delivery-ci-workflows/contributions/tacs/tac-702-delivery-ci-workflows-gate-report.json +32 -0
- package/blueprints/delivery-ci-workflows/contributions/tacs/tac-703-delivery-ci-workflows-aggregate-report.json +41 -0
- package/blueprints/delivery-ci-workflows/contributions/tacs/tac-704-delivery-ci-workflows-workflow-materialiser.json +64 -0
- package/blueprints/delivery-ci-workflows/contributions/tacs/tac-705-delivery-ci-workflows-release-workflow.json +51 -0
- package/blueprints/delivery-ci-workflows/contributions/tacs/tac-706-delivery-ci-workflows-scheduled-audit.json +38 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6101.json +37 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6102.json +36 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6103.json +37 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6104.json +37 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6105.json +36 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6106.json +36 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6107.json +37 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6108.json +37 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6109.json +36 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6110.json +36 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6111.json +36 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6112.json +36 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6113.json +36 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6114.json +46 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6115.json +37 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6116.json +28 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6117.json +28 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6118.json +37 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6119.json +28 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6120.json +28 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6121.json +46 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6122.json +46 -0
- package/blueprints/delivery-ci-workflows/contributions/user-stories/delivery-ci-workflows-us-6123.json +37 -0
- package/blueprints/delivery-ci-workflows/docs/topics.md +61 -0
- package/blueprints/delivery-ci-workflows/guide/delivery-ci-workflows.md +136 -0
- package/blueprints/deploy-cloudflare-workers/README.md +63 -0
- package/blueprints/deploy-cloudflare-workers/assets/ci-workflows/build-and-upload.yml.md +109 -0
- package/blueprints/deploy-cloudflare-workers/assets/ci-workflows/promote.yml.md +120 -0
- package/blueprints/deploy-cloudflare-workers/assets/verification/served-surface-probes.md +90 -0
- package/blueprints/deploy-cloudflare-workers/assets/wrangler-samples/bootstrap-vs-steady-state.md +87 -0
- package/blueprints/deploy-cloudflare-workers/assets/wrangler-samples/preview-alias-shape.md +86 -0
- package/blueprints/deploy-cloudflare-workers/assets/wrangler-samples/wrangler-toml-shape.md +85 -0
- package/blueprints/deploy-cloudflare-workers/blueprint.json +48 -0
- package/blueprints/deploy-cloudflare-workers/contributions/adrs/adr-1301-deploy-cloudflare-workers-deployment-target.json +30 -0
- package/blueprints/deploy-cloudflare-workers/contributions/adrs/adr-1302-deploy-cloudflare-workers-default-vendor.json +35 -0
- package/blueprints/deploy-cloudflare-workers/contributions/adrs/adr-1303-deploy-cloudflare-workers-preview-vs-production.json +30 -0
- package/blueprints/deploy-cloudflare-workers/contributions/adrs/adr-1304-deploy-cloudflare-workers-rollback-is-promote.json +25 -0
- package/blueprints/deploy-cloudflare-workers/contributions/adrs/adr-1305-deploy-cloudflare-workers-dev-mode-drift.json +25 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-001.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-002.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-003.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-004.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-005.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-006.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-007.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-008.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-009.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-010.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-011.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/requirements/deploy-cloudflare-workers-req-012.json +18 -0
- package/blueprints/deploy-cloudflare-workers/contributions/tacs/tac-1301-deploy-cloudflare-workers-deploy-adapter.json +54 -0
- package/blueprints/deploy-cloudflare-workers/contributions/tacs/tac-1302-deploy-cloudflare-workers-wrangler-manifest.json +45 -0
- package/blueprints/deploy-cloudflare-workers/contributions/tacs/tac-1303-deploy-cloudflare-workers-preview-url-resolver.json +46 -0
- package/blueprints/deploy-cloudflare-workers/contributions/tacs/tac-1304-deploy-cloudflare-workers-promote-gate.json +57 -0
- package/blueprints/deploy-cloudflare-workers/contributions/tacs/tac-1305-deploy-cloudflare-workers-served-surface-verifier.json +51 -0
- package/blueprints/deploy-cloudflare-workers/contributions/tacs/tac-1306-deploy-cloudflare-workers-deploy-ci-workflows.json +64 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12101.json +54 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12102.json +45 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12103.json +46 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12104.json +46 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12105.json +46 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12106.json +46 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12107.json +46 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12108.json +46 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12109.json +47 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12110.json +46 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12111.json +45 -0
- package/blueprints/deploy-cloudflare-workers/contributions/user-stories/deploy-cloudflare-workers-us-12112.json +46 -0
- package/blueprints/deploy-cloudflare-workers/docs/topics.md +46 -0
- package/blueprints/deploy-cloudflare-workers/guide/deploy-cloudflare-workers.md +74 -0
- package/blueprints/email-smtp-resend/README.md +45 -0
- package/blueprints/email-smtp-resend/assets/from-address-rotation-pattern.md +44 -0
- package/blueprints/email-smtp-resend/assets/resend-verification-pointer.md +25 -0
- package/blueprints/email-smtp-resend/assets/stub-adapter.md +65 -0
- package/blueprints/email-smtp-resend/blueprint.json +23 -0
- package/blueprints/email-smtp-resend/contributions/adrs/adr-401-email-smtp-resend-transport-choice.json +30 -0
- package/blueprints/email-smtp-resend/contributions/adrs/adr-402-email-smtp-resend-retry-and-backoff-posture.json +30 -0
- package/blueprints/email-smtp-resend/contributions/requirements/email-smtp-resend-req-001.json +18 -0
- package/blueprints/email-smtp-resend/contributions/requirements/email-smtp-resend-req-002.json +18 -0
- package/blueprints/email-smtp-resend/contributions/requirements/email-smtp-resend-req-003.json +18 -0
- package/blueprints/email-smtp-resend/contributions/requirements/email-smtp-resend-req-004.json +18 -0
- package/blueprints/email-smtp-resend/contributions/requirements/email-smtp-resend-req-005.json +18 -0
- package/blueprints/email-smtp-resend/contributions/requirements/email-smtp-resend-req-006.json +18 -0
- package/blueprints/email-smtp-resend/contributions/tacs/tac-401-email-smtp-resend-send-adapter.json +53 -0
- package/blueprints/email-smtp-resend/contributions/tacs/tac-402-email-smtp-resend-webhook-verifier.json +56 -0
- package/blueprints/email-smtp-resend/contributions/user-stories/email-smtp-resend-us-4101.json +45 -0
- package/blueprints/email-smtp-resend/contributions/user-stories/email-smtp-resend-us-4102.json +36 -0
- package/blueprints/email-smtp-resend/contributions/user-stories/email-smtp-resend-us-4103.json +45 -0
- package/blueprints/email-smtp-resend/contributions/user-stories/email-smtp-resend-us-4104.json +45 -0
- package/blueprints/email-smtp-resend/contributions/user-stories/email-smtp-resend-us-4105.json +36 -0
- package/blueprints/email-smtp-resend/contributions/user-stories/email-smtp-resend-us-4106.json +37 -0
- package/blueprints/email-smtp-resend/docs/topics.md +44 -0
- package/blueprints/email-smtp-resend/guide/email-smtp-resend.md +71 -0
- package/blueprints/observability-essentials/README.md +53 -0
- package/blueprints/observability-essentials/assets/probe-samples/liveness-body.json +4 -0
- package/blueprints/observability-essentials/assets/probe-samples/readiness-body.json +18 -0
- package/blueprints/observability-essentials/assets/status-page-samples/status-page-clean.html +22 -0
- package/blueprints/observability-essentials/assets/status-page-samples/status-page-with-notice.html +25 -0
- package/blueprints/observability-essentials/blueprint.json +54 -0
- package/blueprints/observability-essentials/contributions/adrs/adr-801-observability-essentials-health-probes.json +30 -0
- package/blueprints/observability-essentials/contributions/adrs/adr-802-observability-essentials-readiness-semantics.json +30 -0
- package/blueprints/observability-essentials/contributions/adrs/adr-803-observability-essentials-status-page-contract.json +30 -0
- package/blueprints/observability-essentials/contributions/adrs/adr-804-observability-essentials-probe-secrecy.json +25 -0
- package/blueprints/observability-essentials/contributions/adrs/adr-805-observability-essentials-notification-outcome-model.json +25 -0
- package/blueprints/observability-essentials/contributions/requirements/observability-essentials-req-001.json +18 -0
- package/blueprints/observability-essentials/contributions/requirements/observability-essentials-req-002.json +18 -0
- package/blueprints/observability-essentials/contributions/requirements/observability-essentials-req-003.json +18 -0
- package/blueprints/observability-essentials/contributions/requirements/observability-essentials-req-004.json +18 -0
- package/blueprints/observability-essentials/contributions/requirements/observability-essentials-req-005.json +18 -0
- package/blueprints/observability-essentials/contributions/requirements/observability-essentials-req-006.json +18 -0
- package/blueprints/observability-essentials/contributions/requirements/observability-essentials-req-007.json +18 -0
- package/blueprints/observability-essentials/contributions/requirements/observability-essentials-req-008.json +18 -0
- package/blueprints/observability-essentials/contributions/requirements/observability-essentials-req-009.json +18 -0
- package/blueprints/observability-essentials/contributions/requirements/observability-essentials-req-010.json +18 -0
- package/blueprints/observability-essentials/contributions/tacs/tac-801-observability-essentials-liveness-probe.json +32 -0
- package/blueprints/observability-essentials/contributions/tacs/tac-802-observability-essentials-readiness-probe.json +43 -0
- package/blueprints/observability-essentials/contributions/tacs/tac-803-observability-essentials-status-page.json +37 -0
- package/blueprints/observability-essentials/contributions/tacs/tac-804-observability-essentials-notification-outcome.json +42 -0
- package/blueprints/observability-essentials/contributions/user-stories/observability-essentials-us-7101.json +45 -0
- package/blueprints/observability-essentials/contributions/user-stories/observability-essentials-us-7102.json +45 -0
- package/blueprints/observability-essentials/contributions/user-stories/observability-essentials-us-7103.json +45 -0
- package/blueprints/observability-essentials/contributions/user-stories/observability-essentials-us-7104.json +45 -0
- package/blueprints/observability-essentials/contributions/user-stories/observability-essentials-us-7105.json +45 -0
- package/blueprints/observability-essentials/contributions/user-stories/observability-essentials-us-7106.json +45 -0
- package/blueprints/observability-essentials/contributions/user-stories/observability-essentials-us-7107.json +46 -0
- package/blueprints/observability-essentials/contributions/user-stories/observability-essentials-us-7108.json +47 -0
- package/blueprints/observability-essentials/contributions/user-stories/observability-essentials-us-7109.json +45 -0
- package/blueprints/observability-essentials/contributions/user-stories/observability-essentials-us-7110.json +46 -0
- package/blueprints/observability-essentials/docs/topics.md +57 -0
- package/blueprints/observability-essentials/guide/observability-essentials.md +68 -0
- package/blueprints/observability-probe-endpoints/README.md +53 -0
- package/blueprints/observability-probe-endpoints/assets/docker/dockerfile-healthcheck.md +19 -0
- package/blueprints/observability-probe-endpoints/assets/kubernetes/podspec-probes-separate-port.md +54 -0
- package/blueprints/observability-probe-endpoints/assets/kubernetes/podspec-probes.md +36 -0
- package/blueprints/observability-probe-endpoints/assets/load-balancer/health-check-config.md +23 -0
- package/blueprints/observability-probe-endpoints/assets/systemd/notify-service.md +30 -0
- package/blueprints/observability-probe-endpoints/assets/uptime-monitor/monitor-config.md +22 -0
- package/blueprints/observability-probe-endpoints/blueprint.json +44 -0
- package/blueprints/observability-probe-endpoints/contributions/adrs/adr-1501-observability-probe-endpoints-health-probes.json +30 -0
- package/blueprints/observability-probe-endpoints/contributions/adrs/adr-1502-observability-probe-endpoints-readiness-semantics.json +30 -0
- package/blueprints/observability-probe-endpoints/contributions/adrs/adr-1503-observability-probe-endpoints-kubernetes-default.json +30 -0
- package/blueprints/observability-probe-endpoints/contributions/adrs/adr-1504-observability-probe-endpoints-separate-port-option.json +30 -0
- package/blueprints/observability-probe-endpoints/contributions/adrs/adr-1505-observability-probe-endpoints-external-response-secrecy.json +30 -0
- package/blueprints/observability-probe-endpoints/contributions/requirements/observability-probe-endpoints-req-001.json +18 -0
- package/blueprints/observability-probe-endpoints/contributions/requirements/observability-probe-endpoints-req-002.json +18 -0
- package/blueprints/observability-probe-endpoints/contributions/requirements/observability-probe-endpoints-req-003.json +18 -0
- package/blueprints/observability-probe-endpoints/contributions/requirements/observability-probe-endpoints-req-004.json +18 -0
- package/blueprints/observability-probe-endpoints/contributions/requirements/observability-probe-endpoints-req-005.json +18 -0
- package/blueprints/observability-probe-endpoints/contributions/requirements/observability-probe-endpoints-req-006.json +18 -0
- package/blueprints/observability-probe-endpoints/contributions/requirements/observability-probe-endpoints-req-007.json +18 -0
- package/blueprints/observability-probe-endpoints/contributions/requirements/observability-probe-endpoints-req-008.json +18 -0
- package/blueprints/observability-probe-endpoints/contributions/tacs/tac-1501-observability-probe-endpoints-profile-resolver.json +39 -0
- package/blueprints/observability-probe-endpoints/contributions/tacs/tac-1502-observability-probe-endpoints-handler-set.json +40 -0
- package/blueprints/observability-probe-endpoints/contributions/tacs/tac-1503-observability-probe-endpoints-listener-topology.json +51 -0
- package/blueprints/observability-probe-endpoints/contributions/tacs/tac-1504-observability-probe-endpoints-non-http-adapters.json +39 -0
- package/blueprints/observability-probe-endpoints/contributions/user-stories/observability-probe-endpoints-us-14101.json +46 -0
- package/blueprints/observability-probe-endpoints/contributions/user-stories/observability-probe-endpoints-us-14102.json +46 -0
- package/blueprints/observability-probe-endpoints/contributions/user-stories/observability-probe-endpoints-us-14103.json +46 -0
- package/blueprints/observability-probe-endpoints/contributions/user-stories/observability-probe-endpoints-us-14104.json +45 -0
- package/blueprints/observability-probe-endpoints/contributions/user-stories/observability-probe-endpoints-us-14105.json +46 -0
- package/blueprints/observability-probe-endpoints/contributions/user-stories/observability-probe-endpoints-us-14106.json +45 -0
- package/blueprints/observability-probe-endpoints/contributions/user-stories/observability-probe-endpoints-us-14107.json +45 -0
- package/blueprints/observability-probe-endpoints/contributions/user-stories/observability-probe-endpoints-us-14108.json +46 -0
- package/blueprints/observability-probe-endpoints/docs/topics.md +51 -0
- package/blueprints/observability-probe-endpoints/guide/observability-probe-endpoints.md +83 -0
- package/blueprints/persistence-data-d1/README.md +50 -0
- package/blueprints/persistence-data-d1/assets/batch-usage/batch-atomicity-example.md +72 -0
- package/blueprints/persistence-data-d1/assets/facade-shape/facade-module-shape.md +115 -0
- package/blueprints/persistence-data-d1/assets/migration-shape/migration-file-shape.md +119 -0
- package/blueprints/persistence-data-d1/assets/wrangler-config/d1-binding-shape.md +93 -0
- package/blueprints/persistence-data-d1/blueprint.json +42 -0
- package/blueprints/persistence-data-d1/contributions/adrs/adr-1401-persistence-data-d1-store-model.json +30 -0
- package/blueprints/persistence-data-d1/contributions/adrs/adr-1402-persistence-data-d1-migration-discipline.json +30 -0
- package/blueprints/persistence-data-d1/contributions/adrs/adr-1403-persistence-data-d1-event-secrecy.json +25 -0
- package/blueprints/persistence-data-d1/contributions/adrs/adr-1404-persistence-data-d1-store-boundary.json +25 -0
- package/blueprints/persistence-data-d1/contributions/adrs/adr-1405-persistence-data-d1-recovery-model.json +30 -0
- package/blueprints/persistence-data-d1/contributions/requirements/persistence-data-d1-req-001.json +18 -0
- package/blueprints/persistence-data-d1/contributions/requirements/persistence-data-d1-req-002.json +18 -0
- package/blueprints/persistence-data-d1/contributions/requirements/persistence-data-d1-req-003.json +18 -0
- package/blueprints/persistence-data-d1/contributions/requirements/persistence-data-d1-req-004.json +18 -0
- package/blueprints/persistence-data-d1/contributions/requirements/persistence-data-d1-req-005.json +18 -0
- package/blueprints/persistence-data-d1/contributions/requirements/persistence-data-d1-req-006.json +18 -0
- package/blueprints/persistence-data-d1/contributions/requirements/persistence-data-d1-req-007.json +18 -0
- package/blueprints/persistence-data-d1/contributions/tacs/tac-1401-persistence-data-d1-facade.json +51 -0
- package/blueprints/persistence-data-d1/contributions/tacs/tac-1402-persistence-data-d1-migration-catalog.json +31 -0
- package/blueprints/persistence-data-d1/contributions/tacs/tac-1403-persistence-data-d1-deploy-gate.json +38 -0
- package/blueprints/persistence-data-d1/contributions/tacs/tac-1404-persistence-data-d1-recovery-runner.json +39 -0
- package/blueprints/persistence-data-d1/contributions/user-stories/persistence-data-d1-us-13101.json +45 -0
- package/blueprints/persistence-data-d1/contributions/user-stories/persistence-data-d1-us-13102.json +45 -0
- package/blueprints/persistence-data-d1/contributions/user-stories/persistence-data-d1-us-13103.json +46 -0
- package/blueprints/persistence-data-d1/contributions/user-stories/persistence-data-d1-us-13104.json +45 -0
- package/blueprints/persistence-data-d1/contributions/user-stories/persistence-data-d1-us-13105.json +45 -0
- package/blueprints/persistence-data-d1/contributions/user-stories/persistence-data-d1-us-13106.json +46 -0
- package/blueprints/persistence-data-d1/contributions/user-stories/persistence-data-d1-us-13107.json +38 -0
- package/blueprints/persistence-data-d1/docs/topics.md +59 -0
- package/blueprints/persistence-data-d1/guide/persistence-data-d1.md +77 -0
- package/blueprints/persistence-data-sqlite/README.md +50 -0
- package/blueprints/persistence-data-sqlite/assets/backup-procedures/hot-checkpoint-note.md +22 -0
- package/blueprints/persistence-data-sqlite/assets/backup-procedures/sqlite-file-copy.md +70 -0
- package/blueprints/persistence-data-sqlite/assets/schema-samples/catalog-file-layout.md +73 -0
- package/blueprints/persistence-data-sqlite/assets/schema-samples/migration-shape.md +76 -0
- package/blueprints/persistence-data-sqlite/blueprint.json +50 -0
- package/blueprints/persistence-data-sqlite/contributions/adrs/adr-601-persistence-data-sqlite-store-model.json +30 -0
- package/blueprints/persistence-data-sqlite/contributions/adrs/adr-602-persistence-data-sqlite-migration-discipline.json +30 -0
- package/blueprints/persistence-data-sqlite/contributions/adrs/adr-603-persistence-data-sqlite-event-secrecy.json +25 -0
- package/blueprints/persistence-data-sqlite/contributions/adrs/adr-604-persistence-data-sqlite-store-boundary.json +25 -0
- package/blueprints/persistence-data-sqlite/contributions/adrs/adr-605-persistence-data-sqlite-backup-model.json +25 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-001.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-002.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-003.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-004.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-005.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-006.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-007.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-008.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-009.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-010.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/requirements/persistence-data-sqlite-req-011.json +18 -0
- package/blueprints/persistence-data-sqlite/contributions/tacs/tac-601-persistence-data-sqlite-store.json +57 -0
- package/blueprints/persistence-data-sqlite/contributions/tacs/tac-602-persistence-data-sqlite-migration-runner.json +34 -0
- package/blueprints/persistence-data-sqlite/contributions/tacs/tac-603-persistence-data-sqlite-migration-catalog.json +31 -0
- package/blueprints/persistence-data-sqlite/contributions/tacs/tac-604-persistence-data-sqlite-backup-runner.json +33 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5101.json +46 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5102.json +46 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5103.json +37 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5104.json +45 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5105.json +45 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5106.json +46 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5107.json +45 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5108.json +46 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5109.json +46 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5110.json +37 -0
- package/blueprints/persistence-data-sqlite/contributions/user-stories/persistence-data-sqlite-us-5111.json +37 -0
- package/blueprints/persistence-data-sqlite/docs/topics.md +49 -0
- package/blueprints/persistence-data-sqlite/guide/persistence-data-sqlite.md +69 -0
- package/blueprints/security-auth-clerk/README.md +52 -0
- package/blueprints/security-auth-clerk/assets/authorisation/role-claim-mapping-sample.md +99 -0
- package/blueprints/security-auth-clerk/assets/middleware/node-middleware-shape.md +86 -0
- package/blueprints/security-auth-clerk/assets/middleware/workers-fetch-shape.md +123 -0
- package/blueprints/security-auth-clerk/assets/wiring/clerk-provider-react.md +48 -0
- package/blueprints/security-auth-clerk/assets/wiring/clerk-provider-vue.md +41 -0
- package/blueprints/security-auth-clerk/assets/wiring/workers-wrangler-toml-shape.md +51 -0
- package/blueprints/security-auth-clerk/blueprint.json +42 -0
- package/blueprints/security-auth-clerk/contributions/adrs/adr-1001-security-auth-clerk-auth-model.json +30 -0
- package/blueprints/security-auth-clerk/contributions/adrs/adr-1002-security-auth-clerk-middleware-boundary.json +25 -0
- package/blueprints/security-auth-clerk/contributions/adrs/adr-1003-security-auth-clerk-authorisation-adapter-contract.json +25 -0
- package/blueprints/security-auth-clerk/contributions/adrs/adr-1004-security-auth-clerk-claims-mapping-discipline.json +25 -0
- package/blueprints/security-auth-clerk/contributions/adrs/adr-1005-security-auth-clerk-session-lifecycle.json +25 -0
- package/blueprints/security-auth-clerk/contributions/requirements/security-auth-clerk-req-001.json +18 -0
- package/blueprints/security-auth-clerk/contributions/requirements/security-auth-clerk-req-002.json +18 -0
- package/blueprints/security-auth-clerk/contributions/requirements/security-auth-clerk-req-003.json +18 -0
- package/blueprints/security-auth-clerk/contributions/requirements/security-auth-clerk-req-004.json +18 -0
- package/blueprints/security-auth-clerk/contributions/requirements/security-auth-clerk-req-005.json +18 -0
- package/blueprints/security-auth-clerk/contributions/requirements/security-auth-clerk-req-006.json +18 -0
- package/blueprints/security-auth-clerk/contributions/requirements/security-auth-clerk-req-007.json +18 -0
- package/blueprints/security-auth-clerk/contributions/requirements/security-auth-clerk-req-008.json +18 -0
- package/blueprints/security-auth-clerk/contributions/requirements/security-auth-clerk-req-009.json +18 -0
- package/blueprints/security-auth-clerk/contributions/tacs/tac-1001-security-auth-clerk-middleware.json +42 -0
- package/blueprints/security-auth-clerk/contributions/tacs/tac-1002-security-auth-clerk-authorisation-adapter.json +30 -0
- package/blueprints/security-auth-clerk/contributions/tacs/tac-1003-security-auth-clerk-session-verifier.json +38 -0
- package/blueprints/security-auth-clerk/contributions/tacs/tac-1004-security-auth-clerk-claims-mapper.json +22 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9101.json +46 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9102.json +38 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9103.json +46 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9104.json +46 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9105.json +36 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9106.json +36 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9107.json +37 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9108.json +36 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9109.json +36 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9110.json +37 -0
- package/blueprints/security-auth-clerk/contributions/user-stories/security-auth-clerk-us-9111.json +36 -0
- package/blueprints/security-auth-clerk/docs/topics.md +56 -0
- package/blueprints/security-auth-clerk/guide/security-auth-clerk.md +80 -0
- package/blueprints/security-auth-keycloak/README.md +56 -0
- package/blueprints/security-auth-keycloak/assets/local-container/keycloak-bootstrap.md +54 -0
- package/blueprints/security-auth-keycloak/assets/middleware/verifier-wiring.md +93 -0
- package/blueprints/security-auth-keycloak/assets/mock-introspection/mock-introspection-shape.md +62 -0
- package/blueprints/security-auth-keycloak/assets/provider-router/router-shape.md +71 -0
- package/blueprints/security-auth-keycloak/assets/realm-skeleton/realm-config-shape.md +55 -0
- package/blueprints/security-auth-keycloak/blueprint.json +49 -0
- package/blueprints/security-auth-keycloak/contributions/adrs/adr-1201-security-auth-keycloak-auth-model.json +35 -0
- package/blueprints/security-auth-keycloak/contributions/adrs/adr-1202-security-auth-keycloak-verification-mode-choice.json +30 -0
- package/blueprints/security-auth-keycloak/contributions/adrs/adr-1203-security-auth-keycloak-provider-routing-seam.json +30 -0
- package/blueprints/security-auth-keycloak/contributions/adrs/adr-1204-security-auth-keycloak-session-vs-token-contract.json +25 -0
- package/blueprints/security-auth-keycloak/contributions/adrs/adr-1205-security-auth-keycloak-jwks-rotation-cache-lifetime.json +30 -0
- package/blueprints/security-auth-keycloak/contributions/adrs/adr-1206-security-auth-keycloak-refresh-and-sign-out-posture.json +25 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-001.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-002.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-003.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-004.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-005.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-006.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-007.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-008.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-009.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-010.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-011.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/requirements/security-auth-keycloak-req-012.json +18 -0
- package/blueprints/security-auth-keycloak/contributions/tacs/tac-1201-security-auth-keycloak-discovery-client.json +51 -0
- package/blueprints/security-auth-keycloak/contributions/tacs/tac-1202-security-auth-keycloak-jwt-verifier.json +46 -0
- package/blueprints/security-auth-keycloak/contributions/tacs/tac-1203-security-auth-keycloak-introspection-client.json +45 -0
- package/blueprints/security-auth-keycloak/contributions/tacs/tac-1204-security-auth-keycloak-provider-router.json +37 -0
- package/blueprints/security-auth-keycloak/contributions/tacs/tac-1205-security-auth-keycloak-role-adapter.json +32 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11101.json +47 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11102.json +45 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11103.json +36 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11104.json +36 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11105.json +45 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11106.json +46 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11107.json +45 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11108.json +45 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11109.json +37 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11110.json +45 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11111.json +45 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11112.json +37 -0
- package/blueprints/security-auth-keycloak/contributions/user-stories/security-auth-keycloak-us-11113.json +36 -0
- package/blueprints/security-auth-keycloak/docs/topics.md +74 -0
- package/blueprints/security-auth-keycloak/guide/security-auth-keycloak.md +81 -0
- package/blueprints/security-auth-magic-link/README.md +46 -0
- package/blueprints/security-auth-magic-link/assets/email-templates/magic-link-email.md +44 -0
- package/blueprints/security-auth-magic-link/assets/email-templates/stub-adapter.md +55 -0
- package/blueprints/security-auth-magic-link/assets/principal-registry-samples/allow-list-file.md +46 -0
- package/blueprints/security-auth-magic-link/assets/principal-registry-samples/single-address.md +35 -0
- package/blueprints/security-auth-magic-link/blueprint.json +45 -0
- package/blueprints/security-auth-magic-link/contributions/adrs/adr-501-security-auth-magic-link-model.json +30 -0
- package/blueprints/security-auth-magic-link/contributions/adrs/adr-502-security-auth-magic-link-token-secrecy.json +25 -0
- package/blueprints/security-auth-magic-link/contributions/adrs/adr-503-security-auth-magic-link-anti-enumeration-budget.json +25 -0
- package/blueprints/security-auth-magic-link/contributions/adrs/adr-504-security-auth-magic-link-session-lifecycle.json +30 -0
- package/blueprints/security-auth-magic-link/contributions/adrs/adr-505-security-auth-magic-link-rate-limiting.json +25 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-001.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-002.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-003.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-004.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-005.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-006.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-007.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-008.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-009.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-010.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/requirements/security-auth-magic-link-req-011.json +18 -0
- package/blueprints/security-auth-magic-link/contributions/tacs/tac-501-security-auth-magic-link-manager.json +45 -0
- package/blueprints/security-auth-magic-link/contributions/tacs/tac-502-security-auth-magic-link-session-manager.json +46 -0
- package/blueprints/security-auth-magic-link/contributions/tacs/tac-503-security-auth-magic-link-login-routes.json +76 -0
- package/blueprints/security-auth-magic-link/contributions/tacs/tac-504-security-auth-magic-link-email-delivery-adapter.json +26 -0
- package/blueprints/security-auth-magic-link/contributions/tacs/tac-505-security-auth-magic-link-principal-registry.json +26 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3101.json +64 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3102.json +54 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3103.json +45 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3104.json +55 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3105.json +46 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3106.json +46 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3107.json +54 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3108.json +46 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3109.json +48 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3110.json +45 -0
- package/blueprints/security-auth-magic-link/contributions/user-stories/security-auth-magic-link-us-3111.json +45 -0
- package/blueprints/security-auth-magic-link/docs/topics.md +45 -0
- package/blueprints/security-auth-magic-link/guide/security-auth-magic-link.md +65 -0
- package/blueprints/security-auth-oauth2/README.md +50 -0
- package/blueprints/security-auth-oauth2/assets/mock-provider/mock-oidc-shape.md +55 -0
- package/blueprints/security-auth-oauth2/assets/provider-selector/list-shape.md +27 -0
- package/blueprints/security-auth-oauth2/assets/providers/generic-oidc-discovery.md +31 -0
- package/blueprints/security-auth-oauth2/assets/providers/github-oauth2-only.md +31 -0
- package/blueprints/security-auth-oauth2/assets/providers/google-oidc.md +31 -0
- package/blueprints/security-auth-oauth2/assets/session-bridge/opaque-handle-shape.md +59 -0
- package/blueprints/security-auth-oauth2/blueprint.json +44 -0
- package/blueprints/security-auth-oauth2/contributions/adrs/adr-1101-security-auth-oauth2-auth-model.json +35 -0
- package/blueprints/security-auth-oauth2/contributions/adrs/adr-1102-security-auth-oauth2-provider-abstraction-contract.json +25 -0
- package/blueprints/security-auth-oauth2/contributions/adrs/adr-1103-security-auth-oauth2-pkce-discipline.json +25 -0
- package/blueprints/security-auth-oauth2/contributions/adrs/adr-1104-security-auth-oauth2-session-bridge-shape.json +25 -0
- package/blueprints/security-auth-oauth2/contributions/adrs/adr-1105-security-auth-oauth2-refresh-token-posture.json +25 -0
- package/blueprints/security-auth-oauth2/contributions/adrs/adr-1106-security-auth-oauth2-multi-provider-routing.json +25 -0
- package/blueprints/security-auth-oauth2/contributions/requirements/security-auth-oauth2-req-001.json +18 -0
- package/blueprints/security-auth-oauth2/contributions/requirements/security-auth-oauth2-req-002.json +18 -0
- package/blueprints/security-auth-oauth2/contributions/requirements/security-auth-oauth2-req-003.json +18 -0
- package/blueprints/security-auth-oauth2/contributions/requirements/security-auth-oauth2-req-004.json +18 -0
- package/blueprints/security-auth-oauth2/contributions/requirements/security-auth-oauth2-req-005.json +18 -0
- package/blueprints/security-auth-oauth2/contributions/requirements/security-auth-oauth2-req-006.json +18 -0
- package/blueprints/security-auth-oauth2/contributions/requirements/security-auth-oauth2-req-007.json +18 -0
- package/blueprints/security-auth-oauth2/contributions/requirements/security-auth-oauth2-req-008.json +18 -0
- package/blueprints/security-auth-oauth2/contributions/requirements/security-auth-oauth2-req-009.json +18 -0
- package/blueprints/security-auth-oauth2/contributions/requirements/security-auth-oauth2-req-010.json +18 -0
- package/blueprints/security-auth-oauth2/contributions/tacs/tac-1101-security-auth-oauth2-flow-controller.json +61 -0
- package/blueprints/security-auth-oauth2/contributions/tacs/tac-1102-security-auth-oauth2-provider-adapter.json +33 -0
- package/blueprints/security-auth-oauth2/contributions/tacs/tac-1103-security-auth-oauth2-session-bridge.json +51 -0
- package/blueprints/security-auth-oauth2/contributions/tacs/tac-1104-security-auth-oauth2-provider-selector.json +29 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10101.json +47 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10102.json +45 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10103.json +36 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10104.json +36 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10105.json +55 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10106.json +45 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10107.json +46 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10108.json +46 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10109.json +37 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10110.json +37 -0
- package/blueprints/security-auth-oauth2/contributions/user-stories/security-auth-oauth2-us-10111.json +28 -0
- package/blueprints/security-auth-oauth2/docs/topics.md +58 -0
- package/blueprints/security-auth-oauth2/guide/security-auth-oauth2.md +65 -0
- package/blueprints/security-secrets-management/README.md +48 -0
- package/blueprints/security-secrets-management/assets/cli-usage/agent-access-pattern.md +69 -0
- package/blueprints/security-secrets-management/assets/manifest-samples/environment-aware-example.md +33 -0
- package/blueprints/security-secrets-management/assets/manifest-samples/secrets-yaml-shape.md +74 -0
- package/blueprints/security-secrets-management/assets/ui-integration/three-way-choice.md +44 -0
- package/blueprints/security-secrets-management/blueprint.json +43 -0
- package/blueprints/security-secrets-management/contributions/adrs/adr-901-security-secrets-management-secrets-source.json +30 -0
- package/blueprints/security-secrets-management/contributions/adrs/adr-902-security-secrets-management-default-vendor.json +35 -0
- package/blueprints/security-secrets-management/contributions/adrs/adr-903-security-secrets-management-agent-access-discipline.json +25 -0
- package/blueprints/security-secrets-management/contributions/adrs/adr-904-security-secrets-management-dotenv-reflection.json +25 -0
- package/blueprints/security-secrets-management/contributions/adrs/adr-905-security-secrets-management-rotation-and-audit.json +30 -0
- package/blueprints/security-secrets-management/contributions/requirements/security-secrets-management-req-001.json +18 -0
- package/blueprints/security-secrets-management/contributions/requirements/security-secrets-management-req-002.json +18 -0
- package/blueprints/security-secrets-management/contributions/requirements/security-secrets-management-req-003.json +18 -0
- package/blueprints/security-secrets-management/contributions/requirements/security-secrets-management-req-004.json +18 -0
- package/blueprints/security-secrets-management/contributions/requirements/security-secrets-management-req-005.json +18 -0
- package/blueprints/security-secrets-management/contributions/requirements/security-secrets-management-req-006.json +18 -0
- package/blueprints/security-secrets-management/contributions/requirements/security-secrets-management-req-007.json +18 -0
- package/blueprints/security-secrets-management/contributions/requirements/security-secrets-management-req-008.json +18 -0
- package/blueprints/security-secrets-management/contributions/requirements/security-secrets-management-req-009.json +18 -0
- package/blueprints/security-secrets-management/contributions/requirements/security-secrets-management-req-010.json +18 -0
- package/blueprints/security-secrets-management/contributions/tacs/tac-901-security-secrets-management-manager-client.json +52 -0
- package/blueprints/security-secrets-management/contributions/tacs/tac-902-security-secrets-management-manifest.json +34 -0
- package/blueprints/security-secrets-management/contributions/tacs/tac-903-security-secrets-management-env-reflector.json +46 -0
- package/blueprints/security-secrets-management/contributions/tacs/tac-904-security-secrets-management-rotation-gate.json +57 -0
- package/blueprints/security-secrets-management/contributions/tacs/tac-905-security-secrets-management-agent-cli.json +59 -0
- package/blueprints/security-secrets-management/contributions/user-stories/security-secrets-management-us-8101.json +46 -0
- package/blueprints/security-secrets-management/contributions/user-stories/security-secrets-management-us-8102.json +45 -0
- package/blueprints/security-secrets-management/contributions/user-stories/security-secrets-management-us-8103.json +37 -0
- package/blueprints/security-secrets-management/contributions/user-stories/security-secrets-management-us-8104.json +45 -0
- package/blueprints/security-secrets-management/contributions/user-stories/security-secrets-management-us-8105.json +55 -0
- package/blueprints/security-secrets-management/contributions/user-stories/security-secrets-management-us-8106.json +46 -0
- package/blueprints/security-secrets-management/contributions/user-stories/security-secrets-management-us-8107.json +46 -0
- package/blueprints/security-secrets-management/contributions/user-stories/security-secrets-management-us-8108.json +45 -0
- package/blueprints/security-secrets-management/contributions/user-stories/security-secrets-management-us-8109.json +46 -0
- package/blueprints/security-secrets-management/contributions/user-stories/security-secrets-management-us-8110.json +45 -0
- package/blueprints/security-secrets-management/docs/topics.md +46 -0
- package/blueprints/security-secrets-management/guide/security-secrets-management.md +68 -0
- package/fixtures/canary-manifest.json +1 -101
- package/guidance/build-cycle-playbook.md +2 -2
- package/guidance/document-model.md +1 -1
- package/guidance/harness-template.md +13 -0
- package/guidance/managed/agent-instructions-block.hash +1 -1
- package/guidance/managed/agent-instructions-block.md +13 -0
- package/package.json +18 -9
- package/rcf/adrs/adr-001.json +1 -1
- package/rcf/adrs/adr-009.json +1 -1
- package/rcf/build-sequence.json +1 -1
- package/rcf/manifest.json +2 -2
- package/rcf/prd.json +2 -2
- package/releases/releases.yaml +116 -0
- package/scripts/preinstall-node-check.mjs +61 -0
- package/src/blueprint/apply.js +62 -18
- package/src/blueprint/conflicts.js +8 -8
- package/src/blueprint/index.js +14 -1
- package/src/blueprint/library-loader.js +271 -0
- package/src/blueprint/library-registry.js +341 -0
- package/src/blueprint/list.js +94 -0
- package/src/blueprint/loader.js +26 -1
- package/src/blueprint/namespace.js +20 -16
- package/src/blueprint/shelf-resolver.js +286 -0
- package/src/blueprint/supersede.js +3 -2
- package/src/browser-verify/invariants.js +40 -0
- package/src/browser-verify/runner.js +2 -0
- package/src/cli/blueprint-library.js +419 -0
- package/src/cli/blueprint.js +91 -10
- package/src/cli/guidance.js +1 -1
- package/src/cli/help.js +27 -1
- package/src/cli/init.js +2 -0
- package/src/cli/version.js +673 -0
- package/src/cli/view.js +282 -1
- package/src/core/store/writer.js +64 -2
- package/src/server/index.js +3 -0
- package/src/server/routes.js +15 -1
- package/src/server/scope-endpoint.js +105 -0
- package/src/setup/agent-setup.js +28 -10
- package/src/view/live-client.js +253 -6
- package/src/view/scope.js +231 -0
- package/src/view/style.css +42 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Persistence blueprint guide
|
|
2
|
+
|
|
3
|
+
## What it is
|
|
4
|
+
|
|
5
|
+
A default durable-store floor for small greenfield rcf-lite projects. The blueprint contributes the WHAT of a persistence pattern: how the store gets opened, how the schema evolves, how migrations apply, how a mid-migration crash is handled, how the store event log looks, how the boundary between the domain and the engine is drawn, and how backups are taken. The default engine is a single SQLite file in WAL mode; Postgres is a documented future variant behind the same facade.
|
|
6
|
+
|
|
7
|
+
Concretely, the blueprint ships eleven requirements, eleven user stories (twenty-five acceptance criteria), four architecture components, and five architecture decision records. Two ADRs are `scope: global` on the topics `persistenceStore` (the engine choice) and `migrationDiscipline` (the forward-only refuse-newer-at-open posture); the other three are scope-local operational ADRs (event secrecy, store-boundary discipline, backup model) that a composing blueprint does not conflict with by default.
|
|
8
|
+
|
|
9
|
+
## What it is not
|
|
10
|
+
|
|
11
|
+
Not a domain schema. The tables the project's own entities live in are project-authored, on top of the migration catalog the project maintains. The blueprint governs the store facade and the migration discipline; the domain shape is the project's own responsibility.
|
|
12
|
+
|
|
13
|
+
Not an ORM. There is no query builder, no active-record layer, no framework-shaped abstraction between the facade's named verbs and the engine binding. Projects that want an ORM wire it inside the facade's implementation and preserve the outward verb surface.
|
|
14
|
+
|
|
15
|
+
Not a Postgres blueprint. A future `persistence-postgres` blueprint (see 'when it does not fit') will contribute a Postgres-flavoured store TAC and an ADR on `persistenceStore` that deliberately conflicts with this one; until then, projects that need Postgres supersede ADR-601 with a project-level ADR.
|
|
16
|
+
|
|
17
|
+
Not a logical dump story. Backups are file-level engine-native snapshots. Cross-engine migration and portable dumps are out of scope; projects that need them layer a dump runner beside the file-level backup runner.
|
|
18
|
+
|
|
19
|
+
Not a connection pool. The facade holds one handle for the process lifetime. Projects that select an engine that benefits from a pool (Postgres) wire it inside the facade and preserve the outward interface.
|
|
20
|
+
|
|
21
|
+
Not a replication story. Cross-region replication and hot standbys are engine-native decisions a project makes on top of the file-level backup story; the blueprint's backup runner does not orchestrate them.
|
|
22
|
+
|
|
23
|
+
## When to reach for it
|
|
24
|
+
|
|
25
|
+
Reach for the persistence-data-sqlite blueprint when:
|
|
26
|
+
|
|
27
|
+
- The project is a small greenfield rcf-lite deployment (single deployable, one small team, one host or a small container fleet, no ops team standing by).
|
|
28
|
+
- The domain has a natural relational shape (bounded set of entities with well-defined relationships) that SQL expresses cleanly.
|
|
29
|
+
- Zero-infrastructure persistence is a feature (no database server to run, no connection pool to size, no network round trip between the process and the store).
|
|
30
|
+
- The scale envelope is single-writer (concurrent writers negotiate through the same process, not across processes on different hosts) and the working set fits on the same host the process runs on.
|
|
31
|
+
- The recovery story that fits is 'copy the file to safe storage, point a compatible build at the copy'; downtime-free file-level backup is the primary recovery path.
|
|
32
|
+
|
|
33
|
+
## When it does not fit
|
|
34
|
+
|
|
35
|
+
Do not reach for the persistence-data-sqlite blueprint when:
|
|
36
|
+
|
|
37
|
+
- Multi-writer scale across hosts, hot standby replication, or cross-region durability are project requirements. A `persistence-postgres` blueprint (unshipped at v1.0.0, promotion signal: the third project asks for it) will own this. Until then, a project with these needs supersedes ADR-601 with a project-level ADR selecting the alternate engine and rewrites the migration catalog into the alternate dialect. The store facade contract, the migration runner contract, and the backup runner contract are preserved.
|
|
38
|
+
- The working set is genuinely too large for a single host to hold with reasonable performance (tens of gigabytes of hot data, hundreds of writes per second sustained). At that scale the single-writer envelope becomes an operator experience problem, and Postgres (or the engine ADR-601 promotes) is the more defensible shape.
|
|
39
|
+
- The domain shape is genuinely non-relational (opaque blob storage, event streams, time-series with a fixed retention model). A different blueprint (a KV-store blueprint, an event-sourced blueprint, a time-series blueprint) owns those shapes; supersede with a project-level ADR and skip this blueprint.
|
|
40
|
+
- The project has a hard requirement for a portable schema-agnostic dump as the primary backup (compliance mandate, cross-engine restore drill). File-level backup is the primary recovery path in ADR-605; projects that need the logical dump layer it on top, or supersede ADR-605 with a project-level ADR.
|
|
41
|
+
- The deploy target does not have a persistent filesystem the SQLite file can live on (ephemeral containers with no volume mount, serverless functions). The blueprint assumes a stable path the file survives at across deploys; a project without that assumption picks a different engine.
|
|
42
|
+
|
|
43
|
+
The design brief `w-2026-07-28-029` originally scoped store-selection separately from the persistence-data-sqlite blueprint. The persistence-data-sqlite blueprint at v1.0.0 does not include a Postgres engine variant because the rcf-lite blueprint mechanism (Phase 1) has no variant/profile selector: two engine TACs contributed together are both applied, and both leave dangling tacIds references if only one is realised. Shipping SQLite-first with Postgres as a documented promotion path mirrors the security-auth-magic-link blueprint's keycloak-local deferral (see the auth guide) and keeps v1.0.0 shippable. A future `persistence-postgres` blueprint plus a mechanism-side variant concept (v1.1 candidate) is the natural evolution.
|
|
44
|
+
|
|
45
|
+
## What a good outcome looks like
|
|
46
|
+
|
|
47
|
+
A project applies the persistence-data-sqlite blueprint on a fresh tree, wires its own domain migration entries into the catalog (starting at version 1), realises the four TACs in project-authored FBSes, and lands on a deployed application where:
|
|
48
|
+
|
|
49
|
+
- The boot sequence opens the store once through the facade; the opened event fires with the configured store path; the schemaVersion read returns the catalog's max version.
|
|
50
|
+
- A schema change ships as a new numbered entry in the catalog; the next deploy's boot fires a migrated event whose applied array contains exactly the new version; consumer code reads through the facade at the new schema.
|
|
51
|
+
- A SIGKILL of the process while a write is in flight leaves the store openable on the next boot, with committed writes intact and the in-flight transaction rolled back; the opened event fires cleanly, no corruption error surfaces.
|
|
52
|
+
- A rollback to an older build against a store the newer build wrote fails at boot with a stable-coded refuse-newer error naming both versions; the operator diagnoses in one step (the older build cannot run against the newer store) and redeploys the newer build.
|
|
53
|
+
- A backup runs on a cron against the live store; the backupCheckpoint event fires on the sink with the artifact path and the completion timestamp; a fresh process opens the artifact and reads the rows committed at or before the completion timestamp.
|
|
54
|
+
- The auth event log, the wire-request log, and every other domain log surface holds no store-lifecycle records; the store's event log holds no domain-row values.
|
|
55
|
+
|
|
56
|
+
## Operator decisions that remain open after apply
|
|
57
|
+
|
|
58
|
+
- Engine choice (SQLite default, Postgres or KV-store or event-sourced by superseding ADR-601). Blueprint owns the facade contract on both sides of the boundary; project owns the engine.
|
|
59
|
+
- Migration catalog layout (one file or one file per migration, under the schema-samples reference). Blueprint owns the shape; project owns the layout choice at whatever history size feels comfortable.
|
|
60
|
+
- Store path or connection string (the configuration input to the open entry point). Blueprint owns the entry point signature; project owns the deployed value and how it is supplied (env var, config file, container volume).
|
|
61
|
+
- Domain schema (every table beyond the schemaVersion bookkeeping table). Blueprint owns the migration discipline; project owns the tables.
|
|
62
|
+
- Backup schedule and destination (cron cadence, artifact path template, retention). Blueprint owns the backup runner and its event; project owns when and where.
|
|
63
|
+
- Restore drill cadence (a backup you have not restored is a hope, not a backup). Blueprint owns the artifact shape; project owns proving it works.
|
|
64
|
+
- Log sink implementation (where opened / migrated / backupCheckpoint / closed events go). Blueprint owns the event shape and the metadata-only discipline; project owns the shipper.
|
|
65
|
+
- Facade verb catalogue (the named CRUD verbs the domain needs). Blueprint owns the boundary discipline (named verbs, no raw-query passthrough); project owns the verbs.
|
|
66
|
+
|
|
67
|
+
## Cost-honesty paragraph
|
|
68
|
+
|
|
69
|
+
Shipping this doc set costs the project the following. Every boot pays the migration runner's cost (a single SELECT against the bookkeeping table on a routine boot; the full migration cost on a schema evolution boot). Every facade verb is a project-authored function; the boundary discipline means new query shapes are a two-file edit (facade plus consumer) instead of a scattered raw SQL fragment. Every schema change is a numbered entry the project must not edit after shipping (a shipped migration is a fact of production; a correction is a new migration). The refuse-newer property makes rollback deploys fail at boot rather than silently; that safety comes at the cost of ops running the older build against the older data (or accepting that a data-shape change is one-way). File-level backup is fast and cheap but engine-native; a project that needs a portable dump layers it on top and keeps both in sync. The store's event log is deliberately minimal; a project that needs richer per-operation events (row-level audit trail, hot-path timing) authors those on top of the facade's verbs, not inside the store event sink.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Security auth Clerk blueprint (v1.1.0)
|
|
2
|
+
|
|
3
|
+
The tenth content blueprint on the rcf-build-lite blueprint mechanism, category `security`. A Clerk-committed sibling to `security-auth-magic-link` on the `authModel` global topic: Clerk hosts the identity surface (users, sessions, sign-in UX, credential storage, MFA, account recovery); the project owns a framework-agnostic middleware boundary, a session verifier confined to one module, a Clerk-claim-to-project-verb authorisation adapter, and a reduced principal shape the rest of the codebase reasons against. Targeted at small greenfield rcf-lite projects that want hosted identity without building the user-and-session surface themselves; larger deployments supersede the vendor by superseding ADR-1001 with a project-level ADR and swapping the middleware and verifier adapters.
|
|
4
|
+
|
|
5
|
+
## Apply
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
rcf define blueprint add <path-to>/blueprints/security-auth-clerk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Phase 1 resolves local path sources only; registry and git-ref resolution is a mechanism follow-up. Apply is idempotent; `rcf define blueprint list` shows the applied entry grouped under the `security` category; `rcf define blueprint remove security-auth-clerk` cleanly removes an unreferenced application.
|
|
12
|
+
|
|
13
|
+
Composing with `security-auth-magic-link` (or any other blueprint contributing `scope: global` on `authModel`, which includes `application-spa` and `application-api-rest`) raises a `globalAdrTopic` conflict at add time. The four documented resolutions apply (adopt the incoming, keep the existing, project-level supersede ADR, or `--resolve authModel=project:<ADR-id>` on the add). See `docs/topics.md` for the deliberate-conflict statement.
|
|
14
|
+
|
|
15
|
+
## Anatomy
|
|
16
|
+
|
|
17
|
+
| Piece | Where | What |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| Metadata | `blueprint.json` | Slug, version, category `security`, and the 29 contributions with scope/topic on the one global ADR |
|
|
20
|
+
| Doc set | `contributions/` | 9 REQs, 11 USs (25 ACs), 4 TACs, 5 ADRs, all schema-valid and namespaced (`security-auth-clerk-REQ-001` prefix family; `ADR-1001-security-auth-clerk-auth-model` suffix family) |
|
|
21
|
+
| React-family sample | `assets/wiring/clerk-provider-react.md` | The shape of a `ClerkProvider` wiring in a React-family client tier: where the provider mounts, what the SPA blueprint's session-and-redirect posture composes with |
|
|
22
|
+
| Vue-family sample | `assets/wiring/clerk-provider-vue.md` | The same shape rendered for a Vue-family client tier so the operator can pattern-match without a framework translation step |
|
|
23
|
+
| Middleware sample (Node) | `assets/middleware/node-middleware-shape.md` | The framework-agnostic middleware boundary contract (`verify(request)`), with adapter samples for Express and Fastify |
|
|
24
|
+
| Middleware sample (Workers) | `assets/middleware/workers-fetch-shape.md` | The Cloudflare Workers fetch-handler adapter around the same `verify(request)` contract; a project on Workers picks up this file, a project on Node picks up the Node sample |
|
|
25
|
+
| Workers wrangler integration | `assets/wiring/workers-wrangler-toml-shape.md` | The wrangler.toml overlay a Workers deployer applies: `nodejs_compat`, `CLERK_SIGN_IN_URL`, the Clerk secret names, and the `run_worker_first` posture the auth-gate bypass finding required |
|
|
26
|
+
| Role-claim mapping | `assets/authorisation/role-claim-mapping-sample.md` | A worked verb-to-role mapping-table example, with the reduction from Clerk's `org:role` claim shape into the project's `roles` array |
|
|
27
|
+
| Guide | `guide/security-auth-clerk.md` | Operator-facing: when to use it, when not, the promotion signals for the OAuth2 and Keycloak siblings, the operator decisions that remain open, the cost-honesty paragraph |
|
|
28
|
+
| Coordination vocabulary | `docs/topics.md` | The one global-topic string this blueprint contributes and the shared id band registry (application-spa, application-api-rest, security-auth-magic-link, email-smtp-resend, persistence-data-sqlite, delivery-ci-workflows, observability-essentials, security-secrets-management, security-auth-clerk) |
|
|
29
|
+
|
|
30
|
+
The doc set is contributions (copied into the project tree by `rcf define blueprint add`); the guide, assets, and docs are package-resident references. Guide rendering into `rcf/knowledge/docs/blueprint-guides/` and asset ingestion are mechanism follow-ups; until they land, the working agent reads them from the applied blueprint's source path recorded in `manifest.blueprints[].source`.
|
|
31
|
+
|
|
32
|
+
## What it contributes, and what it deliberately does not
|
|
33
|
+
|
|
34
|
+
Contributed kinds: REQ, US (with inline ACs), TAC, ADR. Adherence is expressed as ACs; the blueprint ships no test files (ratified decision 5) and no code.
|
|
35
|
+
|
|
36
|
+
No FBS contributions, as a matter of principle (ratified policy 2026-08-19): FBSs are the work of the implementing agent, not the blueprint; project constraints have to be applied at the time of creation. The blueprint contributes the WHAT (Clerk-hosted identity, the `__session` cookie transport, the middleware boundary shape, the authorisation-adapter contract, the claims-mapping discipline, the session-lifecycle posture, the `signInStrategy` config surface, the read-only provisioning posture, the delegated rate-limit posture, the accountBound runtime-verify posture); the implementing agent derives the HOW-tasks (FBS) in the host project, where the ACs contributed here get picked up by the project's own build sequencing.
|
|
37
|
+
|
|
38
|
+
Deliberately not contributed: a Clerk SDK version pin (the blueprint fixes the shape, not the version; the project's package manifest pins the SDK); MFA configuration (Clerk owns MFA at the hosted surface; the blueprint delegates); a Clerk-webhook consumer contract (out of scope for the default; a project that needs one adds one project-authored TAC and one scope-local ADR); a project-side user table or organisation table (Clerk is authoritative; a project that mirrors state into a local table does so through a project-authored consumer, not through this blueprint); a project-side rate limiter or anti-enumeration defence on the sign-in flow (Clerk-delegated per REQ-007); a fixed sign-in strategy choice (fixed shape per REQ-005, choice is project-owned); an OAuth2 provider list (that is the sibling `security-auth-oauth2` blueprint's territory when it ships); a Keycloak realm configuration (that is `security-auth-keycloak`'s territory when it ships).
|
|
39
|
+
|
|
40
|
+
## The one global decision
|
|
41
|
+
|
|
42
|
+
ADR-1001-security-auth-clerk-auth-model ships `scope: global` on topic `authModel`. This is the project's single decision on how identity is proven, where credentials live, and what the wire credential looks like. Composing with `security-auth-magic-link`, `application-spa`, `application-api-rest`, or any future `security-auth-*` blueprint conflicts here by design and expects a project-level ADR resolution. The composition-precedent (SPA + REST on `errorEnvelope` and `authModel`) is the same pattern.
|
|
43
|
+
|
|
44
|
+
See `docs/topics.md` for the exact strings, the expected resolutions, and the AC id band allocation (security-auth-clerk owns 9101-9899, ADR/TAC suffix block 10xx / 1001-1099; this is the first blueprint whose ADR/TAC suffix crosses into four digits).
|
|
45
|
+
|
|
46
|
+
## Quality bar
|
|
47
|
+
|
|
48
|
+
A framework-agnostic middleware boundary as the single point of authentication decision on the server; every runtime path that needs the caller's identity reads the reduced Principal shape attached at `request.auth`; the Clerk SDK is imported by exactly two modules (middleware wiring and session verifier); the wire credential is Clerk's `__session` cookie with Secure, HttpOnly, and SameSite=Lax; a tampered cookie is rejected with an audit event carrying no cookie value; every authorisation check goes through the adapter's `can` or `assert` and speaks in project verbs, never in Clerk role or claim vocabulary; role-based UI slots render only when the adapter grants the verb and the corresponding server-side handler enforces the same verb through `assert`; a Clerk-initiated sign-out invalidates subsequent requests within the documented `revocationCheckIntervalMs`; the sign-in surface applies no project-authored rate limiter (Clerk-delegated); user and organisation mutations against Clerk are confined to a provisioning script directory (not a request handler); the `signInStrategy` config surface fixes the shape not the choice; runtime-verify ACs are `accountBound` and skip with a stable-coded reason when Clerk is unreachable rather than passing on a fake. Every bar is carried by ACs in the doc set, not by this README.
|
|
49
|
+
|
|
50
|
+
## Known mechanism-reach gaps
|
|
51
|
+
|
|
52
|
+
None at v1.0.0, given the same posture the security-secrets-management blueprint takes: every AC on every story is bound to at least one TAC that the host project must realise, and every AC's `then` clause is runtime-observable (cookie-jar inspection for the transport contract, `request.auth` shape inspection for the principal reduction, source-tree import scans for the Clerk-SDK boundary, `can` and `assert` return values for the authorisation adapter, page-render inspection for the UI-slot gating, live sign-out plus replay for the revocation behaviour, live rate-limit burst against Clerk for the delegation posture, and source-tree call-site scans for the read-only provisioning posture). The mechanism-reach principle from the authoring standard section 7 is satisfied at ship: a project that applies this blueprint and does not realise a TAC leaves an unresolved `tacIds` reference on the story that `rcf define validate` and `rcf audit coverage` refuse. The one operational surface a project must own is the middleware boundary implementation for its specific HTTP framework (an Express shim, a Fastify plugin, a Workers fetch wrapper) plus the vendor adapter inside the session verifier; those responsibilities are stated as TAC interfaces, not as smuggled runtime probes. Two ACs whose runtime observability depends on the operator's Clerk deployment reachability are AC-9107-2 (revocation propagation window) and AC-9109-2 (Clerk-documented rate-limit response shape): both are accountBound and the runtime-verify skip mechanism named on AC-9110-2 covers them when Clerk is unreachable.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Verb-to-role mapping sample
|
|
2
|
+
|
|
3
|
+
A worked example of the project-authored mapping table the authorisation adapter (TAC-1002) consumes, plus a worked example of the claims-mapper reduction (TAC-1004) that turns Clerk's raw claim shape into the `Principal.roles` and `Principal.organisationIds` the adapter reasons against.
|
|
4
|
+
|
|
5
|
+
## The mapping table
|
|
6
|
+
|
|
7
|
+
The mapping table is a project-authored module the adapter loads once at construction. Verbs are project vocabulary; roles are the strings Clerk propagates. A verb absent from the table evaluates to `false` on `can` and throws on `assert`.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
// src/authz/mapping-table.ts
|
|
11
|
+
export const mappingTable = {
|
|
12
|
+
// Editorial workflow
|
|
13
|
+
'article.read': { roles: ['reader', 'editor', 'admin'] },
|
|
14
|
+
'article.edit': { roles: ['editor', 'admin'] },
|
|
15
|
+
'article.delete': { roles: ['admin'] },
|
|
16
|
+
|
|
17
|
+
// Billing surface
|
|
18
|
+
'billing.invoice.view': { roles: ['billing', 'admin'] },
|
|
19
|
+
'billing.invoice.void': { roles: ['admin'] },
|
|
20
|
+
|
|
21
|
+
// Admin dashboard
|
|
22
|
+
'admin.dashboard.view': { roles: ['admin'] },
|
|
23
|
+
'admin.users.view': { roles: ['admin'] },
|
|
24
|
+
'admin.users.impersonate': { roles: ['admin'] },
|
|
25
|
+
};
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## The claims-mapper reduction
|
|
29
|
+
|
|
30
|
+
The claims mapper reads a raw Clerk claim bag (as returned by the session verifier on success) and produces the `Principal` the adapter reasons against. The `CLERK_CLAIM_KEYS` constant is the one place in the module that hard-codes Clerk-side claim key strings; a Clerk-side rename is a one-file change here.
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
// src/auth/claims-mapper.ts
|
|
34
|
+
const CLERK_CLAIM_KEYS = {
|
|
35
|
+
userId: 'sub', // Clerk emits the user id on the JWT-standard sub claim
|
|
36
|
+
organisationMemberships: 'org_memberships',
|
|
37
|
+
organisationId: 'org_id',
|
|
38
|
+
organisationRole: 'org_role',
|
|
39
|
+
publicMetadata: 'public_metadata',
|
|
40
|
+
// Adjust these values against Clerk's currently-canonical claim vocabulary at
|
|
41
|
+
// the SDK version the project builds against.
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export function reduceClaims(rawClaims) {
|
|
45
|
+
const principalId = rawClaims?.[CLERK_CLAIM_KEYS.userId];
|
|
46
|
+
if (!principalId || typeof principalId !== 'string') {
|
|
47
|
+
const err = new Error('PRINCIPAL_REDUCTION_FAILED: missing or invalid user id claim');
|
|
48
|
+
err.code = 'PRINCIPAL_REDUCTION_FAILED';
|
|
49
|
+
throw err;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const orgMemberships = rawClaims[CLERK_CLAIM_KEYS.organisationMemberships] ?? [];
|
|
53
|
+
const organisationIds = orgMemberships.map((m) => m[CLERK_CLAIM_KEYS.organisationId]);
|
|
54
|
+
const orgRoles = orgMemberships.map((m) => m[CLERK_CLAIM_KEYS.organisationRole]);
|
|
55
|
+
|
|
56
|
+
// Global roles (from publicMetadata.roles by convention) plus per-org roles
|
|
57
|
+
// flatten into one bare-string roles array; the set membership is what the
|
|
58
|
+
// adapter reasons against.
|
|
59
|
+
const globalRoles = rawClaims?.[CLERK_CLAIM_KEYS.publicMetadata]?.roles ?? [];
|
|
60
|
+
const roles = Array.from(new Set([...globalRoles, ...orgRoles]));
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
principalId,
|
|
64
|
+
roles,
|
|
65
|
+
organisationIds,
|
|
66
|
+
claims: rawClaims,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Downstream code speaks in verbs
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
// src/handlers/article-edit.ts
|
|
75
|
+
import { assert } from '../authz/adapter';
|
|
76
|
+
|
|
77
|
+
export async function handleArticleEdit(request, response) {
|
|
78
|
+
assert(request.auth, 'article.edit', { organisationId: request.body.organisationId });
|
|
79
|
+
// If assert did not throw, the caller is allowed.
|
|
80
|
+
// Proceed with the edit.
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Never:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
// ANTI-PATTERN: bypasses the adapter, reads Clerk vocabulary in a handler.
|
|
88
|
+
if (request.auth.roles.includes('editor') || request.auth.roles.includes('admin')) {
|
|
89
|
+
// ...
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The scan on AC-9104-3 catches the anti-pattern; the discipline is that every check goes through `can` or `assert`.
|
|
94
|
+
|
|
95
|
+
## Notes
|
|
96
|
+
|
|
97
|
+
- The mapping table is small enough at project boot that adding a verb is a one-line edit; a project whose table grows past a hundred verbs is signal to consolidate at a coarser verb grain, not to bypass the adapter.
|
|
98
|
+
- The organisation-scoping subject shape (`{ organisationId }` on the second argument of `assert`) is the blueprint's default. Projects that need finer subject shapes (record-owner predicates, hierarchical org trees) layer them above the adapter's return value rather than replacing the adapter.
|
|
99
|
+
- The `publicMetadata.roles` convention above is one of several ways to propagate global roles from Clerk into the session; the specific convention is a Clerk-configuration choice the operator makes on the Clerk dashboard, and the claims mapper adjusts accordingly.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Node middleware boundary shape
|
|
2
|
+
|
|
3
|
+
The framework-agnostic middleware boundary contract, worked as a shape reference plus two framework-specific adapter samples. The blueprint's TAC-1001 fixes the shape (`verify(request) -> { authenticated, principal?, reason? }`) and the attachment convention (`request.auth`). The framework adapters below are one-file wrappers around the same `verify`; a project on Fastify does not import the Express sample, and vice versa.
|
|
4
|
+
|
|
5
|
+
## The core `verify` shape
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
// src/auth/middleware.ts (or the project's equivalent module path)
|
|
9
|
+
import { createSessionVerifier } from './session-verifier';
|
|
10
|
+
import { reduceClaims } from './claims-mapper';
|
|
11
|
+
|
|
12
|
+
export function createVerify({ clerkClient, auditSink, clock }) {
|
|
13
|
+
const verifier = createSessionVerifier({ clerkClient, auditSink, clock });
|
|
14
|
+
|
|
15
|
+
return async function verify(request) {
|
|
16
|
+
const cookieHeader = request.headers.cookie ?? '';
|
|
17
|
+
const sessionCookie = parseCookie(cookieHeader, '__session');
|
|
18
|
+
if (!sessionCookie) {
|
|
19
|
+
return { authenticated: false, reason: 'no-session-cookie' };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const result = await verifier.verifySessionCookie(sessionCookie);
|
|
23
|
+
if (!result.valid) {
|
|
24
|
+
return { authenticated: false, reason: result.reason ?? 'invalid-session' };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const principal = reduceClaims(result.claims);
|
|
28
|
+
return { authenticated: true, principal };
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`parseCookie` is a one-liner cookie-header parser the project already has (or writes as a two-line helper); Clerk's SDK exposes its own cookie helpers on some Node adapters, and using those is fine.
|
|
34
|
+
|
|
35
|
+
## Express adapter
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
// src/auth/adapters/express.ts
|
|
39
|
+
import { createVerify } from '../middleware';
|
|
40
|
+
|
|
41
|
+
export function expressMiddleware(deps) {
|
|
42
|
+
const verify = createVerify(deps);
|
|
43
|
+
|
|
44
|
+
return async function (req, res, next) {
|
|
45
|
+
const result = await verify(req);
|
|
46
|
+
if (!result.authenticated) {
|
|
47
|
+
if (req.accepts('html')) {
|
|
48
|
+
return res.redirect(302, '/sign-in');
|
|
49
|
+
}
|
|
50
|
+
return res.status(401).json({ error: 'unauthenticated', reason: result.reason });
|
|
51
|
+
}
|
|
52
|
+
req.auth = result.principal;
|
|
53
|
+
next();
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Fastify adapter
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
// src/auth/adapters/fastify.ts
|
|
62
|
+
import fp from 'fastify-plugin';
|
|
63
|
+
import { createVerify } from '../middleware';
|
|
64
|
+
|
|
65
|
+
export const fastifyPlugin = fp(async (fastify, deps) => {
|
|
66
|
+
const verify = createVerify(deps);
|
|
67
|
+
|
|
68
|
+
fastify.addHook('preHandler', async (request, reply) => {
|
|
69
|
+
const result = await verify(request);
|
|
70
|
+
if (!result.authenticated) {
|
|
71
|
+
if (request.headers.accept?.includes('text/html')) {
|
|
72
|
+
return reply.redirect(302, '/sign-in');
|
|
73
|
+
}
|
|
74
|
+
return reply.code(401).send({ error: 'unauthenticated', reason: result.reason });
|
|
75
|
+
}
|
|
76
|
+
request.auth = result.principal;
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Notes
|
|
82
|
+
|
|
83
|
+
- Both adapters attach to `request.auth`; downstream handlers read the same field name regardless of framework. This is what the `AC-9101-2` runtime observation binds against.
|
|
84
|
+
- Both adapters refuse with 401 for API-shaped requests and a 302 redirect for HTML-shaped ones; the shape choice is a route-class convention the operator adjusts if the project's error envelope differs.
|
|
85
|
+
- Neither adapter caches the verification result across requests inside the adapter; the caching (if any) lives inside the session verifier and is bounded by the `revocationCheckIntervalMs` window on ADR-1005.
|
|
86
|
+
- Neither adapter reads the raw claim bag; the reduction happens once inside `createVerify` and the adapter attaches the reduced `Principal`.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Workers fetch-handler shape
|
|
2
|
+
|
|
3
|
+
The Cloudflare Workers adapter for the middleware boundary (TAC-1001). Chooser: a project on Node picks up `node-middleware-shape.md` (Express or Fastify adapter around `verify(request)`); a project on Workers picks up this file. Both adapters wrap the same `verify` contract; the reduced `Principal` shape the project reasons against downstream is identical.
|
|
4
|
+
|
|
5
|
+
## Why Workers gets its own sample
|
|
6
|
+
|
|
7
|
+
The framework-agnostic `verify(request)` contract (TAC-1001 responsibility 1) already carries onto Workers. What differs is mechanical:
|
|
8
|
+
|
|
9
|
+
- **Request object.** The handler receives a Fetch API `Request`; header reads go through `request.headers.get('cookie')`, not `request.headers.cookie`. There is no `req.accepts()`; content-negotiation is a header inspection on `accept`.
|
|
10
|
+
- **Response shape.** Handlers return a Fetch API `Response` synchronously; there is no `res.status().json()` chain. The refusal paths return `new Response(...)` bodies.
|
|
11
|
+
- **Secret transport.** The Clerk secret arrives on `env.CLERK_SECRET_KEY` (and `env.CLERK_PUBLISHABLE_KEY`) at request time, not from `process.env` at module load. The `createVerify` factory therefore runs inside the fetch handler, not at module top-level; a per-request construction is cheap because Clerk's `authenticateRequest` is the network cost, not the client construction.
|
|
12
|
+
- **Session-cookie parse.** Clerk's `@clerk/backend` `authenticateRequest(request, ...)` reads the `__session` cookie off the Fetch `Request` itself; no manual cookie header parsing is needed at the middleware seam. The pre-check below (a substring test for `__session=`) is a fast-path refusal so unauthenticated hits do not incur an SDK round trip.
|
|
13
|
+
|
|
14
|
+
## The Workers fetch adapter
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
// src/auth/adapters/workers.mjs
|
|
18
|
+
import { createSessionVerifier } from '../session-verifier.mjs';
|
|
19
|
+
import { reduceClaims } from '../claims-mapper.mjs';
|
|
20
|
+
|
|
21
|
+
function jsonResponse(body, status) {
|
|
22
|
+
return new Response(JSON.stringify(body), {
|
|
23
|
+
status,
|
|
24
|
+
headers: { 'content-type': 'application/json' }
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function createVerify({ clerkSecretKey, clerkPublishableKey, auditSink, clock }) {
|
|
29
|
+
const verifier = createSessionVerifier({
|
|
30
|
+
clerkSecretKey,
|
|
31
|
+
clerkPublishableKey,
|
|
32
|
+
auditSink,
|
|
33
|
+
clock
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return async function verify(request) {
|
|
37
|
+
// Fast-path refusal without an SDK round trip.
|
|
38
|
+
const cookieHeader = request.headers.get('cookie') ?? '';
|
|
39
|
+
if (!/(?:^|;\s*)__session=/.test(cookieHeader)) {
|
|
40
|
+
return { authenticated: false, reason: 'no-session-cookie' };
|
|
41
|
+
}
|
|
42
|
+
// Clerk's authenticateRequest reads the __session cookie off the Request
|
|
43
|
+
// and does the vendor-verified session verification server-side.
|
|
44
|
+
const result = await verifier.verifySessionCookie(null, request);
|
|
45
|
+
if (!result.valid) {
|
|
46
|
+
return { authenticated: false, reason: result.reason ?? 'invalid-session' };
|
|
47
|
+
}
|
|
48
|
+
let principal;
|
|
49
|
+
try {
|
|
50
|
+
principal = reduceClaims(result.claims);
|
|
51
|
+
} catch (err) {
|
|
52
|
+
return { authenticated: false, reason: 'claims-map-failed' };
|
|
53
|
+
}
|
|
54
|
+
return { authenticated: true, principal };
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// One-file adapter that a route dispatcher inside `fetch()` can call.
|
|
59
|
+
// The blueprint does not mandate any particular router; the shape below is
|
|
60
|
+
// the seam a project's router calls into. Route dispatch stays a project
|
|
61
|
+
// concern.
|
|
62
|
+
export function workersRequireAuth({ verify }) {
|
|
63
|
+
return async function requireAuth(request) {
|
|
64
|
+
const result = await verify(request);
|
|
65
|
+
if (result.authenticated) {
|
|
66
|
+
return { ok: true, principal: result.principal };
|
|
67
|
+
}
|
|
68
|
+
const wantsHtml = (request.headers.get('accept') ?? '').includes('text/html');
|
|
69
|
+
const refusal = wantsHtml
|
|
70
|
+
? Response.redirect(new URL('/sign-in', request.url).toString(), 302)
|
|
71
|
+
: jsonResponse({ error: 'unauthenticated', reason: result.reason }, 401);
|
|
72
|
+
return { ok: false, refusal };
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Wiring it inside a fetch handler
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
// src/worker.mjs
|
|
81
|
+
import { createVerify, workersRequireAuth } from './auth/adapters/workers.mjs';
|
|
82
|
+
|
|
83
|
+
export default {
|
|
84
|
+
async fetch(request, env, ctx) {
|
|
85
|
+
const url = new URL(request.url);
|
|
86
|
+
|
|
87
|
+
// Public probes and the sign-in redirect run before the auth gate.
|
|
88
|
+
if (url.pathname === '/health' && request.method === 'GET') {
|
|
89
|
+
return new Response(null, { status: 200 });
|
|
90
|
+
}
|
|
91
|
+
if (url.pathname === '/sign-in') {
|
|
92
|
+
return Response.redirect(env.CLERK_SIGN_IN_URL, 302);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Auth-gated routes go through the middleware boundary.
|
|
96
|
+
const verify = createVerify({
|
|
97
|
+
clerkSecretKey: env.CLERK_SECRET_KEY,
|
|
98
|
+
clerkPublishableKey: env.CLERK_PUBLISHABLE_KEY,
|
|
99
|
+
auditSink: (evt) => console.log(JSON.stringify({ ...evt, kind: 'audit' })),
|
|
100
|
+
clock: () => new Date()
|
|
101
|
+
});
|
|
102
|
+
const requireAuth = workersRequireAuth({ verify });
|
|
103
|
+
|
|
104
|
+
if (url.pathname.startsWith('/api/')) {
|
|
105
|
+
const authResult = await requireAuth(request);
|
|
106
|
+
if (!authResult.ok) return authResult.refusal;
|
|
107
|
+
// request.auth is a Fetch API surface convention the project owns:
|
|
108
|
+
// attach the principal onto a locals object the route handler reads.
|
|
109
|
+
return dispatchApi(url, request, env, ctx, authResult.principal);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return env.ASSETS.fetch(request);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Notes
|
|
118
|
+
|
|
119
|
+
- **Attachment convention.** The Fetch `Request` is immutable, so the middleware cannot literally set `request.auth`. The Workers adapter's shape returns `{ ok, principal, refusal }` and the route handler carries the `principal` forward as a function argument. AC-9101-2's runtime observation binds against the reduced `Principal` shape on the successful path either way; the mechanism of attachment is framework-shaped, not contract-shaped.
|
|
120
|
+
- **SDK boundary discipline.** Only `session-verifier.mjs` and this adapter's `createVerify` factory import from `@clerk/backend`. AC-9102-2's source-tree scan still holds on Workers; the two-module allowance covers the Workers case unchanged.
|
|
121
|
+
- **Refusal shape.** The 401 JSON body for API-shaped routes and the 302 redirect for HTML-shaped routes match the Node adapters. AC-9103-2 and AC-9103-3 read the same shapes.
|
|
122
|
+
- **Static-asset ordering.** The wrangler `[assets]` binding serves files before the fetch handler runs by default, which silently bypasses this middleware on any URL that also resolves to a static file. The `run_worker_first` posture on any auth-gated route is a wrangler-configuration concern; the workers wrangler.toml sample carries the fix.
|
|
123
|
+
- **Runtime.** The verifier calls into `@clerk/backend` which needs Node built-ins; wrangler's `compatibility_flags = ["nodejs_compat"]` is the enabling flag on the wrangler side. This is a runtime-config concern, not a middleware-shape concern.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# ClerkProvider wiring: React-family sample
|
|
2
|
+
|
|
3
|
+
This is a shape-level sample for wiring Clerk's client SDK into a React-family client tier. It is a reference for the operator or the working agent realising the blueprint's TACs; it is not a copy-paste production module. The Clerk SDK identifiers below (`@clerk/clerk-react`, `ClerkProvider`, `useAuth`, `useUser`) reflect the SDK's shape at the blueprint's authoring window; consult Clerk's currently-canonical documentation at the project's build time and adjust if the package or export name has changed.
|
|
4
|
+
|
|
5
|
+
## Where the provider mounts
|
|
6
|
+
|
|
7
|
+
The provider wraps the client tier's route surface once, at the top of the tree, above the router. Every route inside the provider has access to the Clerk client through the hook surface; nothing outside the provider does.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
// src/main.tsx (or the framework's equivalent boot module)
|
|
11
|
+
import { ClerkProvider } from '@clerk/clerk-react';
|
|
12
|
+
import { Router } from './router';
|
|
13
|
+
|
|
14
|
+
const publishableKey = window.__CLERK_PUBLISHABLE_KEY__;
|
|
15
|
+
// Read from the project's config surface, not from process.env directly.
|
|
16
|
+
// The secrets-management blueprint's Secrets Manager client is the source
|
|
17
|
+
// on the server side; the client tier consumes the publishable key
|
|
18
|
+
// as a build-time replacement or a boot-time injected global.
|
|
19
|
+
|
|
20
|
+
export function App() {
|
|
21
|
+
return (
|
|
22
|
+
<ClerkProvider publishableKey={publishableKey}>
|
|
23
|
+
<Router />
|
|
24
|
+
</ClerkProvider>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## What the client tier reads
|
|
30
|
+
|
|
31
|
+
Two hooks cover most cases:
|
|
32
|
+
|
|
33
|
+
- `useAuth()` returns `{ isSignedIn, signOut, ... }`. The client tier calls `signOut()` on the operator's sign-out action; this is what invalidates the session on Clerk's side per AC-9107-1.
|
|
34
|
+
- `useUser()` returns the resolved user object; the client tier reads it for display purposes (an avatar, a display name). Downstream authorisation checks do not run on the client-tier user object; they run on the server against `request.auth` through the authorisation adapter.
|
|
35
|
+
|
|
36
|
+
## The `__session` cookie is invisible to the client tier
|
|
37
|
+
|
|
38
|
+
The Clerk SDK on the client tier does not read the `__session` cookie value (it is HttpOnly). The SDK's client-side state (whether the user is signed in, who the user is at the display level) is synchronised through Clerk's own client-side session store; the cookie is the credential the browser sends to the project's server on every same-origin request.
|
|
39
|
+
|
|
40
|
+
## Composition with the SPA blueprint
|
|
41
|
+
|
|
42
|
+
If the project has applied `application-spa`, the SPA blueprint's 401-redirect posture composes with this blueprint's middleware: a route the SPA blueprint marks as requiring authentication redirects to the sign-in surface when the middleware refuses; the SPA blueprint's error envelope shape is unchanged by this blueprint.
|
|
43
|
+
|
|
44
|
+
## What this sample deliberately does not cover
|
|
45
|
+
|
|
46
|
+
- A specific router library binding (React Router, TanStack Router). The provider mounts above the router; the router choice is the project's.
|
|
47
|
+
- Server-side rendering configuration. The Clerk SDK has SSR support that varies by framework (Next.js, Remix); consult the currently-canonical Clerk documentation for the project's framework.
|
|
48
|
+
- The sign-in and sign-up components themselves (`<SignIn />`, `<SignUp />`, or the hosted alternative). Those are Clerk-provided; the operator mounts them at a route (`/sign-in`, `/sign-up`) and the blueprint's job is to verify the resulting session on the server.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Clerk plugin wiring: Vue-family sample
|
|
2
|
+
|
|
3
|
+
The Vue-family counterpart to the React sample. Same shape (a provider mounted once, above the router); different SDK. The Clerk Vue-family package identifier below (`@clerk/vue`) reflects Clerk's Vue support at the blueprint's authoring window; consult Clerk's currently-canonical documentation at the project's build time and adjust if the package or plugin surface has changed.
|
|
4
|
+
|
|
5
|
+
## Where the plugin registers
|
|
6
|
+
|
|
7
|
+
The plugin registers on the Vue app instance once, at boot, before the router is used.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
// src/main.ts (or the framework's equivalent boot module)
|
|
11
|
+
import { createApp } from 'vue';
|
|
12
|
+
import { clerkPlugin } from '@clerk/vue';
|
|
13
|
+
import App from './App.vue';
|
|
14
|
+
import { router } from './router';
|
|
15
|
+
|
|
16
|
+
const publishableKey = window.__CLERK_PUBLISHABLE_KEY__;
|
|
17
|
+
// Read from the project's config surface, not from import.meta.env directly.
|
|
18
|
+
// Same convention as the React sample.
|
|
19
|
+
|
|
20
|
+
const app = createApp(App);
|
|
21
|
+
app.use(clerkPlugin, { publishableKey });
|
|
22
|
+
app.use(router);
|
|
23
|
+
app.mount('#app');
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## What the client tier reads
|
|
27
|
+
|
|
28
|
+
The Clerk Vue plugin exposes composables (`useAuth`, `useUser`, `useSignOut`) whose surface mirrors the React hooks. The client tier calls `useSignOut()` (or the equivalent) on the operator's sign-out action; that is what invalidates the session on Clerk's side per AC-9107-1.
|
|
29
|
+
|
|
30
|
+
## The `__session` cookie is invisible to the client tier
|
|
31
|
+
|
|
32
|
+
Same rule as the React sample: the cookie is HttpOnly; the SDK synchronises client-side sign-in state through its own store; the cookie rides on every same-origin request to the project's server.
|
|
33
|
+
|
|
34
|
+
## Composition with the SPA blueprint
|
|
35
|
+
|
|
36
|
+
If the project has applied `application-spa`, the SPA blueprint's 401-redirect posture composes with this blueprint's middleware exactly as it does in the React case; the SPA blueprint's session-and-redirect posture is framework-agnostic on the client tier.
|
|
37
|
+
|
|
38
|
+
## What this sample deliberately does not cover
|
|
39
|
+
|
|
40
|
+
- Nuxt-specific module wiring. Clerk has Nuxt-specific modules; the operator on a Nuxt project consults Clerk's Nuxt documentation for the module-mode wiring rather than following this shape.
|
|
41
|
+
- The sign-in and sign-up components. Same as the React sample: those are Clerk-provided.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Workers wrangler.toml integration note
|
|
2
|
+
|
|
3
|
+
The wrangler-side configuration a project needs when the Clerk middleware runs inside a Cloudflare Worker. This is a composition boundary between this blueprint (owns the middleware and session-verifier contracts) and `deploy-cloudflare-workers` (owns the wrangler shape); the notes below are the Clerk-specific overlay a Workers deployer applies on top of that blueprint's wrangler-toml sample.
|
|
4
|
+
|
|
5
|
+
## The Clerk-specific overlay
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
# wrangler.toml - Clerk-specific overlay
|
|
9
|
+
compatibility_flags = ["nodejs_compat"]
|
|
10
|
+
|
|
11
|
+
[vars]
|
|
12
|
+
# Public URL of the Clerk-hosted sign-in surface. Not a secret; safe to
|
|
13
|
+
# commit. The middleware's HTML refusal path redirects here.
|
|
14
|
+
CLERK_SIGN_IN_URL = "https://<clerk-subdomain>.accounts.dev/sign-in"
|
|
15
|
+
|
|
16
|
+
[assets]
|
|
17
|
+
directory = "./public"
|
|
18
|
+
binding = "ASSETS"
|
|
19
|
+
# Every auth-gated route that could collide with a static file must appear
|
|
20
|
+
# here, or the assets binding serves the static file BEFORE the fetch
|
|
21
|
+
# handler runs and the middleware is silently bypassed. See the composition
|
|
22
|
+
# note below.
|
|
23
|
+
run_worker_first = ["/api/*", "/sign-in"]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Secrets are declared by name only, in the deploy blueprint's discipline: no `[secrets]` block in wrangler.toml (that block is decorative and not honoured by wrangler at 4.x, per the deploy blueprint's F-009 fix), and no value in any committed file. The two names the Clerk middleware reads are:
|
|
27
|
+
|
|
28
|
+
- `CLERK_SECRET_KEY` - server-side Clerk API key, read as `env.CLERK_SECRET_KEY` by `session-verifier.mjs`.
|
|
29
|
+
- `CLERK_PUBLISHABLE_KEY` - Clerk publishable key, read as `env.CLERK_PUBLISHABLE_KEY` by `session-verifier.mjs`.
|
|
30
|
+
|
|
31
|
+
Bootstrap-and-steady-state guidance for setting the values lives on the deploy blueprint's `bootstrap-vs-steady-state.md` asset; the shape is the same for both Clerk secrets.
|
|
32
|
+
|
|
33
|
+
## The auth-gate bypass finding
|
|
34
|
+
|
|
35
|
+
The default `[assets]` binding on a Cloudflare Worker serves any file in the assets directory at its path before the Worker's `fetch` handler runs. If an auth-gated route (`/notes` for a UI page, `/api/notes` for an API surface) collides with a static file at the same path, the static file is served without ever hitting the middleware. This is a silent auth bypass at ship time; a project ships assuming the middleware protects `/notes` and only finds out on the first live probe that `/notes` returned the HTML shell to an unauthenticated request.
|
|
36
|
+
|
|
37
|
+
The `run_worker_first` array is the wrangler-side fix: every path listed there is routed through the fetch handler before the assets binding gets a chance. A project on the middleware boundary shape should list every auth-gated route class on the list.
|
|
38
|
+
|
|
39
|
+
The composition responsibility is shared: `deploy-cloudflare-workers` teaches the mechanism (`run_worker_first` in wrangler-toml-shape.md, its US-12101 AC-12101-4 is the runtime-observable acceptance), and this blueprint teaches which routes need it (every auth-gated one on the project's HTTP surface). Neither blueprint carries the project's route list; that emerges from the project's own routing surface.
|
|
40
|
+
|
|
41
|
+
## What is NOT taught here
|
|
42
|
+
|
|
43
|
+
- **Which routes are gated.** The blueprint fixes the middleware boundary shape and the auth model. The concrete route list is a project decision the wrangler.toml integrates against.
|
|
44
|
+
- **How the assets binding composes with static-first vs worker-first per-path routing.** The rules and mechanism belong to the deploy blueprint.
|
|
45
|
+
- **Custom-domain vs workers.dev-only production URL.** Same: deploy blueprint concern. The Clerk overlay above is identical either way.
|
|
46
|
+
|
|
47
|
+
## Notes
|
|
48
|
+
|
|
49
|
+
- The `CLERK_SIGN_IN_URL` var is not a secret. Committing it in `wrangler.toml [vars]` is the default; a project that wants the value to differ across environments moves it to an environment-specific `[env.<name>.vars]` block per wrangler's standard shape.
|
|
50
|
+
- The `nodejs_compat` flag is required because `@clerk/backend` relies on Node built-ins. Without it, the Worker fails to start with a runtime error naming the missing built-in.
|
|
51
|
+
- Reading the secret at request time from `env` (not at module top-level from `process.env`) is what the workers-fetch-shape sample's `createVerify` factory does; the two files together are the enabling shape.
|