@raybase/create 0.0.2 → 0.3.4
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/LICENSE +21 -0
- package/THIRD_PARTY_NOTICES.md +38 -0
- package/assets/apple-touch-icons/0.png +0 -0
- package/assets/apple-touch-icons/1.png +0 -0
- package/assets/apple-touch-icons/2.png +0 -0
- package/assets/apple-touch-icons/3.png +0 -0
- package/assets/apple-touch-icons/4.png +0 -0
- package/assets/apple-touch-icons/5.png +0 -0
- package/assets/apple-touch-icons/6.png +0 -0
- package/assets/apple-touch-icons/7.png +0 -0
- package/assets/apple-touch-icons/8.png +0 -0
- package/assets/apple-touch-icons/9.png +0 -0
- package/assets/apple-touch-icons/A.png +0 -0
- package/assets/apple-touch-icons/B.png +0 -0
- package/assets/apple-touch-icons/C.png +0 -0
- package/assets/apple-touch-icons/D.png +0 -0
- package/assets/apple-touch-icons/E.png +0 -0
- package/assets/apple-touch-icons/F.png +0 -0
- package/assets/apple-touch-icons/G.png +0 -0
- package/assets/apple-touch-icons/H.png +0 -0
- package/assets/apple-touch-icons/I.png +0 -0
- package/assets/apple-touch-icons/J.png +0 -0
- package/assets/apple-touch-icons/K.png +0 -0
- package/assets/apple-touch-icons/L.png +0 -0
- package/assets/apple-touch-icons/M.png +0 -0
- package/assets/apple-touch-icons/N.png +0 -0
- package/assets/apple-touch-icons/O.png +0 -0
- package/assets/apple-touch-icons/P.png +0 -0
- package/assets/apple-touch-icons/Q.png +0 -0
- package/assets/apple-touch-icons/R.png +0 -0
- package/assets/apple-touch-icons/S.png +0 -0
- package/assets/apple-touch-icons/T.png +0 -0
- package/assets/apple-touch-icons/U.png +0 -0
- package/assets/apple-touch-icons/V.png +0 -0
- package/assets/apple-touch-icons/W.png +0 -0
- package/assets/apple-touch-icons/X.png +0 -0
- package/assets/apple-touch-icons/Y.png +0 -0
- package/assets/apple-touch-icons/Z.png +0 -0
- package/assets/apple-touch-icons/default.png +0 -0
- package/dist/.source-hash +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2353 -0
- package/dist/index.js.map +1 -0
- package/dist/raybase-package-ranges.d.ts +11 -0
- package/dist/raybase-package-ranges.d.ts.map +1 -0
- package/dist/raybase-package-ranges.js +11 -0
- package/dist/raybase-package-ranges.js.map +1 -0
- package/dist/source-fetch.d.ts +91 -0
- package/dist/source-fetch.d.ts.map +1 -0
- package/dist/source-fetch.js +325 -0
- package/dist/source-fetch.js.map +1 -0
- package/dist/source-hash.d.ts +2 -0
- package/dist/source-hash.d.ts.map +1 -0
- package/dist/source-hash.js +23 -0
- package/dist/source-hash.js.map +1 -0
- package/dist/starter-description.d.ts +44 -0
- package/dist/starter-description.d.ts.map +1 -0
- package/dist/starter-description.js +273 -0
- package/dist/starter-description.js.map +1 -0
- package/dist/starter-source.d.ts +43 -0
- package/dist/starter-source.d.ts.map +1 -0
- package/dist/starter-source.js +156 -0
- package/dist/starter-source.js.map +1 -0
- package/dist/store-app-apply.d.ts +27 -0
- package/dist/store-app-apply.d.ts.map +1 -0
- package/dist/store-app-apply.js +100 -0
- package/dist/store-app-apply.js.map +1 -0
- package/dist/store-app-manifest.d.ts +86 -0
- package/dist/store-app-manifest.d.ts.map +1 -0
- package/dist/store-app-manifest.js +110 -0
- package/dist/store-app-manifest.js.map +1 -0
- package/dist/store-app-registry.d.ts +30 -0
- package/dist/store-app-registry.d.ts.map +1 -0
- package/dist/store-app-registry.js +232 -0
- package/dist/store-app-registry.js.map +1 -0
- package/models/recommended.json +42 -0
- package/modules/api/templates/react-router/app/api/operations.ts +8 -0
- package/modules/api/templates/tanstack-start/src/api/operations.ts +15 -0
- package/modules/docs/templates/astro-emdash/content/docs/getting-started.mdx +13 -0
- package/modules/docs/templates/astro-emdash/content/docs/index.mdx +13 -0
- package/modules/docs/templates/astro-emdash/content/docs/mcp.mdx +11 -0
- package/modules/docs/templates/astro-emdash/content/docs/meta.json +4 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/getting-started.mdx +12 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/index.mdx +12 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/mcp.mdx +10 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/meta.json +4 -0
- package/modules/docs/templates/astro-emdash/site/source.config.ts +10 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-assets.ts +1 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-client.tsx +22 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-data.ts +24 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-handler.tsx +105 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-layout.tsx +56 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-mdx.tsx +79 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-page-actions.tsx +146 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-page.tsx +70 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/llm-text.ts +61 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/source.ts +7 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/docs/[...slug].ts +6 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/docs/api/markdown.ts +4 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/docs/api/search.ts +4 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/llms.txt.ts +8 -0
- package/modules/docs/templates/astro-emdash/site/src/styles-docs.css +3 -0
- package/modules/docs/templates/astro-emdash/source.config.ts +10 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-assets.ts +1 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-client.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-data.ts +24 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-handler.tsx +105 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-layout.tsx +56 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-mdx.tsx +79 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-page-actions.tsx +146 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-page.tsx +70 -0
- package/modules/docs/templates/astro-emdash/src/docs/llm-text.ts +61 -0
- package/modules/docs/templates/astro-emdash/src/docs/source.ts +7 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs/$.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs/api/markdown.ts +12 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs/api/search.ts +12 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs.index.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/styles-docs.css +3 -0
- package/modules/docs/templates/react-router/app/components/mdx.tsx +79 -0
- package/modules/docs/templates/react-router/app/lib/layout.shared.tsx +54 -0
- package/modules/docs/templates/react-router/app/lib/source.ts +7 -0
- package/modules/docs/templates/react-router/app/routes/docs.$.tsx +49 -0
- package/modules/docs/templates/react-router/app/routes/docs.api.search.ts +10 -0
- package/modules/docs/templates/react-router/app/routes/docs.tsx +13 -0
- package/modules/docs/templates/react-router/content/docs/getting-started.mdx +8 -0
- package/modules/docs/templates/react-router/content/docs/index.mdx +8 -0
- package/modules/docs/templates/react-router/content/docs/mcp.mdx +121 -0
- package/modules/docs/templates/react-router/content/docs/meta.json +4 -0
- package/modules/docs/templates/react-router/source.config.ts +5 -0
- package/modules/docs/templates/tanstack-start/content/docs/getting-started.mdx +10 -0
- package/modules/docs/templates/tanstack-start/content/docs/index.mdx +8 -0
- package/modules/docs/templates/tanstack-start/content/docs/mcp.mdx +121 -0
- package/modules/docs/templates/tanstack-start/content/docs/meta.json +4 -0
- package/modules/docs/templates/tanstack-start/source.config.ts +10 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-assets.ts +1 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-client.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-data.ts +24 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-handler.tsx +105 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-layout.tsx +56 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-mdx.tsx +79 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-page-actions.tsx +146 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-page.tsx +70 -0
- package/modules/docs/templates/tanstack-start/src/docs/llm-text.ts +61 -0
- package/modules/docs/templates/tanstack-start/src/docs/source.ts +7 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs/$.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs/api/markdown.ts +12 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs/api/search.ts +12 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs.index.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/styles-docs.css +3 -0
- package/modules/guide/templates/astro-emdash/content/guide/capability-map.md +17 -0
- package/modules/guide/templates/astro-emdash/src/components/guide-widget.tsx +41 -0
- package/modules/guide/templates/astro-emdash/src/guide/actions.ts +8 -0
- package/modules/guide/templates/astro-emdash/src/guide/config.ts +21 -0
- package/modules/guide/templates/astro-emdash/src/guide/corpus.gen.ts +4 -0
- package/modules/guide/templates/astro-emdash/src/guide/corpus.manifest.json +72 -0
- package/modules/guide/templates/astro-emdash/src/guide/corpus.ts +4 -0
- package/modules/guide/templates/astro-emdash/src/guide/resources.json +4 -0
- package/modules/guide/templates/react-router/app/components/guide-widget.tsx +29 -0
- package/modules/guide/templates/react-router/app/guide/actions.ts +3 -0
- package/modules/guide/templates/react-router/app/guide/config.ts +21 -0
- package/modules/guide/templates/react-router/app/guide/corpus.gen.ts +4 -0
- package/modules/guide/templates/react-router/app/guide/corpus.manifest.json +22 -0
- package/modules/guide/templates/react-router/app/guide/corpus.ts +4 -0
- package/modules/guide/templates/react-router/app/guide/resources.json +4 -0
- package/modules/guide/templates/react-router/content/guide/capability-map.md +13 -0
- package/modules/guide/templates/tanstack-start/content/guide/capability-map.md +17 -0
- package/modules/guide/templates/tanstack-start/src/components/guide-widget.tsx +41 -0
- package/modules/guide/templates/tanstack-start/src/guide/actions.ts +17 -0
- package/modules/guide/templates/tanstack-start/src/guide/config.ts +21 -0
- package/modules/guide/templates/tanstack-start/src/guide/corpus.gen.ts +4 -0
- package/modules/guide/templates/tanstack-start/src/guide/corpus.manifest.json +22 -0
- package/modules/guide/templates/tanstack-start/src/guide/corpus.ts +4 -0
- package/modules/guide/templates/tanstack-start/src/guide/resources.json +4 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
- package/modules/openai-subscription/templates/astro-emdash/src/openai-subscription.ts +11 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
- package/modules/openai-subscription/templates/react-router/app/openai-subscription.ts +11 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
- package/modules/openai-subscription/templates/tanstack-start/src/openai-subscription.ts +11 -0
- package/package.json +34 -8
- package/skills/README.md +122 -0
- package/skills/raybase-actions/SKILL.md +223 -0
- package/skills/raybase-actions/references/action-patterns.md +190 -0
- package/skills/raybase-actions/references/adapting-actions.md +93 -0
- package/skills/raybase-actions/references/testing-actions.md +48 -0
- package/skills/raybase-agent-debugging/SKILL.md +230 -0
- package/skills/raybase-ai/SKILL.md +1310 -0
- package/skills/raybase-api/SKILL.md +45 -0
- package/skills/raybase-astro-emdash/SKILL.md +143 -0
- package/skills/raybase-astro-emdash-content-model/SKILL.md +217 -0
- package/skills/raybase-astro-emdash-content-model/references/LICENSE-emdash +9 -0
- package/skills/raybase-astro-emdash-content-model/references/emdash-collections.md +265 -0
- package/skills/raybase-astro-emdash-design/LICENSE-impeccable +60 -0
- package/skills/raybase-astro-emdash-design/SKILL.md +170 -0
- package/skills/raybase-astro-emdash-design/reference/color.md +91 -0
- package/skills/raybase-astro-emdash-design/reference/copy.md +73 -0
- package/skills/raybase-astro-emdash-design/reference/direction.md +115 -0
- package/skills/raybase-astro-emdash-design/reference/imagery.md +84 -0
- package/skills/raybase-astro-emdash-design/reference/layout.md +69 -0
- package/skills/raybase-astro-emdash-design/reference/motion.md +75 -0
- package/skills/raybase-astro-emdash-design/reference/polish.md +75 -0
- package/skills/raybase-astro-emdash-design/reference/typography.md +72 -0
- package/skills/raybase-astro-emdash-galley/SKILL.md +265 -0
- package/skills/raybase-astro-emdash-migration/SKILL.md +218 -0
- package/skills/raybase-astro-emdash-migration/references/inventory-and-conversion.md +242 -0
- package/skills/raybase-astro-emdash-security-review/SKILL.md +68 -0
- package/skills/raybase-astro-emdash-theme-selection/SKILL.md +216 -0
- package/skills/raybase-auth/SKILL.md +358 -0
- package/skills/raybase-background-jobs/SKILL.md +774 -0
- package/skills/raybase-building/SKILL.md +409 -0
- package/skills/raybase-building/references/interview-and-spec.md +87 -0
- package/skills/raybase-building/references/planning-docs.md +26 -0
- package/skills/raybase-building/references/schema-and-config.md +70 -0
- package/skills/raybase-changing-a-live-app/SKILL.md +119 -0
- package/skills/raybase-data-and-policies/SKILL.md +377 -0
- package/skills/raybase-deploy/SKILL.md +136 -0
- package/skills/raybase-docs-writing/SKILL.md +119 -0
- package/skills/raybase-guide/SKILL.md +235 -0
- package/skills/raybase-mcp/SKILL.md +309 -0
- package/skills/raybase-mcp/agents/openai.yaml +4 -0
- package/skills/raybase-notifications/SKILL.md +138 -0
- package/skills/raybase-pro-migration/SKILL.md +28 -0
- package/skills/raybase-react-router/SKILL.md +241 -0
- package/skills/raybase-react-router-design/LICENSE-impeccable +60 -0
- package/skills/raybase-react-router-design/SKILL.md +135 -0
- package/skills/raybase-react-router-design/reference/color.md +87 -0
- package/skills/raybase-react-router-design/reference/copy.md +83 -0
- package/skills/raybase-react-router-design/reference/delight.md +48 -0
- package/skills/raybase-react-router-design/reference/interaction.md +91 -0
- package/skills/raybase-react-router-design/reference/layout.md +82 -0
- package/skills/raybase-react-router-design/reference/motion.md +86 -0
- package/skills/raybase-react-router-design/reference/polish.md +79 -0
- package/skills/raybase-react-router-design/reference/typography.md +71 -0
- package/skills/raybase-react-router-security-review/LICENSE +22 -0
- package/skills/raybase-react-router-security-review/SKILL.md +190 -0
- package/skills/raybase-react-router-security-review/agents/openai.yaml +4 -0
- package/skills/raybase-react-router-security-review/references/api-security.md +519 -0
- package/skills/raybase-react-router-security-review/references/authentication.md +353 -0
- package/skills/raybase-react-router-security-review/references/authorization.md +372 -0
- package/skills/raybase-react-router-security-review/references/business-logic.md +443 -0
- package/skills/raybase-react-router-security-review/references/cryptography.md +329 -0
- package/skills/raybase-react-router-security-review/references/csrf.md +398 -0
- package/skills/raybase-react-router-security-review/references/data-protection.md +378 -0
- package/skills/raybase-react-router-security-review/references/deserialization.md +410 -0
- package/skills/raybase-react-router-security-review/references/error-handling.md +436 -0
- package/skills/raybase-react-router-security-review/references/file-security.md +457 -0
- package/skills/raybase-react-router-security-review/references/injection.md +259 -0
- package/skills/raybase-react-router-security-review/references/logging.md +433 -0
- package/skills/raybase-react-router-security-review/references/misconfiguration.md +435 -0
- package/skills/raybase-react-router-security-review/references/modern-threats.md +475 -0
- package/skills/raybase-react-router-security-review/references/raybase-react-router-security.md +235 -0
- package/skills/raybase-react-router-security-review/references/ssrf.md +413 -0
- package/skills/raybase-react-router-security-review/references/supply-chain.md +405 -0
- package/skills/raybase-react-router-security-review/references/xss.md +336 -0
- package/skills/raybase-realtime/SKILL.md +158 -0
- package/skills/raybase-realtime/agents/openai.yaml +4 -0
- package/skills/raybase-schema/SKILL.md +209 -0
- package/skills/raybase-search/SKILL.md +137 -0
- package/skills/raybase-search/agents/openai.yaml +4 -0
- package/skills/raybase-settings/SKILL.md +139 -0
- package/skills/raybase-settings/agents/openai.yaml +4 -0
- package/skills/raybase-tanstack-start/SKILL.md +166 -0
- package/skills/raybase-tanstack-start-design/LICENSE-impeccable +60 -0
- package/skills/raybase-tanstack-start-design/SKILL.md +140 -0
- package/skills/raybase-tanstack-start-design/reference/color.md +80 -0
- package/skills/raybase-tanstack-start-design/reference/copy.md +83 -0
- package/skills/raybase-tanstack-start-design/reference/delight.md +48 -0
- package/skills/raybase-tanstack-start-design/reference/interaction.md +91 -0
- package/skills/raybase-tanstack-start-design/reference/layout.md +82 -0
- package/skills/raybase-tanstack-start-design/reference/motion.md +86 -0
- package/skills/raybase-tanstack-start-design/reference/polish.md +79 -0
- package/skills/raybase-tanstack-start-design/reference/typography.md +71 -0
- package/skills/raybase-tanstack-start-security-review/LICENSE +22 -0
- package/skills/raybase-tanstack-start-security-review/SKILL.md +194 -0
- package/skills/raybase-tanstack-start-security-review/agents/openai.yaml +4 -0
- package/skills/raybase-tanstack-start-security-review/references/api-security.md +519 -0
- package/skills/raybase-tanstack-start-security-review/references/authentication.md +353 -0
- package/skills/raybase-tanstack-start-security-review/references/authorization.md +372 -0
- package/skills/raybase-tanstack-start-security-review/references/business-logic.md +443 -0
- package/skills/raybase-tanstack-start-security-review/references/cryptography.md +329 -0
- package/skills/raybase-tanstack-start-security-review/references/csrf.md +398 -0
- package/skills/raybase-tanstack-start-security-review/references/data-protection.md +378 -0
- package/skills/raybase-tanstack-start-security-review/references/deserialization.md +410 -0
- package/skills/raybase-tanstack-start-security-review/references/error-handling.md +436 -0
- package/skills/raybase-tanstack-start-security-review/references/file-security.md +457 -0
- package/skills/raybase-tanstack-start-security-review/references/injection.md +259 -0
- package/skills/raybase-tanstack-start-security-review/references/logging.md +433 -0
- package/skills/raybase-tanstack-start-security-review/references/misconfiguration.md +435 -0
- package/skills/raybase-tanstack-start-security-review/references/modern-threats.md +475 -0
- package/skills/raybase-tanstack-start-security-review/references/raybase-tanstack-security.md +208 -0
- package/skills/raybase-tanstack-start-security-review/references/ssrf.md +413 -0
- package/skills/raybase-tanstack-start-security-review/references/supply-chain.md +405 -0
- package/skills/raybase-tanstack-start-security-review/references/xss.md +336 -0
- package/skills-manifest.json +41 -0
- package/templates/astro-emdash/.dev.vars.example +7 -0
- package/templates/astro-emdash/AGENTS.md +122 -0
- package/templates/astro-emdash/DESIGN.md +90 -0
- package/templates/astro-emdash/components.json +21 -0
- package/templates/astro-emdash/content/docs/getting-started.mdx +20 -0
- package/templates/astro-emdash/content/docs/index.mdx +13 -0
- package/templates/astro-emdash/content/docs/mcp.mdx +11 -0
- package/templates/astro-emdash/content/docs/meta.json +4 -0
- package/templates/astro-emdash/content/docs/site-templates.mdx +62 -0
- package/templates/astro-emdash/dev/CODEBASE-MAP.md +46 -0
- package/templates/astro-emdash/dev/SPEC-OVERVIEW.md +15 -0
- package/templates/astro-emdash/dev/SPEC.md +84 -0
- package/templates/astro-emdash/dev/features/archive/.gitkeep +1 -0
- package/templates/astro-emdash/docs/theme-previews/base.svg +24 -0
- package/templates/astro-emdash/docs/theme-previews/steel.svg +24 -0
- package/templates/astro-emdash/docs/theme-previews/zen.svg +24 -0
- package/templates/astro-emdash/docs/themes.md +106 -0
- package/templates/astro-emdash/drizzle.config.ts +5 -0
- package/templates/astro-emdash/gitignore +11 -0
- package/templates/astro-emdash/migrations/app/meta/_journal.json +5 -0
- package/templates/astro-emdash/package.json +79 -0
- package/templates/astro-emdash/pnpm-workspace.yaml +71 -0
- package/templates/astro-emdash/public/_headers +4 -0
- package/templates/astro-emdash/site/astro.config.mjs +120 -0
- package/templates/astro-emdash/site/demo/README.md +72 -0
- package/templates/astro-emdash/site/demo/content/collection.json +43 -0
- package/templates/astro-emdash/site/demo/content/entries.json +120 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-card/manifest.json +51 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-card/sample-content.json +5 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-card/template.liquid +48 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/host.json +9 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/manifest.json +38 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/sample-content.json +34 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/template.liquid +84 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/manifest.json +64 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/page.json +7 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/sample-content.json +24 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/template.liquid +100 -0
- package/templates/astro-emdash/site/demo/templates/demo-menu-nav/manifest.json +51 -0
- package/templates/astro-emdash/site/demo/templates/demo-menu-nav/sample-content.json +5 -0
- package/templates/astro-emdash/site/demo/templates/demo-menu-nav/template.liquid +70 -0
- package/templates/astro-emdash/site/gitignore +1 -0
- package/templates/astro-emdash/site/package.json +56 -0
- package/templates/astro-emdash/site/scripts/apply-site-templates.mjs +560 -0
- package/templates/astro-emdash/site/scripts/galley-demo.mjs +298 -0
- package/templates/astro-emdash/site/scripts/seed-galley-starter.mjs +360 -0
- package/templates/astro-emdash/site/scripts/site-origin.mjs +45 -0
- package/templates/astro-emdash/site/seed/seed.json +154 -0
- package/templates/astro-emdash/site/seed/templates/.gitkeep +1 -0
- package/templates/astro-emdash/site/src/components/RaybaseSignedInMenu.astro +163 -0
- package/templates/astro-emdash/site/src/components/blocks/RaybaseActionIsland.astro +41 -0
- package/templates/astro-emdash/site/src/content-door/raybase-routes.ts +738 -0
- package/templates/astro-emdash/site/src/content-door/resolve-page.ts +142 -0
- package/templates/astro-emdash/site/src/content-door/seed.ts +85 -0
- package/templates/astro-emdash/site/src/env.d.ts +12 -0
- package/templates/astro-emdash/site/src/layouts/SiteLayout.astro +68 -0
- package/templates/astro-emdash/site/src/lib/palettes.gen.ts +7 -0
- package/templates/astro-emdash/site/src/lib/site-motion.ts +169 -0
- package/templates/astro-emdash/site/src/lib/site-shell.ts +294 -0
- package/templates/astro-emdash/site/src/live.config.ts +8 -0
- package/templates/astro-emdash/site/src/middleware.ts +20 -0
- package/templates/astro-emdash/site/src/pages/[...slug].astro +113 -0
- package/templates/astro-emdash/site/src/pages/_raybase/handoff/consume.ts +6 -0
- package/templates/astro-emdash/site/src/pages/_raybase/islands/action.ts +8 -0
- package/templates/astro-emdash/site/src/pages/_raybase/sign-out/index.ts +6 -0
- package/templates/astro-emdash/site/src/styles/palette-fonts.gen.css +1 -0
- package/templates/astro-emdash/site/src/styles/palettes.gen.css +3 -0
- package/templates/astro-emdash/site/src/styles.css +607 -0
- package/templates/astro-emdash/site/tsconfig.json +12 -0
- package/templates/astro-emdash/site/wrangler.jsonc +34 -0
- package/templates/astro-emdash/source.config.ts +10 -0
- package/templates/astro-emdash/src/actions.ts +58 -0
- package/templates/astro-emdash/src/ai/agents.ts +20 -0
- package/templates/astro-emdash/src/ai/retrieval.ts +36 -0
- package/templates/astro-emdash/src/auth-door.ts +18 -0
- package/templates/astro-emdash/src/client.tsx +25 -0
- package/templates/astro-emdash/src/components/.gitkeep +1 -0
- package/templates/astro-emdash/src/components/account-menu.tsx +91 -0
- package/templates/astro-emdash/src/components/auth-shell.tsx +69 -0
- package/templates/astro-emdash/src/components/mode-toggle.tsx +32 -0
- package/templates/astro-emdash/src/components/search-command-palette.tsx +107 -0
- package/templates/astro-emdash/src/components/setup-token-page.tsx +196 -0
- package/templates/astro-emdash/src/components/ui/avatar.tsx +107 -0
- package/templates/astro-emdash/src/components/ui/badge.tsx +52 -0
- package/templates/astro-emdash/src/components/ui/button.tsx +69 -0
- package/templates/astro-emdash/src/components/ui/checkbox.tsx +29 -0
- package/templates/astro-emdash/src/components/ui/dialog.tsx +158 -0
- package/templates/astro-emdash/src/components/ui/dropdown-menu.tsx +303 -0
- package/templates/astro-emdash/src/components/ui/input.tsx +20 -0
- package/templates/astro-emdash/src/components/ui/label.tsx +20 -0
- package/templates/astro-emdash/src/components/ui/scroll-area.tsx +53 -0
- package/templates/astro-emdash/src/components/ui/select.tsx +215 -0
- package/templates/astro-emdash/src/components/ui/separator.tsx +23 -0
- package/templates/astro-emdash/src/components/ui/sheet.tsx +138 -0
- package/templates/astro-emdash/src/components/ui/sidebar.tsx +728 -0
- package/templates/astro-emdash/src/components/ui/skeleton.tsx +13 -0
- package/templates/astro-emdash/src/components/ui/textarea.tsx +18 -0
- package/templates/astro-emdash/src/components/ui/tooltip.tsx +66 -0
- package/templates/astro-emdash/src/db/migrations.gen.ts +6 -0
- package/templates/astro-emdash/src/db/schema.ts +6 -0
- package/templates/astro-emdash/src/db/seed.ts +16 -0
- package/templates/astro-emdash/src/db/storage.ts +32 -0
- package/templates/astro-emdash/src/docs/docs-assets.ts +1 -0
- package/templates/astro-emdash/src/docs/docs-client.tsx +22 -0
- package/templates/astro-emdash/src/docs/docs-data.ts +24 -0
- package/templates/astro-emdash/src/docs/docs-handler.tsx +105 -0
- package/templates/astro-emdash/src/docs/docs-layout.tsx +56 -0
- package/templates/astro-emdash/src/docs/docs-mdx.tsx +79 -0
- package/templates/astro-emdash/src/docs/docs-page-actions.tsx +146 -0
- package/templates/astro-emdash/src/docs/docs-page.tsx +70 -0
- package/templates/astro-emdash/src/docs/llm-text.ts +61 -0
- package/templates/astro-emdash/src/docs/source.ts +7 -0
- package/templates/astro-emdash/src/guide/corpus.gen.ts +4 -0
- package/templates/astro-emdash/src/guide/corpus.manifest.json +72 -0
- package/templates/astro-emdash/src/hooks/use-mobile.ts +19 -0
- package/templates/astro-emdash/src/jobs.example.ts +48 -0
- package/templates/astro-emdash/src/lib/account.ts +12 -0
- package/templates/astro-emdash/src/lib/auth-client.ts +181 -0
- package/templates/astro-emdash/src/lib/utils.ts +6 -0
- package/templates/astro-emdash/src/mcp-app.ts +57 -0
- package/templates/astro-emdash/src/notifications.example.ts +37 -0
- package/templates/astro-emdash/src/raybase.auth.ts +70 -0
- package/templates/astro-emdash/src/raybase.config.ts +49 -0
- package/templates/astro-emdash/src/raybase.server.ts +56 -0
- package/templates/astro-emdash/src/realtime.example.ts +18 -0
- package/templates/astro-emdash/src/router.tsx +19 -0
- package/templates/astro-emdash/src/routes/__root.tsx +56 -0
- package/templates/astro-emdash/src/routes/_app/admin.tsx +13 -0
- package/templates/astro-emdash/src/routes/_app/forgot-password.tsx +97 -0
- package/templates/astro-emdash/src/routes/_app/index.tsx +169 -0
- package/templates/astro-emdash/src/routes/_app/invite.$token.tsx +11 -0
- package/templates/astro-emdash/src/routes/_app/login.tsx +193 -0
- package/templates/astro-emdash/src/routes/_app/profile.tsx +98 -0
- package/templates/astro-emdash/src/routes/_app/reset-password.$token.tsx +15 -0
- package/templates/astro-emdash/src/routes/_app/reset-password.tsx +115 -0
- package/templates/astro-emdash/src/routes/_app/setup.$token.tsx +11 -0
- package/templates/astro-emdash/src/routes/_app/signup.tsx +141 -0
- package/templates/astro-emdash/src/routes/_app/verify-email.$token.tsx +15 -0
- package/templates/astro-emdash/src/routes/_app/verify-email.tsx +154 -0
- package/templates/astro-emdash/src/routes/_app.tsx +33 -0
- package/templates/astro-emdash/src/routes/admin/$.ts +20 -0
- package/templates/astro-emdash/src/routes/api/$.ts +19 -0
- package/templates/astro-emdash/src/routes/docs/$.tsx +22 -0
- package/templates/astro-emdash/src/routes/docs/api/markdown.ts +12 -0
- package/templates/astro-emdash/src/routes/docs/api/search.ts +12 -0
- package/templates/astro-emdash/src/routes/docs.index.tsx +22 -0
- package/templates/astro-emdash/src/routes/docs.tsx +22 -0
- package/templates/astro-emdash/src/search.ts +6 -0
- package/templates/astro-emdash/src/settings.ts +12 -0
- package/templates/astro-emdash/src/styles-docs.css +3 -0
- package/templates/astro-emdash/src/styles.css +101 -0
- package/templates/astro-emdash/src/themes/base.css +76 -0
- package/templates/astro-emdash/src/themes/carbon.css +76 -0
- package/templates/astro-emdash/src/themes/fonts.css +25 -0
- package/templates/astro-emdash/src/themes/sage.css +76 -0
- package/templates/astro-emdash/src/themes/sand.css +76 -0
- package/templates/astro-emdash/src/themes/slate.css +81 -0
- package/templates/astro-emdash/src/themes/ultra.css +76 -0
- package/templates/astro-emdash/src/themes/zen.css +76 -0
- package/templates/astro-emdash/src/worker-entry.ts +31 -0
- package/templates/astro-emdash/tests/raybase-patterns.test.ts +29 -0
- package/templates/astro-emdash/tsconfig.json +36 -0
- package/templates/astro-emdash/vite.config.ts +130 -0
- package/templates/astro-emdash/vitest.config.ts +8 -0
- package/templates/astro-emdash/wrangler.jsonc +112 -0
- package/templates/react-router/.dev.vars.example +5 -0
- package/templates/react-router/.editorconfig +15 -0
- package/templates/react-router/AGENTS.md +54 -0
- package/templates/react-router/README.md +52 -0
- package/templates/react-router/app/app.css +44 -0
- package/templates/react-router/app/components/mdx.tsx +79 -0
- package/templates/react-router/app/components/ui/button.tsx +45 -0
- package/templates/react-router/app/components/ui/card.tsx +87 -0
- package/templates/react-router/app/components/ui/separator.tsx +22 -0
- package/templates/react-router/app/db/migrations.gen.ts +6 -0
- package/templates/react-router/app/db/schema.ts +56 -0
- package/templates/react-router/app/db/seed.ts +14 -0
- package/templates/react-router/app/entry.server.tsx +41 -0
- package/templates/react-router/app/globals.d.ts +1 -0
- package/templates/react-router/app/lib/layout.shared.tsx +52 -0
- package/templates/react-router/app/lib/source.ts +7 -0
- package/templates/react-router/app/lib/utils.ts +6 -0
- package/templates/react-router/app/raybase.server.ts +65 -0
- package/templates/react-router/app/root.tsx +23 -0
- package/templates/react-router/app/routes/_index.tsx +53 -0
- package/templates/react-router/app/routes/docs.$.tsx +49 -0
- package/templates/react-router/app/routes/docs.api.search.ts +10 -0
- package/templates/react-router/app/routes/docs.tsx +13 -0
- package/templates/react-router/app/routes.ts +3 -0
- package/templates/react-router/components.json +22 -0
- package/templates/react-router/content/docs/getting-started.mdx +15 -0
- package/templates/react-router/content/docs/index.mdx +8 -0
- package/templates/react-router/content/docs/mcp.mdx +121 -0
- package/templates/react-router/content/docs/meta.json +4 -0
- package/templates/react-router/dev/CODEBASE-MAP.md +48 -0
- package/templates/react-router/dev/SPEC-OVERVIEW.md +35 -0
- package/templates/react-router/dev/SPEC.md +93 -0
- package/templates/react-router/dev/features/archive/.gitkeep +1 -0
- package/templates/react-router/drizzle.config.ts +5 -0
- package/templates/react-router/env.d.ts +53 -0
- package/templates/react-router/gitignore +23 -0
- package/templates/react-router/migrations/app/meta/_journal.json +1 -0
- package/templates/react-router/package.json +70 -0
- package/templates/react-router/public/_headers +4 -0
- package/templates/react-router/public/favicon.ico +0 -0
- package/templates/react-router/react-router.config.ts +9 -0
- package/templates/react-router/source.config.ts +5 -0
- package/templates/react-router/tests/raybase-patterns.test.ts +23 -0
- package/templates/react-router/tsconfig.json +27 -0
- package/templates/react-router/vite.config.ts +59 -0
- package/templates/react-router/vitest.config.ts +8 -0
- package/templates/react-router/workers/app.ts +40 -0
- package/templates/react-router/wrangler.jsonc +111 -0
- package/templates/tanstack-start/.dev.vars.example +5 -0
- package/templates/tanstack-start/AGENTS.md +95 -0
- package/templates/tanstack-start/DESIGN.md +65 -0
- package/templates/tanstack-start/components.json +21 -0
- package/templates/tanstack-start/content/docs/getting-started.mdx +65 -0
- package/templates/tanstack-start/content/docs/index.mdx +10 -0
- package/templates/tanstack-start/content/docs/mcp.mdx +122 -0
- package/templates/tanstack-start/content/docs/meta.json +4 -0
- package/templates/tanstack-start/dev/CODEBASE-MAP.md +84 -0
- package/templates/tanstack-start/dev/SPEC-OVERVIEW.md +46 -0
- package/templates/tanstack-start/dev/SPEC.md +213 -0
- package/templates/tanstack-start/dev/features/archive/.gitkeep +1 -0
- package/templates/tanstack-start/docs/theme-previews/base.svg +24 -0
- package/templates/tanstack-start/docs/theme-previews/steel.svg +24 -0
- package/templates/tanstack-start/docs/theme-previews/zen.svg +24 -0
- package/templates/tanstack-start/docs/themes.md +116 -0
- package/templates/tanstack-start/drizzle.config.ts +5 -0
- package/templates/tanstack-start/gitignore +11 -0
- package/templates/tanstack-start/migrations/app/0000_low_karen_page.sql +26 -0
- package/templates/tanstack-start/migrations/app/meta/0000_snapshot.json +196 -0
- package/templates/tanstack-start/migrations/app/meta/_journal.json +13 -0
- package/templates/tanstack-start/package.json +77 -0
- package/templates/tanstack-start/public/_headers +8 -0
- package/templates/tanstack-start/public/icons/app-icon-maskable.svg +1 -0
- package/templates/tanstack-start/public/icons/app-icon.svg +1 -0
- package/templates/tanstack-start/public/icons/apple-touch-icon.png +0 -0
- package/templates/tanstack-start/public/manifest.webmanifest +14 -0
- package/templates/tanstack-start/public/raybase-push-sw.js +32 -0
- package/templates/tanstack-start/source.config.ts +10 -0
- package/templates/tanstack-start/src/actions.ts +560 -0
- package/templates/tanstack-start/src/ai/agents.ts +78 -0
- package/templates/tanstack-start/src/ai/retrieval.ts +36 -0
- package/templates/tanstack-start/src/auth-door.ts +18 -0
- package/templates/tanstack-start/src/client.tsx +25 -0
- package/templates/tanstack-start/src/components/.gitkeep +1 -0
- package/templates/tanstack-start/src/components/account-menu.tsx +127 -0
- package/templates/tanstack-start/src/components/auth-shell.tsx +69 -0
- package/templates/tanstack-start/src/components/install-app.tsx +35 -0
- package/templates/tanstack-start/src/components/mode-toggle.tsx +32 -0
- package/templates/tanstack-start/src/components/search-command-palette.tsx +107 -0
- package/templates/tanstack-start/src/components/setup-token-page.tsx +197 -0
- package/templates/tanstack-start/src/components/ui/avatar.tsx +107 -0
- package/templates/tanstack-start/src/components/ui/badge.tsx +52 -0
- package/templates/tanstack-start/src/components/ui/button.tsx +69 -0
- package/templates/tanstack-start/src/components/ui/checkbox.tsx +29 -0
- package/templates/tanstack-start/src/components/ui/dialog.tsx +158 -0
- package/templates/tanstack-start/src/components/ui/dropdown-menu.tsx +303 -0
- package/templates/tanstack-start/src/components/ui/input.tsx +20 -0
- package/templates/tanstack-start/src/components/ui/label.tsx +20 -0
- package/templates/tanstack-start/src/components/ui/scroll-area.tsx +53 -0
- package/templates/tanstack-start/src/components/ui/select.tsx +215 -0
- package/templates/tanstack-start/src/components/ui/separator.tsx +23 -0
- package/templates/tanstack-start/src/components/ui/sheet.tsx +138 -0
- package/templates/tanstack-start/src/components/ui/sidebar.tsx +728 -0
- package/templates/tanstack-start/src/components/ui/skeleton.tsx +13 -0
- package/templates/tanstack-start/src/components/ui/textarea.tsx +18 -0
- package/templates/tanstack-start/src/components/ui/tooltip.tsx +66 -0
- package/templates/tanstack-start/src/db/migrations.gen.ts +6 -0
- package/templates/tanstack-start/src/db/schema.ts +90 -0
- package/templates/tanstack-start/src/db/seed.ts +106 -0
- package/templates/tanstack-start/src/db/storage.ts +32 -0
- package/templates/tanstack-start/src/docs/docs-assets.ts +1 -0
- package/templates/tanstack-start/src/docs/docs-client.tsx +22 -0
- package/templates/tanstack-start/src/docs/docs-data.ts +24 -0
- package/templates/tanstack-start/src/docs/docs-handler.tsx +105 -0
- package/templates/tanstack-start/src/docs/docs-layout.tsx +56 -0
- package/templates/tanstack-start/src/docs/docs-mdx.tsx +79 -0
- package/templates/tanstack-start/src/docs/docs-page-actions.tsx +146 -0
- package/templates/tanstack-start/src/docs/docs-page.tsx +70 -0
- package/templates/tanstack-start/src/docs/llm-text.ts +61 -0
- package/templates/tanstack-start/src/docs/source.ts +7 -0
- package/templates/tanstack-start/src/hooks/use-mobile.ts +19 -0
- package/templates/tanstack-start/src/hooks/use-pwa-install.ts +77 -0
- package/templates/tanstack-start/src/jobs.example.ts +56 -0
- package/templates/tanstack-start/src/lib/account.ts +13 -0
- package/templates/tanstack-start/src/lib/auth-client.ts +187 -0
- package/templates/tanstack-start/src/lib/push-client.ts +98 -0
- package/templates/tanstack-start/src/lib/utils.ts +6 -0
- package/templates/tanstack-start/src/mcp-app.ts +74 -0
- package/templates/tanstack-start/src/notifications.example.ts +37 -0
- package/templates/tanstack-start/src/raybase.auth.ts +86 -0
- package/templates/tanstack-start/src/raybase.config.ts +86 -0
- package/templates/tanstack-start/src/raybase.server.ts +155 -0
- package/templates/tanstack-start/src/realtime.example.ts +46 -0
- package/templates/tanstack-start/src/router.tsx +19 -0
- package/templates/tanstack-start/src/routes/__root.tsx +73 -0
- package/templates/tanstack-start/src/routes/_app/admin.tsx +13 -0
- package/templates/tanstack-start/src/routes/_app/forgot-password.tsx +97 -0
- package/templates/tanstack-start/src/routes/_app/index.tsx +1316 -0
- package/templates/tanstack-start/src/routes/_app/invite.$token.tsx +11 -0
- package/templates/tanstack-start/src/routes/_app/login.tsx +193 -0
- package/templates/tanstack-start/src/routes/_app/profile.tsx +98 -0
- package/templates/tanstack-start/src/routes/_app/reset-password.$token.tsx +16 -0
- package/templates/tanstack-start/src/routes/_app/reset-password.tsx +115 -0
- package/templates/tanstack-start/src/routes/_app/setup.$token.tsx +11 -0
- package/templates/tanstack-start/src/routes/_app/signup.tsx +141 -0
- package/templates/tanstack-start/src/routes/_app/verify-email.$token.tsx +15 -0
- package/templates/tanstack-start/src/routes/_app/verify-email.tsx +154 -0
- package/templates/tanstack-start/src/routes/_app.tsx +33 -0
- package/templates/tanstack-start/src/routes/admin/$.ts +20 -0
- package/templates/tanstack-start/src/routes/api/$.ts +19 -0
- package/templates/tanstack-start/src/routes/docs/$.tsx +22 -0
- package/templates/tanstack-start/src/routes/docs/api/markdown.ts +12 -0
- package/templates/tanstack-start/src/routes/docs/api/search.ts +12 -0
- package/templates/tanstack-start/src/routes/docs.index.tsx +22 -0
- package/templates/tanstack-start/src/routes/docs.tsx +22 -0
- package/templates/tanstack-start/src/search.ts +26 -0
- package/templates/tanstack-start/src/settings.ts +12 -0
- package/templates/tanstack-start/src/styles-docs.css +3 -0
- package/templates/tanstack-start/src/styles.css +73 -0
- package/templates/tanstack-start/src/themes/base.css +76 -0
- package/templates/tanstack-start/src/themes/carbon.css +76 -0
- package/templates/tanstack-start/src/themes/fonts.css +18 -0
- package/templates/tanstack-start/src/themes/sage.css +76 -0
- package/templates/tanstack-start/src/themes/sand.css +76 -0
- package/templates/tanstack-start/src/themes/slate.css +76 -0
- package/templates/tanstack-start/src/themes/ultra.css +76 -0
- package/templates/tanstack-start/src/themes/zen.css +76 -0
- package/templates/tanstack-start/src/worker-entry.ts +30 -0
- package/templates/tanstack-start/tests/raybase-patterns.test.ts +247 -0
- package/templates/tanstack-start/tsconfig.json +33 -0
- package/templates/tanstack-start/vite.config.ts +132 -0
- package/templates/tanstack-start/vitest.config.ts +8 -0
- package/templates/tanstack-start/wrangler.jsonc +112 -0
- package/README.md +0 -3
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: raybase-api
|
|
3
|
+
description: Expose selected Raybase actions through the optional @raybase/api module with API keys and scopes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Raybase API
|
|
7
|
+
|
|
8
|
+
Use this skill before adding or changing an app's external HTTP API surface.
|
|
9
|
+
|
|
10
|
+
## Rules
|
|
11
|
+
|
|
12
|
+
- Declare business behavior as `defineAction()` first.
|
|
13
|
+
- Read `.agents/skills/raybase-actions/SKILL.md` for action declaration,
|
|
14
|
+
policy, row authorization, idempotency, annotations, and adapter guidance.
|
|
15
|
+
- Every action exposed through `apiOperation()` must declare `output`;
|
|
16
|
+
`raybase doctor` fails external API routes whose linked action has no output
|
|
17
|
+
schema.
|
|
18
|
+
- Expose only intentional actions with `apiOperation(action, ...)`.
|
|
19
|
+
- Do not add API route handlers with business logic.
|
|
20
|
+
- Keep API scopes separate from action policies. A key scope answers whether the key may call an operation; the action policy still decides whether the linked user may perform the work.
|
|
21
|
+
- Do not expose actions marked `requiresInternalControl`.
|
|
22
|
+
- Use resource scopes such as `tasks:read`, `tasks:write`, and `tasks:delete`.
|
|
23
|
+
- API keys execute as existing Raybase users. Do not bypass policies with raw SQL or service executors.
|
|
24
|
+
- Treat `RAYBASE_API_KEY_SECRET` as a long-lived production secret. In v1, changing it invalidates existing API keys because stored key hashes are HMAC-based.
|
|
25
|
+
|
|
26
|
+
## Example
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { apiModule, apiOperation, defineApiOperations } from "@raybase/api";
|
|
30
|
+
import { actions } from "../actions";
|
|
31
|
+
|
|
32
|
+
export const api = apiModule({
|
|
33
|
+
prefix: "/api/v1",
|
|
34
|
+
operations: defineApiOperations({
|
|
35
|
+
completeTask: apiOperation(actions.completeTask, {
|
|
36
|
+
method: "POST",
|
|
37
|
+
path: "/tasks/:id/complete",
|
|
38
|
+
scopes: ["tasks:write"],
|
|
39
|
+
parseRequest: ({ params, body }) => ({ id: params.id, ...(body as object) })
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Pass the exported module to `createRaybaseApp({ modules: [api] })`.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: raybase-astro-emdash
|
|
3
|
+
description: Build and change Raybase apps built on the astro-emdash framework. Use for the Raybase spine, nested Astro site, EmDash content model, the handoff that signs editors into the CMS, and Server Island proxy work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Raybase Astro/EmDash Skill
|
|
7
|
+
|
|
8
|
+
Use this skill for projects whose `package.json` has
|
|
9
|
+
`raybase.framework: "astro-emdash"`.
|
|
10
|
+
|
|
11
|
+
## Read Order
|
|
12
|
+
|
|
13
|
+
1. Read `.agents/skills/raybase-building/SKILL.md` for the generic Raybase implementation sequence.
|
|
14
|
+
2. Read `dev/SPEC.md`, `dev/SPEC-OVERVIEW.md`, and `dev/CODEBASE-MAP.md`.
|
|
15
|
+
3. Read this skill before changing `site/`, spine routes under `src/routes/`, `src/raybase.config.ts`, `src/raybase.server.ts`, `src/actions.ts`, or handoff routes.
|
|
16
|
+
4. When `dev/SPEC.md` records an existing site being migrated, read `.agents/skills/raybase-astro-emdash-migration/SKILL.md` before content-model: it produces the inventory and URL map the site plan consumes.
|
|
17
|
+
5. Read `.agents/skills/raybase-astro-emdash-content-model/SKILL.md` before theme selection or collection work: it derives the site plan (page inventory, nav/footer links) and the EmDash collections, bindings, and seed content from the approved spec.
|
|
18
|
+
6. Read `.agents/skills/raybase-astro-emdash-design/SKILL.md` when establishing the site's design direction — before or alongside theme selection — and before durable public-site design changes. It derives the direction from the spec and records it in `DESIGN.md`.
|
|
19
|
+
7. Read `.agents/skills/raybase-astro-emdash-theme-selection/SKILL.md` first when assembling or re-theming the full public site from the Templates registry (theme, layout, nav, footer, color theme, page starters). It consumes the site plan from step 5 and the design direction from step 6.
|
|
20
|
+
8. Read `.agents/skills/raybase-astro-emdash-galley/SKILL.md` before adding or changing public page content sections.
|
|
21
|
+
9. Run `.agents/skills/raybase-astro-emdash-security-review/SKILL.md` before handoff or deploy review.
|
|
22
|
+
|
|
23
|
+
## Ownership Boundaries
|
|
24
|
+
|
|
25
|
+
- Raybase owns operator auth, sessions, invites, audit, app actions, docs metadata/agent surfaces, MCP, jobs, settings, and deployment tooling.
|
|
26
|
+
- The Raybase signed-in chrome (`RaybaseSignedInMenu`, `EmDashBodyStart`/`EmDashBodyEnd` and the EmDash toolbar they inject, and the dev-session content door) is Core-owned and internally role-gated — anonymous visitors see nothing. Never remove or CSS-hide these from the public layout to make the site "clean", including during theme/template assembly or security-review fixes.
|
|
27
|
+
- EmDash owns public content, Galley template instances, media, drafts, revisions, and publish state inside `site/`.
|
|
28
|
+
- Galley owns runtime-authored page-section templates in EmDash plugin storage. Do not add Astro components for ordinary content sections.
|
|
29
|
+
- Templates are the preferred reusable source for runtime-editable public sections, layouts, page starters, and guided theme families when registry content fits. Use `raybase templates add <id>` or `raybase templates theme add <theme-id>` to stage draft Galley templates under `site/seed/templates/`, record provenance in `.raybase/templates.json`, and pass `--bind <alias=collection>` for collection dataSources or `--bind <alias>=menu:<name>` for menu dataSources.
|
|
30
|
+
- The Raybase app schema should stay empty unless the approved product spec adds Raybase-owned operational data.
|
|
31
|
+
- Do not mirror EmDash page or media data into Raybase tables.
|
|
32
|
+
|
|
33
|
+
## Docs Placement
|
|
34
|
+
|
|
35
|
+
Astro/EmDash supports two docs placements:
|
|
36
|
+
|
|
37
|
+
- `spine`: Fumadocs lives in the Raybase/TanStack spine under root `content/docs`, `src/docs`, `source.config.ts`, and `src/routes/docs*`. It is public by default (`Docs exposure: public`): the spine serves `/docs` and `/docs/api/search` to signed-out visitors. If the builder chooses `Docs exposure: signed-in only`, add the check in `src/docs/docs-handler.tsx` `handleDocsRequest`, which every docs route calls: ask `handleRaybaseRequest` for `/api/account/me` with the request's headers and, on 401, redirect pages to `/login?next=<path>` and answer `/docs/api/*` with 401.
|
|
38
|
+
- `site`: public Fumadocs lives in the Astro worker under `site/content/docs`, `site/src/docs`, `site/source.config.ts`, `site/src/pages/docs*`, and `site/src/pages/llms.txt.ts`.
|
|
39
|
+
|
|
40
|
+
Resolve placement from `dev/SPEC.md` `Public Surface / Documentation`, then `package.json` `raybase.modules.docs.placement`, then `.raybase/modules.json` `modules.docs.placement`. Missing placement means `spine`. Do not leave root spine docs routes in a `site` placement app, and do not add `site/src/pages/docs*` for spine docs.
|
|
41
|
+
|
|
42
|
+
## The Handoff
|
|
43
|
+
|
|
44
|
+
The CMS is an SSO resource: an editor signs into a site they belong to. The
|
|
45
|
+
spine mints; the site verifies offline and sets its own cookie.
|
|
46
|
+
|
|
47
|
+
- Register the site in `src/raybase.config.ts` under `handoff.resources` with `kind: "sso"`.
|
|
48
|
+
- Keep `RAYBASE_HANDOFF_PRIVATE_JWK` as a deployed Worker secret and local `.dev.vars` value.
|
|
49
|
+
- The JWKS endpoint is `/.well-known/jwks.json`; it must expose only the public key.
|
|
50
|
+
- `GET /api/handoff/authorize` is the front door a stranger is bounced to; `POST /api/handoff/token` mints for server-side callers. Both require a signed-in Raybase session and must never log or audit raw tokens.
|
|
51
|
+
- `site/src/middleware.ts` mounts `requireHandoff` on `/_emdash/admin*` and nothing else; public pages stay public.
|
|
52
|
+
- The site consumes tokens at `site/src/pages/_raybase/handoff/consume.ts` with `consumeHandoff` from `@raybase/core/handoff-consumer`, which writes the `raybase_handoff` HttpOnly cookie.
|
|
53
|
+
- The bounce carries a `state` nonce matched against the `raybase_handoff_state` cookie the gate set, so a consume URL only works in the browser that started it, and the spine issuer is pinned to `kinds: ["sso"]`.
|
|
54
|
+
- A handoff session expires rather than being revoked: the cookie lives as long as the token (five minutes by default, fifteen at most), so removing an editor closes the CMS to them within one token life.
|
|
55
|
+
- Raybase roles map to EmDash content roles in `raybaseAuth()` in `site/astro.config.mjs` as:
|
|
56
|
+
- owner/admin → EmDash admin (50)
|
|
57
|
+
- publisher → editor / publish-any (40)
|
|
58
|
+
- editor → contributor / draft-write (20)
|
|
59
|
+
- user/default → subscriber / read (10)
|
|
60
|
+
|
|
61
|
+
## Local Dev Personas On The Public Site
|
|
62
|
+
|
|
63
|
+
Local persona switching on the public site goes through the generated
|
|
64
|
+
`/_raybase/dev/session` content-door route only (`site/src/middleware.ts`
|
|
65
|
+
handles the POST and proxies the spine `/api/dev/session`). Personas are
|
|
66
|
+
configured once in `appConfig.auth.devUser(s)`; the route is local-dev-only
|
|
67
|
+
and site code must not re-implement switching. See
|
|
68
|
+
`.agents/skills/raybase-auth/SKILL.md` for persona rules.
|
|
69
|
+
|
|
70
|
+
## Server Islands
|
|
71
|
+
|
|
72
|
+
- Public site calls into Raybase must go through `site/src/pages/_raybase/islands/action.ts`.
|
|
73
|
+
- Keep `allowedActions` explicit. Never turn this route into arbitrary URL forwarding.
|
|
74
|
+
- Add public Raybase actions in `src/actions.ts` with `audience: "public"` and a policy.
|
|
75
|
+
- Expose public actions with `actionRoute(action, { audience: "public", policy: action.policy })`.
|
|
76
|
+
- Public actions should be read-only unless the approved spec explicitly calls for public mutation and abuse controls.
|
|
77
|
+
|
|
78
|
+
## Astro/EmDash Paths
|
|
79
|
+
|
|
80
|
+
- `site/astro.config.mjs` wires Astro, Cloudflare, EmDash D1/R2, and `raybaseAuth()`.
|
|
81
|
+
- `site/src/live.config.ts` must define the `_emdash` live collection with
|
|
82
|
+
`emdashLoader()` from `emdash/runtime`; public helpers such as
|
|
83
|
+
`getEmDashEntry()` and `getEmDashCollection()` depend on that live
|
|
84
|
+
collection even when D1 is seeded correctly.
|
|
85
|
+
- `site/wrangler.jsonc` owns content Worker bindings.
|
|
86
|
+
- `site/src/pages/[...slug].astro` is the public catch-all renderer: it renders a page's `design` template when `design.templateId` is set and falls back to `pages.content` Portable Text with Galley block components.
|
|
87
|
+
- `site/src/content-door/` owns fallback content and EmDash path resolution.
|
|
88
|
+
- `site/src/components/blocks/RaybaseActionIsland.astro` owns the Raybase action island exception; ordinary page sections belong in Galley templates.
|
|
89
|
+
- `site/seed/templates/` and `pnpm --dir site run templates:apply` own staged Template draft templates, including optional behavior sidecars and theme-selected layout/page-starter drafts.
|
|
90
|
+
- `site/seed/pages/<slug>.json` holds staged v2 page seeds whose `design` field points at a page-starter template; `raybase templates shell add <layout-id> --activate` stages an ephemeral `site/seed/templates/<layout-id>/activation.json` work order that `templates:apply` consumes and deletes after publishing the selected templates and setting the active Galley layout pointer and palette in the app database.
|
|
91
|
+
|
|
92
|
+
## Verification
|
|
93
|
+
|
|
94
|
+
Run these before handoff when relevant:
|
|
95
|
+
|
|
96
|
+
- `raybase doctor`
|
|
97
|
+
- `raybase check`
|
|
98
|
+
- `pnpm test`
|
|
99
|
+
- `pnpm --dir site run check`
|
|
100
|
+
- The browser verification recipe below.
|
|
101
|
+
|
|
102
|
+
## Browser Verification
|
|
103
|
+
|
|
104
|
+
Drive this yourself with whatever browser tooling the harness provides; do
|
|
105
|
+
not reduce it to instructions for the owner. With `raybase dev` running:
|
|
106
|
+
|
|
107
|
+
1. Sign in as a dev persona: on the spine use the dev sign-in for `/admin`;
|
|
108
|
+
on the public site use the `/_raybase/dev/session` content door (see Local
|
|
109
|
+
Dev Personas above). Verify the signed-in Raybase handoff to the site
|
|
110
|
+
works end to end.
|
|
111
|
+
2. Verify `/` renders the composed shell: the selected header, footer, active
|
|
112
|
+
layout, and color theme when a theme is activated, or the static
|
|
113
|
+
`SiteLayout.astro` shell otherwise.
|
|
114
|
+
3. Visit each page in the site plan and confirm it renders real content, not
|
|
115
|
+
placeholder copy or an empty data rail, and every asset-inventory slot
|
|
116
|
+
renders either an owner asset or a named stock stand-in.
|
|
117
|
+
4. Verify `/_emdash/admin/plugins/galley/templates` lists the installed
|
|
118
|
+
templates with the expected publish states.
|
|
119
|
+
5. **Editability gate.** Signed in as an editor persona, toggle the EmDash
|
|
120
|
+
toolbar's Edit mode on every kept public page and confirm at least one
|
|
121
|
+
region becomes editable (highlighted `data-emdash-ref` elements, Galley
|
|
122
|
+
designed blocks, or context markers). A page with zero editable regions
|
|
123
|
+
means its markup bypassed the designed/Portable-Text paths — treat that as
|
|
124
|
+
a defect unless the page is an approved static exception recorded in
|
|
125
|
+
`dev/SPEC.md`. Quick probe without clicking: the rendered HTML of an
|
|
126
|
+
editable page contains `data-emdash-ref`, `data-galley-`, or
|
|
127
|
+
`data-dynamic-` attributes.
|
|
128
|
+
6. Check a mobile width and a desktop width for the key pages.
|
|
129
|
+
7. If docs placement is `site`, verify `/docs` loads and its search responds.
|
|
130
|
+
8. Screenshot the key pages for the handoff message.
|
|
131
|
+
|
|
132
|
+
If local `astro dev` is blocked by Cloudflare adapter or Vite optimizer
|
|
133
|
+
issues, build the site and run the generated Worker with
|
|
134
|
+
`wrangler dev --config dist/server/wrangler.json`. In that mode, seed and
|
|
135
|
+
inspect the D1/R2 state actually used by the running Worker (often under
|
|
136
|
+
`site/dist/server/.wrangler`, not `site/.wrangler`), and verify rendered media
|
|
137
|
+
URLs with HTTP 200 responses rather than assuming media rows imply file bytes.
|
|
138
|
+
|
|
139
|
+
If dev fails with `The file does not exist at ".../.vite/deps_ssr/..." which
|
|
140
|
+
is in the optimize deps directory. Try adding it to optimizeDeps.exclude`,
|
|
141
|
+
Vite's suggestion is wrong for this failure: the workerd dev runtime holds a
|
|
142
|
+
stale module graph after Vite re-optimized SSR deps. Restart `raybase dev`.
|
|
143
|
+
Do not add packages to `optimizeDeps.exclude` and do not clear caches.
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: raybase-astro-emdash-content-model
|
|
3
|
+
description: Plan a Raybase Site's information architecture and EmDash content model together - page inventory, nav/footer links, collections, fields, template bindings, and seed content - before theme selection in astro-emdash apps.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Raybase Astro/EmDash Content Model Skill
|
|
7
|
+
|
|
8
|
+
Use this skill after the spec is approved and before selecting a theme for an
|
|
9
|
+
`astro-emdash` app. The site plan and the EmDash collections are one coupled
|
|
10
|
+
decision: a "blog" page implies an articles collection, which implies
|
|
11
|
+
collection-bound Templates and `--bind` values at theme-add time. Decide them
|
|
12
|
+
together here; theme selection consumes the result and does not invent one.
|
|
13
|
+
|
|
14
|
+
## Read Order
|
|
15
|
+
|
|
16
|
+
1. Read `.agents/skills/raybase-astro-emdash/SKILL.md` for ownership boundaries.
|
|
17
|
+
2. Read `dev/SPEC.md`, `dev/SPEC-OVERVIEW.md`, and `dev/CODEBASE-MAP.md`.
|
|
18
|
+
3. Produce the site plan and collection model below, then continue into
|
|
19
|
+
`.agents/skills/raybase-astro-emdash-theme-selection/SKILL.md`.
|
|
20
|
+
|
|
21
|
+
## Site Plan
|
|
22
|
+
|
|
23
|
+
Derive from the approved spec and record as a `## Site plan` section in
|
|
24
|
+
`dev/SPEC.md` (or `dev/site-plan.md` when it outgrows the spec). This is the
|
|
25
|
+
required input to theme selection. When `dev/SPEC.md` records an existing
|
|
26
|
+
site being migrated, derive the page inventory, repeated-type counts, media
|
|
27
|
+
slots, and nav/footer link sets from `dev/migration/inventory.md` (produced
|
|
28
|
+
by `.agents/skills/raybase-astro-emdash-migration/SKILL.md`) and the owner's
|
|
29
|
+
keep/merge/drop decisions there — observed counts beat guesses.
|
|
30
|
+
|
|
31
|
+
- Page inventory: every public page with slug, purpose, and the content it
|
|
32
|
+
shows (for example `/` home, `/about`, `/services`, `/blog`, `/contact`).
|
|
33
|
+
- Menus: plan the named EmDash menus the site needs and record them in the
|
|
34
|
+
site plan. Use `primary` for the main nav, `footer` for footer columns or
|
|
35
|
+
rows, `social` for social icon/link rows, and `legal` for utility/legal
|
|
36
|
+
links. These names are the cross-shell source of truth; templates should bind
|
|
37
|
+
to them instead of copying link lists per template.
|
|
38
|
+
- Nav and footer link sets, drawn from that inventory. Record each set's
|
|
39
|
+
**menu name, count, and depth**, not just the labels — they are the shell
|
|
40
|
+
capacity query's inputs (`shell match --nav-items <N> --nav-depth
|
|
41
|
+
flat|dropdown|mega --footer-links <N> --footer-columns <N> [--cta]`):
|
|
42
|
+
- Nav: number of **top-level** items; whether any nest (a top-level item with
|
|
43
|
+
a submenu ⇒ depth `dropdown`/`mega`, else `flat`); whether a dedicated CTA
|
|
44
|
+
button is needed.
|
|
45
|
+
Map the depth interview directly to menu shape: `flat` is top-level
|
|
46
|
+
`primary` items only; `dropdown` uses children under a top-level item;
|
|
47
|
+
`mega` uses grouped children under top-level categories. Keep CTA labels
|
|
48
|
+
as shell/template fields unless the chosen nav explicitly models the CTA
|
|
49
|
+
as part of the `primary` menu.
|
|
50
|
+
- Footer: total link count and how many **column groups** they fall into; a
|
|
51
|
+
micro one-liner, a standard 2–4 column grid, or a broad sitemap footer.
|
|
52
|
+
For column footers, model one `footer` menu where top-level items are
|
|
53
|
+
column headings and each heading's children are that column's links.
|
|
54
|
+
`social` and `legal` stay separate flat menus when the design treats them
|
|
55
|
+
as separate rows.
|
|
56
|
+
- **One-page sites**: when the inventory collapses to a single structural
|
|
57
|
+
page, the section list IS the IA — plan it as ordered narrative beats, and
|
|
58
|
+
the nav link set becomes the anchors you promote (often 0–4; `--nav-items`
|
|
59
|
+
counts anchors and `shell match` takes `--anchor`). One page ≠ one route:
|
|
60
|
+
keep `/privacy`/`/terms` (and optionally a blog) in the inventory as prose
|
|
61
|
+
pages — they ride the footer, not the nav.
|
|
62
|
+
- Repeated content types (articles, projects, products, team, FAQs,
|
|
63
|
+
testimonials), with rough current counts and who edits them after launch.
|
|
64
|
+
- Asset inventory: every image slot implied by the page inventory and
|
|
65
|
+
collections (hero per page, section imagery, per-entry images such as team
|
|
66
|
+
portraits or project covers), marked `owner-supplied | stock stand-in |
|
|
67
|
+
none`. This ledger feeds design/imagery, the handoff message, and any later
|
|
68
|
+
swap-in pass.
|
|
69
|
+
- Docs placement if docs are enabled, from the spec's
|
|
70
|
+
`Public Surface / Documentation` lines.
|
|
71
|
+
|
|
72
|
+
## Two Kinds Of Collections
|
|
73
|
+
|
|
74
|
+
Decide, per repeated content type, how it reaches the page:
|
|
75
|
+
|
|
76
|
+
- **Page-backing collections** get their own public detail URLs. The public
|
|
77
|
+
catch-all (`site/src/pages/[...slug].astro` via
|
|
78
|
+
`site/src/content-door/resolve-page.ts`) resolves any collection whose
|
|
79
|
+
`urlPattern` matches the request path and renders either the entry's
|
|
80
|
+
designed page or the shared prose shape (`title`, optional `description`,
|
|
81
|
+
`content` Portable Text). Give these collections that field shape plus a
|
|
82
|
+
`urlPattern` such as `/articles/{slug}`.
|
|
83
|
+
When entries need a real detail page (book cover, author, byline, price,
|
|
84
|
+
event date, product CTA, related rails), install an **entry-hosted detail
|
|
85
|
+
starter**: `raybase templates match --kind page-starter` for the family's
|
|
86
|
+
`article` starter, then `raybase templates add <starter-id> --bind
|
|
87
|
+
<contextKey>=<collection>` and `pnpm --dir site run templates:apply`. The
|
|
88
|
+
starter's host.json gives the collection a `galley:block` design field whose
|
|
89
|
+
options default every entry to the starter, so each entry renders the shared
|
|
90
|
+
layout with its own fields as typed context — and stays editable in the
|
|
91
|
+
visual editor. If no registry starter fits the collection's shape, adapt the
|
|
92
|
+
nearest one (installed templates are editable drafts: retarget the context
|
|
93
|
+
declarations and field slugs) or author an app-local detail template through
|
|
94
|
+
the galley skill.
|
|
95
|
+
Hand-writing entry markup in the Astro resolver is the LAST resort, only for
|
|
96
|
+
a true route shell that Galley genuinely cannot own. Record it as a
|
|
97
|
+
Deviation, spread EmDash edit annotations (`{...entry.edit.<field>}`) on
|
|
98
|
+
every content-derived element, and verify in edit mode that the page still
|
|
99
|
+
lights up — a Deviation that kills the visual editor is a defect, not a
|
|
100
|
+
trade-off. The default catch-all does not magically display arbitrary
|
|
101
|
+
collection fields.
|
|
102
|
+
- **Section-data collections** feed collection-bound Templates through Galley
|
|
103
|
+
`dataSources` (a testimonials rail, a team grid). They need no `urlPattern`
|
|
104
|
+
and no `content` field - only the fields the section renders.
|
|
105
|
+
|
|
106
|
+
For each repeated content type also decide sourcing: a collection-bound
|
|
107
|
+
Template (registry `catalog.collectionBound`) reading from a real collection,
|
|
108
|
+
or a self-contained Template (`catalog.selfContained`) carrying inline sample
|
|
109
|
+
copy. Prefer collections whenever editors will maintain the items; prefer
|
|
110
|
+
self-contained sections for one-off bands whose copy belongs to the page.
|
|
111
|
+
|
|
112
|
+
## Model The Collections
|
|
113
|
+
|
|
114
|
+
- Name collections in product language from the spec (`articles`,
|
|
115
|
+
`projects`, `team`), lowercase with underscores; never generic names like
|
|
116
|
+
`items` or `data`.
|
|
117
|
+
- EmDash field and collection slugs are lowercase snake_case (`price_mood`,
|
|
118
|
+
never `priceMood`) — camelCase fails seed validation. Prefer single-word
|
|
119
|
+
slugs for collections that feed Galley templates: Galley collection slugs
|
|
120
|
+
disallow underscores while EmDash slugs disallow hyphens.
|
|
121
|
+
- Never declare a field whose slug EmDash reserves for a system column:
|
|
122
|
+
`id`, `slug`, `status`, `author_id`, `primary_byline_id`, `created_at`,
|
|
123
|
+
`updated_at`, `published_at`, `scheduled_at`, `deleted_at`, `version`,
|
|
124
|
+
`live_revision_id`, `draft_revision_id`, `terms`, `bylines`, `byline`,
|
|
125
|
+
`locale`, `translation_group`. Seed import does not validate these before
|
|
126
|
+
mutating tables — a reserved slug (most commonly `published_at`) aborts
|
|
127
|
+
field creation mid-collection and later surfaces as a confusing
|
|
128
|
+
`table ec_<collection> has no column named <field>` insert error. EmDash
|
|
129
|
+
already supplies publish metadata for published content; `raybase doctor`
|
|
130
|
+
flags reserved slugs in `site/seed/seed.json`.
|
|
131
|
+
- Keep the shipped `pages` collection and its `design` field
|
|
132
|
+
(`type: "json"`, `widget: "galley:block"`) intact - the public route and
|
|
133
|
+
theme activation depend on them.
|
|
134
|
+
- Define every field explicitly with the smallest type that fits; mark
|
|
135
|
+
search-relevant fields `searchable`. Field mechanics, seed format, and the
|
|
136
|
+
live-database CLI are in
|
|
137
|
+
[references/emdash-collections.md](references/emdash-collections.md).
|
|
138
|
+
- `url` fields are for absolute external URLs only: EmDash validates them on
|
|
139
|
+
every save (the seed importer does not), so a seeded relative path renders
|
|
140
|
+
fine but makes every CMS/visual-editor save of that entry fail with
|
|
141
|
+
"url: Invalid URL". Model internal links as `string` fields; detail URLs
|
|
142
|
+
derive from the collection `urlPattern` and slug, so do not store them.
|
|
143
|
+
- Add taxonomies only when the spec needs cross-cutting grouping with its own
|
|
144
|
+
archive pages, not as a substitute for a field.
|
|
145
|
+
|
|
146
|
+
## Binding Plan
|
|
147
|
+
|
|
148
|
+
- List which selected Templates declare `galley.dataSources` and map each
|
|
149
|
+
alias to a collection: `--bind alias=collection` on
|
|
150
|
+
`raybase templates add` / `raybase templates theme add`.
|
|
151
|
+
- For nav/footer/social/legal templates, bind data source aliases to menus:
|
|
152
|
+
`--bind links=menu:primary`, `--bind footerLinks=menu:footer`,
|
|
153
|
+
`--bind socialLinks=menu:social`, or `--bind legalLinks=menu:legal`.
|
|
154
|
+
A menu source cannot be rebound to a collection, and a collection source
|
|
155
|
+
cannot be rebound to a menu. Prefer the standard menu names so shell swaps
|
|
156
|
+
keep working without per-template rebinding.
|
|
157
|
+
- When authoring or adapting a menu-bound Template, keep the local list field
|
|
158
|
+
with the same alias and a complete default (`fields.links.default` beside
|
|
159
|
+
`dataSources.links = { "kind": "menu", "menu": "primary" }`). The menu
|
|
160
|
+
shadows the local field at render time, while the default seeds a missing
|
|
161
|
+
menu on `templates:apply` and keeps lab/old-CLI previews non-empty.
|
|
162
|
+
- Validate each binding against the real EmDash schema (fields the template
|
|
163
|
+
renders must exist on the bound collection). Use model judgement from the
|
|
164
|
+
schema and user goals; do not string-scan field names as the binding engine.
|
|
165
|
+
- Record the planned `--bind` values in the site plan so theme selection can
|
|
166
|
+
apply them verbatim.
|
|
167
|
+
|
|
168
|
+
## Seed Content
|
|
169
|
+
|
|
170
|
+
- `site/seed/seed.json` (wired via `site/package.json` `emdash.seed`) holds
|
|
171
|
+
schema plus starter content. It applies on the first request against an
|
|
172
|
+
empty content database and never overwrites existing data - so it is the
|
|
173
|
+
right place for collections and sample rows on a fresh app, and the wrong
|
|
174
|
+
tool once the local database has real content. For a live database, use the
|
|
175
|
+
EmDash admin at `/_emdash/admin` or the CLI in the reference.
|
|
176
|
+
- Seed the planned menus in `site/seed/seed.json` under top-level `menus`.
|
|
177
|
+
Always keep the scaffold's `primary` menu, replacing its starter labels with
|
|
178
|
+
the site plan's links. Add `footer`, `social`, and `legal` only when the
|
|
179
|
+
selected templates bind those menus. Menu items can be `custom` items with
|
|
180
|
+
relative URLs or anchor URLs; page-backed and translated sites may use
|
|
181
|
+
EmDash reference items when the content exists so URL/slug changes follow
|
|
182
|
+
the referenced entry.
|
|
183
|
+
- Record the menu names and shapes in the content-model doc/site plan, for
|
|
184
|
+
example: "`primary`: 5 top-level items, flat, `Products` becomes a dropdown
|
|
185
|
+
only if the shell match needs depth; `footer`: 3 columns as top-level
|
|
186
|
+
headings with child links; `legal`: Privacy, Terms."
|
|
187
|
+
- Seed at least enough rows per section-data collection that bound sections
|
|
188
|
+
render non-empty during review.
|
|
189
|
+
- For image fields and owner-supplied assets, follow
|
|
190
|
+
[references/emdash-collections.md#ingesting-owner-assets](references/emdash-collections.md#ingesting-owner-assets)
|
|
191
|
+
before deciding whether to seed `$media` URLs or upload files through the
|
|
192
|
+
EmDash CLI.
|
|
193
|
+
- Keep every Portable Text block keyed with a stable `_key`; Galley edit
|
|
194
|
+
context depends on stable block keys.
|
|
195
|
+
- On designed detail pages (a collection bound to an entry-hosted starter, or
|
|
196
|
+
a page whose `design` field is set) start Portable Text body headings at
|
|
197
|
+
`h2` — the bound template already renders the entry title as the page `h1`,
|
|
198
|
+
so a body `h1` renders as duplicate oversized display text. Pages rendered
|
|
199
|
+
through the prose Portable Text path carry their `h1` opener in the body.
|
|
200
|
+
- Replace registry sample copy with app-specific copy; do not ship
|
|
201
|
+
placeholder prose to review.
|
|
202
|
+
- Ensure `site/src/live.config.ts` exists for public runtime reads:
|
|
203
|
+
`_emdash: defineLiveCollection({ loader: emdashLoader() })`, importing
|
|
204
|
+
`emdashLoader` from `emdash/runtime`. A seeded D1 without this live
|
|
205
|
+
collection can still render fallback content because the Astro content layer
|
|
206
|
+
has no live collection to query.
|
|
207
|
+
|
|
208
|
+
## Verification
|
|
209
|
+
|
|
210
|
+
- Restart the site dev server after seed changes; an invalid seed fails the
|
|
211
|
+
first request and logs the error.
|
|
212
|
+
- In `/_emdash/admin`, confirm collections, fields, and sample entries exist
|
|
213
|
+
with the expected publish states.
|
|
214
|
+
- Confirm each planned page path resolves (page-backing collections respond
|
|
215
|
+
at their `urlPattern` URLs) before starting theme selection.
|
|
216
|
+
- For page-backing collections with extra fields, confirm those fields appear
|
|
217
|
+
on the public route and not only in the admin/database.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2026 Cloudflare Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|