@raybase/create 0.0.1 → 0.3.3
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 +2351 -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,336 @@
|
|
|
1
|
+
# Cross-Site Scripting (XSS) Prevention Reference
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
XSS occurs when applications include untrusted data in web pages without proper validation or escaping. Attackers can execute scripts in victims' browsers to hijack sessions, deface websites, or redirect users to malicious sites.
|
|
6
|
+
|
|
7
|
+
## XSS Types
|
|
8
|
+
|
|
9
|
+
| Type | Description | Example |
|
|
10
|
+
|------|-------------|---------|
|
|
11
|
+
| **Reflected** | Malicious script from current HTTP request | URL parameter rendered in response |
|
|
12
|
+
| **Stored** | Malicious script stored in target server | Comment field saved and displayed |
|
|
13
|
+
| **DOM-based** | Vulnerability in client-side code | JavaScript reads URL and writes to DOM |
|
|
14
|
+
|
|
15
|
+
## Output Encoding by Context
|
|
16
|
+
|
|
17
|
+
### HTML Body Context
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
// VULNERABLE: innerHTML with user data
|
|
21
|
+
element.innerHTML = userInput;
|
|
22
|
+
|
|
23
|
+
// SAFE: Use textContent
|
|
24
|
+
element.textContent = userInput;
|
|
25
|
+
|
|
26
|
+
// SAFE: Use createTextNode
|
|
27
|
+
document.createTextNode(userInput);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**HTML Entity Encoding**
|
|
31
|
+
| Character | Encoding |
|
|
32
|
+
|-----------|----------|
|
|
33
|
+
| `<` | `<` |
|
|
34
|
+
| `>` | `>` |
|
|
35
|
+
| `&` | `&` |
|
|
36
|
+
| `"` | `"` |
|
|
37
|
+
| `'` | `'` |
|
|
38
|
+
|
|
39
|
+
### HTML Attribute Context
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<!-- VULNERABLE: Unquoted attribute -->
|
|
43
|
+
<input value=${userInput}>
|
|
44
|
+
|
|
45
|
+
<!-- VULNERABLE: Event handler with user data -->
|
|
46
|
+
<button onclick="doSomething('${userInput}')">
|
|
47
|
+
|
|
48
|
+
<!-- SAFE: Quoted attribute with encoding -->
|
|
49
|
+
<input value="${htmlEncode(userInput)}">
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Rules:**
|
|
53
|
+
- Always quote attribute values
|
|
54
|
+
- Never place user input in event handlers (`onclick`, `onerror`, etc.)
|
|
55
|
+
- Use `setAttribute()` which auto-encodes
|
|
56
|
+
|
|
57
|
+
### JavaScript Context
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
// VULNERABLE: eval with user input
|
|
61
|
+
eval(userInput);
|
|
62
|
+
|
|
63
|
+
// VULNERABLE: setTimeout with string
|
|
64
|
+
setTimeout("doSomething('" + userInput + "')", 1000);
|
|
65
|
+
|
|
66
|
+
// VULNERABLE: Function constructor
|
|
67
|
+
new Function("return " + userInput)();
|
|
68
|
+
|
|
69
|
+
// SAFE: JSON encoding for data
|
|
70
|
+
const data = JSON.parse(jsonString);
|
|
71
|
+
|
|
72
|
+
// SAFE: setTimeout with function
|
|
73
|
+
setTimeout(() => doSomething(userInput), 1000);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Safe JavaScript Locations** (with proper encoding):
|
|
77
|
+
- Inside quoted string values only
|
|
78
|
+
- Never directly in script blocks
|
|
79
|
+
|
|
80
|
+
### URL Context
|
|
81
|
+
|
|
82
|
+
```javascript
|
|
83
|
+
// VULNERABLE: User input in href
|
|
84
|
+
element.href = userInput;
|
|
85
|
+
|
|
86
|
+
// VULNERABLE: javascript: URL scheme
|
|
87
|
+
<a href="javascript:${userInput}">
|
|
88
|
+
|
|
89
|
+
// SAFE: Validate URL scheme
|
|
90
|
+
const url = new URL(userInput);
|
|
91
|
+
if (url.protocol === 'https:' || url.protocol === 'http:') {
|
|
92
|
+
element.href = url.toString();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// SAFE: Encode URL parameters
|
|
96
|
+
const encoded = encodeURIComponent(userInput);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### CSS Context
|
|
100
|
+
|
|
101
|
+
```css
|
|
102
|
+
/* VULNERABLE: User input in style */
|
|
103
|
+
.element { background: url(${userInput}); }
|
|
104
|
+
|
|
105
|
+
/* VULNERABLE: Expression in CSS */
|
|
106
|
+
.element { behavior: expression(${userInput}); }
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Rules:**
|
|
110
|
+
- Place user data only in CSS property values
|
|
111
|
+
- Never allow user input in selectors or URLs
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Safe DOM Sinks
|
|
116
|
+
|
|
117
|
+
**Use These:**
|
|
118
|
+
```javascript
|
|
119
|
+
elem.textContent = variable;
|
|
120
|
+
elem.insertAdjacentText('beforeend', variable);
|
|
121
|
+
elem.className = variable; // for class names
|
|
122
|
+
elem.setAttribute('data-value', variable);
|
|
123
|
+
formField.value = variable;
|
|
124
|
+
document.createTextNode(variable);
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Avoid These:**
|
|
128
|
+
```javascript
|
|
129
|
+
elem.innerHTML = variable; // XSS
|
|
130
|
+
elem.outerHTML = variable; // XSS
|
|
131
|
+
document.write(variable); // XSS
|
|
132
|
+
document.writeln(variable); // XSS
|
|
133
|
+
eval(variable); // Code execution
|
|
134
|
+
setTimeout(variable); // If string argument
|
|
135
|
+
setInterval(variable); // If string argument
|
|
136
|
+
new Function(variable); // Code execution
|
|
137
|
+
elem.insertAdjacentHTML(); // XSS
|
|
138
|
+
elem.onevent = variable; // Event handler
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Framework-Specific Considerations
|
|
144
|
+
|
|
145
|
+
### React
|
|
146
|
+
|
|
147
|
+
```jsx
|
|
148
|
+
// SAFE: Auto-escaped by default
|
|
149
|
+
<div>{userInput}</div>
|
|
150
|
+
|
|
151
|
+
// VULNERABLE: dangerouslySetInnerHTML
|
|
152
|
+
<div dangerouslySetInnerHTML={{__html: userInput}} />
|
|
153
|
+
|
|
154
|
+
// SAFE: Sanitize before using dangerouslySetInnerHTML
|
|
155
|
+
import DOMPurify from 'dompurify';
|
|
156
|
+
<div dangerouslySetInnerHTML={{__html: DOMPurify.sanitize(userInput)}} />
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Angular
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
// SAFE: Auto-escaped by default
|
|
163
|
+
<div>{{ userInput }}</div>
|
|
164
|
+
|
|
165
|
+
// VULNERABLE: bypassSecurityTrust*
|
|
166
|
+
this.sanitizer.bypassSecurityTrustHtml(userInput);
|
|
167
|
+
|
|
168
|
+
// Use bypassSecurityTrust* only with sanitized input
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Vue
|
|
172
|
+
|
|
173
|
+
```html
|
|
174
|
+
<!-- SAFE: Auto-escaped -->
|
|
175
|
+
<div>{{ userInput }}</div>
|
|
176
|
+
|
|
177
|
+
<!-- VULNERABLE: v-html directive -->
|
|
178
|
+
<div v-html="userInput"></div>
|
|
179
|
+
|
|
180
|
+
<!-- SAFE: Sanitize first -->
|
|
181
|
+
<div v-html="sanitizedInput"></div>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Django/Jinja2
|
|
185
|
+
|
|
186
|
+
```django
|
|
187
|
+
<!-- SAFE: Auto-escaped by default -->
|
|
188
|
+
{{ user_input }}
|
|
189
|
+
|
|
190
|
+
<!-- VULNERABLE: |safe filter -->
|
|
191
|
+
{{ user_input|safe }}
|
|
192
|
+
|
|
193
|
+
<!-- VULNERABLE: {% autoescape off %} -->
|
|
194
|
+
{% autoescape off %}
|
|
195
|
+
{{ user_input }}
|
|
196
|
+
{% endautoescape %}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## HTML Sanitization
|
|
202
|
+
|
|
203
|
+
When users must submit HTML (rich text editors), use a sanitization library.
|
|
204
|
+
|
|
205
|
+
```javascript
|
|
206
|
+
// Recommended: DOMPurify
|
|
207
|
+
import DOMPurify from 'dompurify';
|
|
208
|
+
|
|
209
|
+
const clean = DOMPurify.sanitize(dirty);
|
|
210
|
+
|
|
211
|
+
// With configuration
|
|
212
|
+
const clean = DOMPurify.sanitize(dirty, {
|
|
213
|
+
ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'a'],
|
|
214
|
+
ALLOWED_ATTR: ['href']
|
|
215
|
+
});
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Key Points:**
|
|
219
|
+
- Keep sanitization libraries updated
|
|
220
|
+
- Configure allowed tags/attributes based on needs
|
|
221
|
+
- Sanitize on output, not just input
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Content Security Policy (CSP)
|
|
226
|
+
|
|
227
|
+
CSP provides defense-in-depth but should not be the primary XSS defense.
|
|
228
|
+
|
|
229
|
+
### Strict CSP (Recommended)
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
Content-Security-Policy:
|
|
233
|
+
default-src 'self';
|
|
234
|
+
script-src 'nonce-{RANDOM}' 'strict-dynamic';
|
|
235
|
+
object-src 'none';
|
|
236
|
+
base-uri 'none';
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Nonce-Based Approach
|
|
240
|
+
|
|
241
|
+
```html
|
|
242
|
+
<!-- Server generates unique nonce per request -->
|
|
243
|
+
<script nonce="r4nd0m123">
|
|
244
|
+
// Allowed script
|
|
245
|
+
</script>
|
|
246
|
+
|
|
247
|
+
<script>
|
|
248
|
+
// Blocked - no nonce
|
|
249
|
+
</script>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Hash-Based Approach
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
Content-Security-Policy: script-src 'sha256-base64hash...'
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## DOM-based XSS Prevention
|
|
261
|
+
|
|
262
|
+
### Dangerous Sources
|
|
263
|
+
|
|
264
|
+
```javascript
|
|
265
|
+
// Attacker-controllable sources
|
|
266
|
+
location.hash
|
|
267
|
+
location.search
|
|
268
|
+
document.referrer
|
|
269
|
+
window.name
|
|
270
|
+
postMessage data
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Prevention
|
|
274
|
+
|
|
275
|
+
```javascript
|
|
276
|
+
// VULNERABLE: Direct use of source in sink
|
|
277
|
+
element.innerHTML = location.hash.slice(1);
|
|
278
|
+
|
|
279
|
+
// SAFE: Validate and encode
|
|
280
|
+
const hash = location.hash.slice(1);
|
|
281
|
+
if (/^[a-zA-Z0-9-]+$/.test(hash)) {
|
|
282
|
+
element.textContent = hash;
|
|
283
|
+
}
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Key Grep Patterns for Detection
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
# Dangerous DOM sinks
|
|
292
|
+
grep -rn "innerHTML\|outerHTML\|document\.write" --include="*.js" --include="*.jsx"
|
|
293
|
+
grep -rn "dangerouslySetInnerHTML" --include="*.jsx" --include="*.tsx"
|
|
294
|
+
grep -rn "v-html" --include="*.vue"
|
|
295
|
+
grep -rn "\|safe\|autoescape off" --include="*.html" --include="*.jinja"
|
|
296
|
+
|
|
297
|
+
# Dangerous JavaScript
|
|
298
|
+
grep -rn "eval(\|Function(\|setTimeout.*string\|setInterval.*string" --include="*.js"
|
|
299
|
+
|
|
300
|
+
# Framework bypasses
|
|
301
|
+
grep -rn "bypassSecurityTrust" --include="*.ts"
|
|
302
|
+
grep -rn "mark_safe\|SafeString" --include="*.py"
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Testing Payloads
|
|
308
|
+
|
|
309
|
+
**Basic:**
|
|
310
|
+
```
|
|
311
|
+
<script>alert('XSS')</script>
|
|
312
|
+
<img src=x onerror=alert('XSS')>
|
|
313
|
+
<svg onload=alert('XSS')>
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Attribute Escape:**
|
|
317
|
+
```
|
|
318
|
+
" onmouseover="alert('XSS')
|
|
319
|
+
' onclick='alert("XSS")
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**JavaScript Context:**
|
|
323
|
+
```
|
|
324
|
+
';alert('XSS')//
|
|
325
|
+
\';alert(\'XSS\')//
|
|
326
|
+
</script><script>alert('XSS')</script>
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## References
|
|
332
|
+
|
|
333
|
+
- [OWASP XSS Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html)
|
|
334
|
+
- [OWASP DOM-based XSS Prevention](https://cheatsheetseries.owasp.org/cheatsheets/DOM_based_XSS_Prevention_Cheat_Sheet.html)
|
|
335
|
+
- [OWASP CSP Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html)
|
|
336
|
+
- [CWE-79: Cross-site Scripting](https://cwe.mitre.org/data/definitions/79.html)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"base": [
|
|
4
|
+
"raybase-building",
|
|
5
|
+
"raybase-auth",
|
|
6
|
+
"raybase-data-and-policies",
|
|
7
|
+
"raybase-actions",
|
|
8
|
+
"raybase-background-jobs",
|
|
9
|
+
"raybase-notifications",
|
|
10
|
+
"raybase-mcp",
|
|
11
|
+
"raybase-search",
|
|
12
|
+
"raybase-realtime",
|
|
13
|
+
"raybase-settings",
|
|
14
|
+
"raybase-ai",
|
|
15
|
+
"raybase-deploy",
|
|
16
|
+
"raybase-changing-a-live-app",
|
|
17
|
+
"raybase-schema",
|
|
18
|
+
"raybase-pro-migration"
|
|
19
|
+
],
|
|
20
|
+
"frameworks": {
|
|
21
|
+
"tanstack-start": [
|
|
22
|
+
"raybase-tanstack-start",
|
|
23
|
+
"raybase-tanstack-start-design",
|
|
24
|
+
"raybase-tanstack-start-security-review"
|
|
25
|
+
],
|
|
26
|
+
"react-router": [
|
|
27
|
+
"raybase-react-router",
|
|
28
|
+
"raybase-react-router-design",
|
|
29
|
+
"raybase-react-router-security-review"
|
|
30
|
+
],
|
|
31
|
+
"astro-emdash": [
|
|
32
|
+
"raybase-astro-emdash",
|
|
33
|
+
"raybase-astro-emdash-content-model",
|
|
34
|
+
"raybase-astro-emdash-migration",
|
|
35
|
+
"raybase-astro-emdash-galley",
|
|
36
|
+
"raybase-astro-emdash-theme-selection",
|
|
37
|
+
"raybase-astro-emdash-design",
|
|
38
|
+
"raybase-astro-emdash-security-review"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Raybase conventions
|
|
2
|
+
|
|
3
|
+
Use the raybase-* skills in `.agents/skills` before changing this app. For Astro/EmDash content-site work, read `.agents/skills/raybase-astro-emdash/SKILL.md`; when `dev/SPEC.md` records an existing site being migrated, read `.agents/skills/raybase-astro-emdash-migration/SKILL.md` before content modeling; for planning the site's pages and EmDash collections, read `.agents/skills/raybase-astro-emdash-content-model/SKILL.md`; for the site's design direction and durable design work, read `.agents/skills/raybase-astro-emdash-design/SKILL.md`; for public page sections, also read `.agents/skills/raybase-astro-emdash-galley/SKILL.md`; for guided theme selection and full-site Template assembly, read `.agents/skills/raybase-astro-emdash-theme-selection/SKILL.md`. For TanStack Start spine work (routes under `src/routes/`, `src/raybase.config.ts`, `src/raybase.server.ts`, `src/actions.ts`), read the spine sections of `.agents/skills/raybase-astro-emdash/SKILL.md` and the Architecture notes below. Claude Code compatibility links live in `.claude/skills`.
|
|
4
|
+
|
|
5
|
+
Commands:
|
|
6
|
+
- `raybase dev`
|
|
7
|
+
- `raybase doctor`
|
|
8
|
+
- `raybase check`
|
|
9
|
+
- `pnpm test`
|
|
10
|
+
- `raybase migrate`
|
|
11
|
+
- `raybase deploy`
|
|
12
|
+
- `raybase backup --url <url>`
|
|
13
|
+
- `raybase backups create|list|download|restore --url <url>`
|
|
14
|
+
- `raybase export --url <url>`
|
|
15
|
+
- `raybase invite --owner`
|
|
16
|
+
- Docs placement is recorded in `dev/SPEC.md`, `package.json` `raybase.modules.docs.placement`, and `.raybase/modules.json`. Use `.agents/skills/raybase-docs-writing/SKILL.md` before changing root `content/docs` or `site/content/docs`.
|
|
17
|
+
|
|
18
|
+
Architecture:
|
|
19
|
+
- `src/worker-entry.ts` is the Cloudflare Worker entry. It re-exports the TanStack Start default handler, `RaybaseDatabaseObject`, and the generated app's `RaybaseAIChatAgentObject`.
|
|
20
|
+
- Raybase stores auth, sessions, invites, audit, state, app tables, and declared integration tables in one SQLite Durable Object bound as `RAYBASE_DATA`.
|
|
21
|
+
- Guide/Agent chat state uses the app-configured `RaybaseAIChatAgentObject` Durable Object bound as `RAYBASE_AI_CHAT_AGENT`; keep the export and binding aligned with `src/raybase.server.ts`.
|
|
22
|
+
- Scheduled format-2 backups use `RAYBASE_BACKUPS`, `RAYBASE_BACKUPS_ENABLED=true`, `RAYBASE_BACKUPS_RETAIN=30`, and the daily `0 2 * * *` cron. Run `raybase backups enable` to generate and upload the managed `RAYBASE_BACKUPS_KEY`; never put it in Wrangler `vars`. New archives are envelope-encrypted `.rbb` files and fail closed without a ready provider. Retain historical keys after explicit rotation. Backups include SQLite data and file metadata, not R2 file bytes or Vectorize indexes; plaintext `.sql` is restore-only compatibility input.
|
|
23
|
+
- File storage is opt-in. Declare buckets in `src/db/storage.ts`, pass `storage` to `createRaybaseApp`, and bind `RAYBASE_FILES` before using `/api/files`.
|
|
24
|
+
- Jobs are opt-in. Start from `src/jobs.example.ts`, pass `jobs` to
|
|
25
|
+
`createRaybaseApp`, keep the queue consumer export, and run `raybase jobs
|
|
26
|
+
enable`. Keep the `scheduled` Worker export only when the app declares a
|
|
27
|
+
platform cron; keyed schedules are alarm-driven. Runtime modules may also
|
|
28
|
+
contribute jobs through `modules: [...]`; they use the same queue wiring.
|
|
29
|
+
- Notifications are opt-in unless a real app declares them. Start from
|
|
30
|
+
`src/notifications.example.ts`; external channels require jobs/queues and
|
|
31
|
+
provider configuration before use. Runtime modules may contribute notification
|
|
32
|
+
adapters; provider webhooks should verify and enqueue quickly, and provider
|
|
33
|
+
sends should go through notification adapters rather than direct `fetch()`.
|
|
34
|
+
- Realtime is opt-in. Start from `src/realtime.example.ts`, set
|
|
35
|
+
`appConfig.realtime.enabled: true`, and keep mutations on Raybase data
|
|
36
|
+
clients or declared actions so changes broadcast.
|
|
37
|
+
- Semantic retrieval is opt-in. Start from `src/ai/retrieval.ts`, pass
|
|
38
|
+
`retrieval` to `createRaybaseApp`, and provision Vectorize only when fuzzy
|
|
39
|
+
retrieval or RAG is needed. Use SQL FTS in `src/search.ts` for exact app
|
|
40
|
+
search.
|
|
41
|
+
- Runtime settings are safe, non-secret values. The starter registers
|
|
42
|
+
`src/settings.ts` with a user-scoped dashboard density example; do not put
|
|
43
|
+
secrets, roles, schema, bindings, routes, queues, or auth config in settings.
|
|
44
|
+
- `raybase migrate` generates app-table migrations into `migrations/app/` and compiles them into `src/db/migrations.gen.ts`, which ships inside the worker and applies lazily on first database access. Never edit `migrations.gen.ts` by hand.
|
|
45
|
+
- Fumadocs has two supported placements. `spine` placement serves docs (public by default, see `dev/SPEC.md` `Docs exposure`) from root `content/docs`, `src/docs`, and `src/routes/docs*`. `site` placement serves public docs from `site/content/docs`, `site/src/docs`, `site/src/pages/docs*`, and `site/src/pages/llms.txt.ts`.
|
|
46
|
+
- App UI routes live under the pathless `src/routes/_app` layout. Keep app-owned UI, shadcn components, and app styling in that route graph.
|
|
47
|
+
- `src/routes/_app.tsx` imports `src/styles.css`. Do not import `src/styles.css` from `src/routes/__root.tsx` or docs routes.
|
|
48
|
+
- Do not leave root spine docs routes in a `site` placement app, and do not add `site/src/pages/docs*` for spine docs.
|
|
49
|
+
- MCP is enabled by default. App MCP lives at `/mcp`; Operator MCP lives at `/mcp/operator` for authorized operators, with read scopes for production evidence and narrow write scopes for typed, audited app-data, app-setting, invite, and user-lifecycle operations.
|
|
50
|
+
- Public content sections should be implemented as Galley templates, not new
|
|
51
|
+
Astro section components. Structural pages point their `design` field at a
|
|
52
|
+
page-starter template that composes sections with `{% render %}` tags; prose
|
|
53
|
+
pages use `pages.content` Portable Text (inline `galley.block`/`galley.shared`
|
|
54
|
+
embeds stay supported). Use
|
|
55
|
+
`site/src/components/blocks/RaybaseActionIsland.astro` only for the Raybase
|
|
56
|
+
Server Island exception.
|
|
57
|
+
- Templates are the preferred reusable source for runtime-editable public
|
|
58
|
+
sections when a registry template fits. Use `raybase templates list|search|info`, then
|
|
59
|
+
`raybase templates add <id>` or `raybase templates theme add <theme-id>` to stage
|
|
60
|
+
Galley templates under `site/seed/templates/`; page starters also stage page
|
|
61
|
+
seeds under `site/seed/pages/` whose `design` points at the starter. Apply
|
|
62
|
+
staged templates and page seeds with `pnpm --dir site run templates:apply`
|
|
63
|
+
while the Astro site is running. Use `--bind <alias=collection>` when a
|
|
64
|
+
selected template needs an EmDash collection data source override.
|
|
65
|
+
- Installed Templates are draft templates by default. `raybase templates theme
|
|
66
|
+
add` stages a theme's voice (palettes, sections, page starters); run
|
|
67
|
+
`raybase templates shell add <layout-id> --activate` only when the selected
|
|
68
|
+
shell, palette, and page seeds are intended to become the active public
|
|
69
|
+
structure; activation stages an ephemeral `activation.json` work order that
|
|
70
|
+
`templates:apply` consumes and deletes after publishing and setting the
|
|
71
|
+
layout pointer. Page structure is Liquid (`{% render %}` with bare template
|
|
72
|
+
ids, resolved by installation); do not add per-reference version pins or a
|
|
73
|
+
JSON section composition graph.
|
|
74
|
+
- `site/demo/` is the Galley demo starter set: a read-first worked example of
|
|
75
|
+
typed context, entry-hosted detail pages, collection/menu dataSources, and
|
|
76
|
+
field-default idioms in the standard Template file format. Optionally load
|
|
77
|
+
it as drafts with `pnpm --dir site run demo:load` and remove every trace with
|
|
78
|
+
`pnpm --dir site run demo:unload`; `raybase doctor` warns while it is
|
|
79
|
+
loaded. It is teaching material — copy its wiring, never its look, and never
|
|
80
|
+
deploy with it loaded.
|
|
81
|
+
- Templates that declare `data-rb-motion` use `site/src/lib/site-motion.ts`.
|
|
82
|
+
Basecoat or behavior sidecar support belongs in Galley/template-host
|
|
83
|
+
plumbing, not hand-written React app UI.
|
|
84
|
+
- Content-site Server Islands call declared `src/actions.ts` app actions
|
|
85
|
+
through the allow-list in `site/src/pages/_raybase/islands/action.ts`.
|
|
86
|
+
Do not replace that route with arbitrary URL forwarding.
|
|
87
|
+
- Business and mutating actions need focused tests. Use `@raybase/core/test`
|
|
88
|
+
for action policy, table policy, ownership, invalid input, and invalid state
|
|
89
|
+
cases. When replacing starter workflows or tables, replace
|
|
90
|
+
`tests/raybase-patterns.test.ts` instead of leaving todo references behind.
|
|
91
|
+
- App tables should model the business domain. Do not add tenant scoping columns to app schema.
|
|
92
|
+
- Multi-tenancy, many customer organizations sharing one app, and SSO across apps are Raybase Pro features. Core is single-tenant by design. A Pro upgrade should start as single-mode unless the app owner explicitly requests a multi-tenant product migration.
|
|
93
|
+
- `dev/SPEC.md` must contain `Signup mode`, `Cloudflare email capability`, `Auth email features`, `Invite delivery`, and `Password recovery` lines before implementation.
|
|
94
|
+
- Default to `Signup mode: invite-only`, `Cloudflare email capability: free-compatible`, `Auth email features: none`, `Invite delivery: admin-shared links`, and `Password recovery: admin-assisted`.
|
|
95
|
+
- Public signup is controlled by `appConfig.auth.signupMode`, not `auth.publicRoutes`. Use `"public"` for provider and password signup, or `"provider-only"` for provider signup with the password door closed. Both create normal `user` users only; password sign-in stays available to existing accounts, and Raybase `/admin` remains invite/operator-only.
|
|
96
|
+
- Password-based public signup, password reset, emailed invites, welcome email, and magic links require owner-confirmed Workers Paid plus Cloudflare Email Sending/domain onboarding and `Cloudflare email capability: transactional-email`. Provider-only signup needs no auth email because the provider verifies the email.
|
|
97
|
+
- Cloudflare verified destination addresses are only for operator/admin notifications or intentional test sends; do not treat them as user verification, password reset, invite email, magic-link auth, or public signup.
|
|
98
|
+
- Local dev personas are configured in `appConfig.auth.devUser` or `appConfig.auth.devUsers`. Raybase Core owns local session creation, login-page persona buttons, local dev chrome on spine app pages, the Core-provided Astro/EmDash content-door dev-session proxy, and the dev-only first-page auto-bootstrap on Astro/EmDash content sites. Apps must not add their own auto-login path.
|
|
99
|
+
- Write `dev/SPEC.md` and `dev/SPEC-OVERVIEW.md` together before asking for
|
|
100
|
+
approval; capture why the app exists and what success looks like when that is
|
|
101
|
+
not already clear. Present the overview inline in the approval message and
|
|
102
|
+
link `dev/SPEC.md` as the full spec. Read `dev/SPEC.md`,
|
|
103
|
+
`dev/SPEC-OVERVIEW.md`, and `dev/CODEBASE-MAP.md` before substantial product
|
|
104
|
+
or architecture work, update them when the product story, business value, or
|
|
105
|
+
architecture changes, and skip churn for tiny fixes.
|
|
106
|
+
- Temporary feature proposals live in `dev/features/<feature-slug>/`; archive them under `dev/features/archive/` after durable facts are folded into the canonical planning docs.
|
|
107
|
+
- `DESIGN.md` records the spine starter's palette, type, spacing, and
|
|
108
|
+
canonical layouts, plus the public site's design direction and selected
|
|
109
|
+
theme in its Public Site section. Update it when making durable
|
|
110
|
+
design-system changes.
|
|
111
|
+
|
|
112
|
+
Prohibitions:
|
|
113
|
+
- Do not add custom auth.
|
|
114
|
+
- Do not expose signup by adding `/signup`, `/api/auth/signup`, or `/api/auth/*` to `auth.publicRoutes`.
|
|
115
|
+
- Do not add app-owned local-mode persona switchers, product-header dev persona dropdowns, `src/dev/auto-session`, `ensureLocalSession`, or app-screen calls to `/api/dev/session` or `/api/dev/session/status`. For Astro/EmDash public sites, use only the generated Core-owned `/_raybase/dev/session` content-door route.
|
|
116
|
+
- Do not import or use `unsafeDb`.
|
|
117
|
+
- Do not call `env.RAYBASE_FILES.get/put/delete/list` from app code. Use Raybase file APIs so auth, policies, audit, and attachment-safe headers apply.
|
|
118
|
+
- Do not import `src/styles.css`, `src/themes/*`, or `src/components/ui/*` from docs routes or docs helper modules.
|
|
119
|
+
- Do not deploy without `raybase doctor` passing. Run `raybase check` before
|
|
120
|
+
handoff or deploy review when action correctness or workflow behavior
|
|
121
|
+
changed.
|
|
122
|
+
- Do not change schema outside `src/db/schema.ts` plus `raybase migrate`.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Design Baseline
|
|
2
|
+
|
|
3
|
+
## Palette
|
|
4
|
+
|
|
5
|
+
- `background`: `oklch(0.985 0.003 247)` for the app canvas.
|
|
6
|
+
- `card`: `oklch(1 0 0)` for contained panels and repeated items.
|
|
7
|
+
- `foreground`: `oklch(0.19 0.012 248)` for primary text.
|
|
8
|
+
- `muted`: `oklch(0.955 0.006 247)` and `muted-foreground`: `oklch(0.48 0.017 248)` for quiet surfaces and secondary copy.
|
|
9
|
+
- `primary`: `oklch(0.25 0.025 248)` for primary actions and active states.
|
|
10
|
+
- `accent`: `oklch(0.92 0.018 246)` for low-emphasis highlights.
|
|
11
|
+
- `destructive`: `oklch(0.58 0.21 25)` for errors and destructive actions.
|
|
12
|
+
- Semantic chart colors and public-site palettes live in generated registry palette artifacts under `site/src/styles/palettes.gen.css`; `site/src/styles.css` only keeps fallback defaults.
|
|
13
|
+
|
|
14
|
+
## Typography
|
|
15
|
+
|
|
16
|
+
- The starter fallback uses the system sans stack through `--app-font-sans`; installed registry palettes can override it and generate Fontsource imports in `site/src/styles/palette-fonts.gen.css`.
|
|
17
|
+
- Headings (`h1`–`h6`) use `--font-display`, which falls back to `--app-font-sans` unless a theme sets `--app-font-display` (e.g. `slate` → Libre Baskerville). See `docs/themes.md` → "Switching fonts".
|
|
18
|
+
- Use fixed rem sizes from Tailwind's scale: `text-sm` for compact labels and rows, `text-base` for body text, `text-lg` or `text-xl` for panel headings, and `text-3xl`/`text-4xl` only for page-level headings.
|
|
19
|
+
- Use `font-semibold` for labels/actions and `font-bold` for major headings. Keep letter spacing at `0em`.
|
|
20
|
+
|
|
21
|
+
## Spacing and Shape
|
|
22
|
+
|
|
23
|
+
- Use Tailwind spacing in 1x increments, with tight gaps inside controls and larger `gap-6`/`gap-8` between page regions.
|
|
24
|
+
- The base radius is `0.625rem`; cards and panels should use `rounded-lg`, controls should use `rounded-md`, and full pills are reserved for badges.
|
|
25
|
+
- Prefer hairline borders for structure and small shadows only for overlays such as command palettes.
|
|
26
|
+
|
|
27
|
+
## Canonical Layouts
|
|
28
|
+
|
|
29
|
+
- App shell: a `shadcn/ui` sidebar (`SidebarProvider` + `Sidebar` + `SidebarInset`)
|
|
30
|
+
with an off-canvas drawer on mobile. The sidebar holds the app mark, a primary
|
|
31
|
+
"New task" action, the `Overview` nav item, the `Projects` list (status dot +
|
|
32
|
+
open-task count badge), and a footer with Docs and the account menu. The inset
|
|
33
|
+
has a sticky 14-unit header (sidebar trigger, current view title, search,
|
|
34
|
+
archived toggle) over a `max-w-5xl` content column.
|
|
35
|
+
- Overview view: page heading, a 4-up metric row (`grid-cols-2 lg:grid-cols-4`),
|
|
36
|
+
then a two-column band — a bordered "Due next" list with divided rows beside a
|
|
37
|
+
"Team visibility" summary card.
|
|
38
|
+
- Project view: project header (title + status badge + actions menu) with a thin
|
|
39
|
+
progress bar, an open-task list of compact rows, and a collapsed "Completed"
|
|
40
|
+
`<details>` group.
|
|
41
|
+
- Task rows: read-first. One line shows checkbox, title, assignee, due date, and
|
|
42
|
+
priority/status badges; a chevron expands an inline editor (full fields +
|
|
43
|
+
Save / Mark done / Archive). Create flows (new task, new/edit project) use a
|
|
44
|
+
`Dialog`.
|
|
45
|
+
- Repeated records: bordered containers with a compact header and divided rows.
|
|
46
|
+
- Docs: `/docs` route files are TanStack server forwarders that return a
|
|
47
|
+
standalone Fumadocs document from `src/docs/docs-handler.tsx`. App pages use
|
|
48
|
+
`src/styles.css` through the pathless `_app` route; docs inline
|
|
49
|
+
`src/styles-docs.css` in their own document.
|
|
50
|
+
- Overlays: command palette (search), dialogs, and dropdown menus over a dimmed
|
|
51
|
+
backdrop with keyboard dismissal.
|
|
52
|
+
|
|
53
|
+
## Framework notes
|
|
54
|
+
|
|
55
|
+
- `shadcn/ui` components live in `src/components/ui/` and import via the `@/`
|
|
56
|
+
alias. That alias is mapped in both `tsconfig.json` and `vite.config.ts`
|
|
57
|
+
(`resolve.alias`); keep them in sync or dev import resolution breaks.
|
|
58
|
+
- App and docs styles are document-local. App pages inherit `src/styles.css`
|
|
59
|
+
from the pathless `_app` route. Docs pages are served as a separate document
|
|
60
|
+
by `src/docs/docs-handler.tsx`, which inlines `src/styles-docs.css` with
|
|
61
|
+
`fumadocs-ui/css/neutral.css` + `fumadocs-ui/css/preset.css`, not app theme
|
|
62
|
+
files.
|
|
63
|
+
- Theme palettes: installed registry themes generate
|
|
64
|
+
`site/src/styles/palettes.gen.css`,
|
|
65
|
+
`site/src/styles/palette-fonts.gen.css`, and
|
|
66
|
+
`site/src/lib/palettes.gen.ts`. Use `raybase templates info` to inspect
|
|
67
|
+
palette kind, fonts, and provenance before choosing a palette (see
|
|
68
|
+
`docs/themes.md`).
|
|
69
|
+
|
|
70
|
+
## Public Site
|
|
71
|
+
|
|
72
|
+
The sections above describe the Raybase spine. The public Astro site's design
|
|
73
|
+
system is the selected registry theme plus a palette applied as
|
|
74
|
+
`data-palette` on the site `<html>`; installed palettes live in
|
|
75
|
+
`site/src/styles/palettes.gen.css`, while app-local Galley palette edits can
|
|
76
|
+
arrive as a validated `paletteCss` overlay.
|
|
77
|
+
This section is the site's durable design memory — later agents rebuild
|
|
78
|
+
context from it, not from the sessions that produced it. Record decisions
|
|
79
|
+
here as they are made (see
|
|
80
|
+
`.agents/skills/raybase-astro-emdash-design/SKILL.md`, whose
|
|
81
|
+
`reference/direction.md` defines the record shape):
|
|
82
|
+
|
|
83
|
+
- Design direction: audience, the site's job, three brand-voice words,
|
|
84
|
+
density, the scene sentence (and the light/dark call it forces), the color
|
|
85
|
+
strategy, named references and anti-reference, and the rationale.
|
|
86
|
+
- The selected theme, palette, and tone rationale (recorded at theme
|
|
87
|
+
selection).
|
|
88
|
+
- The site's 1–2 signature moves, so later edits protect them.
|
|
89
|
+
- Deliberate deviations from the theme baseline (bespoke sections, palette
|
|
90
|
+
edits, font swaps) and why.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "base-nova",
|
|
4
|
+
"rsc": false,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "src/styles.css",
|
|
9
|
+
"baseColor": "neutral",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"aliases": {
|
|
14
|
+
"components": "@/components",
|
|
15
|
+
"utils": "@/lib/utils",
|
|
16
|
+
"ui": "@/components/ui",
|
|
17
|
+
"lib": "@/lib",
|
|
18
|
+
"hooks": "@/hooks"
|
|
19
|
+
},
|
|
20
|
+
"iconLibrary": "lucide"
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Opening the CMS
|
|
3
|
+
description: Sign in and start editing pages.
|
|
4
|
+
public: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Sign in with the account your team gave you, then open the public site and choose CMS from the signed-in menu.
|
|
8
|
+
|
|
9
|
+
Start with Pages. Open an existing draft to review the editing pattern, or create a page when you need a new public URL.
|
|
10
|
+
|
|
11
|
+
Use the page content field to arrange reusable sections. Each section owns its own copy, media, links, and display options.
|
|
12
|
+
|
|
13
|
+
Preview before publishing. If a page needs a new reusable section or a layout change, note the goal clearly and ask the project maintainer to add the building block.
|
|
14
|
+
## Local time travel
|
|
15
|
+
|
|
16
|
+
In local development, use the fixed dev chrome or `POST /api/dev/time` with `{"now":"2030-08-12T09:00:00.000Z"}` to move the application clock. `GET /api/dev/time` reports virtual and real time; `{"reset":true}` returns to wall time. Forward jumps start bounded catch-up for Jobs, Agent schedules, wakes, and follow-ups. Repeating schedules coalesce to one run, while one-shot work drains without waiting for the HTTP response. Auth, leases, retries, tokens, provider calls, and diagnostics remain on real time. Moving backward or resetting does not rewrite future-dated rows; reset and reseed when a QA scenario crosses that edge.
|
|
17
|
+
|
|
18
|
+
Local tooling can restore the spine's base world with `POST /api/dev/seed` and `{"reset":true}` or apply one named variant with `{"variant":"empty-spine"}`. Reset is destructive for spine app tables; use sequential calls to layer variants, and use restore after time travel leaves future-dated rows. Content-site demo data remains owned by `site/`.
|
|
19
|
+
|
|
20
|
+
`GET /api/dev/manifest` serves the same validated `manifestVersion: 1` checkpoint written to `.raybase/app.manifest.json` at dev startup. Route sources use project-relative POSIX paths. Restart `raybase dev` after changing routes or declarations. The endpoint is local-only.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Editing the site
|
|
3
|
+
description: A quick map for signed-in content editors.
|
|
4
|
+
public: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The CMS is where signed-in editors manage public site pages, drafts, media, and reusable page sections.
|
|
8
|
+
|
|
9
|
+
Use the CMS link in the signed-in site menu to open the editing workspace. If the link is not visible, ask the person who manages access to invite you or adjust your role.
|
|
10
|
+
|
|
11
|
+
Most pages are built from a title, slug, metadata, and a sequence of reusable sections. Edit copy and media in the CMS, preview changes, then publish when the page is ready.
|
|
12
|
+
|
|
13
|
+
Keep structural changes deliberate. If you need a new section type, navigation pattern, layout, or data-backed block, ask the project maintainer to add it safely.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Connecting an assistant
|
|
3
|
+
description: How signed-in members can connect an approved assistant.
|
|
4
|
+
public: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Some apps let signed-in members connect an approved AI assistant through the app's `/mcp` endpoint.
|
|
8
|
+
|
|
9
|
+
Only connect assistants you trust. The assistant should explain what it can read or change before you approve a task.
|
|
10
|
+
|
|
11
|
+
If the connection fails, confirm you are signed in and ask the project maintainer whether assistant access is enabled for your role.
|