@raybase/create 0.0.2 → 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.
Files changed (644) hide show
  1. package/LICENSE +21 -0
  2. package/THIRD_PARTY_NOTICES.md +38 -0
  3. package/assets/apple-touch-icons/0.png +0 -0
  4. package/assets/apple-touch-icons/1.png +0 -0
  5. package/assets/apple-touch-icons/2.png +0 -0
  6. package/assets/apple-touch-icons/3.png +0 -0
  7. package/assets/apple-touch-icons/4.png +0 -0
  8. package/assets/apple-touch-icons/5.png +0 -0
  9. package/assets/apple-touch-icons/6.png +0 -0
  10. package/assets/apple-touch-icons/7.png +0 -0
  11. package/assets/apple-touch-icons/8.png +0 -0
  12. package/assets/apple-touch-icons/9.png +0 -0
  13. package/assets/apple-touch-icons/A.png +0 -0
  14. package/assets/apple-touch-icons/B.png +0 -0
  15. package/assets/apple-touch-icons/C.png +0 -0
  16. package/assets/apple-touch-icons/D.png +0 -0
  17. package/assets/apple-touch-icons/E.png +0 -0
  18. package/assets/apple-touch-icons/F.png +0 -0
  19. package/assets/apple-touch-icons/G.png +0 -0
  20. package/assets/apple-touch-icons/H.png +0 -0
  21. package/assets/apple-touch-icons/I.png +0 -0
  22. package/assets/apple-touch-icons/J.png +0 -0
  23. package/assets/apple-touch-icons/K.png +0 -0
  24. package/assets/apple-touch-icons/L.png +0 -0
  25. package/assets/apple-touch-icons/M.png +0 -0
  26. package/assets/apple-touch-icons/N.png +0 -0
  27. package/assets/apple-touch-icons/O.png +0 -0
  28. package/assets/apple-touch-icons/P.png +0 -0
  29. package/assets/apple-touch-icons/Q.png +0 -0
  30. package/assets/apple-touch-icons/R.png +0 -0
  31. package/assets/apple-touch-icons/S.png +0 -0
  32. package/assets/apple-touch-icons/T.png +0 -0
  33. package/assets/apple-touch-icons/U.png +0 -0
  34. package/assets/apple-touch-icons/V.png +0 -0
  35. package/assets/apple-touch-icons/W.png +0 -0
  36. package/assets/apple-touch-icons/X.png +0 -0
  37. package/assets/apple-touch-icons/Y.png +0 -0
  38. package/assets/apple-touch-icons/Z.png +0 -0
  39. package/assets/apple-touch-icons/default.png +0 -0
  40. package/dist/.source-hash +1 -0
  41. package/dist/index.d.ts +56 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +2351 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/raybase-package-ranges.d.ts +11 -0
  46. package/dist/raybase-package-ranges.d.ts.map +1 -0
  47. package/dist/raybase-package-ranges.js +11 -0
  48. package/dist/raybase-package-ranges.js.map +1 -0
  49. package/dist/source-fetch.d.ts +91 -0
  50. package/dist/source-fetch.d.ts.map +1 -0
  51. package/dist/source-fetch.js +325 -0
  52. package/dist/source-fetch.js.map +1 -0
  53. package/dist/source-hash.d.ts +2 -0
  54. package/dist/source-hash.d.ts.map +1 -0
  55. package/dist/source-hash.js +23 -0
  56. package/dist/source-hash.js.map +1 -0
  57. package/dist/starter-description.d.ts +44 -0
  58. package/dist/starter-description.d.ts.map +1 -0
  59. package/dist/starter-description.js +273 -0
  60. package/dist/starter-description.js.map +1 -0
  61. package/dist/starter-source.d.ts +43 -0
  62. package/dist/starter-source.d.ts.map +1 -0
  63. package/dist/starter-source.js +156 -0
  64. package/dist/starter-source.js.map +1 -0
  65. package/dist/store-app-apply.d.ts +27 -0
  66. package/dist/store-app-apply.d.ts.map +1 -0
  67. package/dist/store-app-apply.js +100 -0
  68. package/dist/store-app-apply.js.map +1 -0
  69. package/dist/store-app-manifest.d.ts +86 -0
  70. package/dist/store-app-manifest.d.ts.map +1 -0
  71. package/dist/store-app-manifest.js +110 -0
  72. package/dist/store-app-manifest.js.map +1 -0
  73. package/dist/store-app-registry.d.ts +30 -0
  74. package/dist/store-app-registry.d.ts.map +1 -0
  75. package/dist/store-app-registry.js +232 -0
  76. package/dist/store-app-registry.js.map +1 -0
  77. package/models/recommended.json +42 -0
  78. package/modules/api/templates/react-router/app/api/operations.ts +8 -0
  79. package/modules/api/templates/tanstack-start/src/api/operations.ts +15 -0
  80. package/modules/docs/templates/astro-emdash/content/docs/getting-started.mdx +13 -0
  81. package/modules/docs/templates/astro-emdash/content/docs/index.mdx +13 -0
  82. package/modules/docs/templates/astro-emdash/content/docs/mcp.mdx +11 -0
  83. package/modules/docs/templates/astro-emdash/content/docs/meta.json +4 -0
  84. package/modules/docs/templates/astro-emdash/site/content/docs/getting-started.mdx +12 -0
  85. package/modules/docs/templates/astro-emdash/site/content/docs/index.mdx +12 -0
  86. package/modules/docs/templates/astro-emdash/site/content/docs/mcp.mdx +10 -0
  87. package/modules/docs/templates/astro-emdash/site/content/docs/meta.json +4 -0
  88. package/modules/docs/templates/astro-emdash/site/source.config.ts +10 -0
  89. package/modules/docs/templates/astro-emdash/site/src/docs/docs-assets.ts +1 -0
  90. package/modules/docs/templates/astro-emdash/site/src/docs/docs-client.tsx +22 -0
  91. package/modules/docs/templates/astro-emdash/site/src/docs/docs-data.ts +24 -0
  92. package/modules/docs/templates/astro-emdash/site/src/docs/docs-handler.tsx +105 -0
  93. package/modules/docs/templates/astro-emdash/site/src/docs/docs-layout.tsx +56 -0
  94. package/modules/docs/templates/astro-emdash/site/src/docs/docs-mdx.tsx +79 -0
  95. package/modules/docs/templates/astro-emdash/site/src/docs/docs-page-actions.tsx +146 -0
  96. package/modules/docs/templates/astro-emdash/site/src/docs/docs-page.tsx +70 -0
  97. package/modules/docs/templates/astro-emdash/site/src/docs/llm-text.ts +61 -0
  98. package/modules/docs/templates/astro-emdash/site/src/docs/source.ts +7 -0
  99. package/modules/docs/templates/astro-emdash/site/src/pages/docs/[...slug].ts +6 -0
  100. package/modules/docs/templates/astro-emdash/site/src/pages/docs/api/markdown.ts +4 -0
  101. package/modules/docs/templates/astro-emdash/site/src/pages/docs/api/search.ts +4 -0
  102. package/modules/docs/templates/astro-emdash/site/src/pages/llms.txt.ts +8 -0
  103. package/modules/docs/templates/astro-emdash/site/src/styles-docs.css +3 -0
  104. package/modules/docs/templates/astro-emdash/source.config.ts +10 -0
  105. package/modules/docs/templates/astro-emdash/src/docs/docs-assets.ts +1 -0
  106. package/modules/docs/templates/astro-emdash/src/docs/docs-client.tsx +22 -0
  107. package/modules/docs/templates/astro-emdash/src/docs/docs-data.ts +24 -0
  108. package/modules/docs/templates/astro-emdash/src/docs/docs-handler.tsx +105 -0
  109. package/modules/docs/templates/astro-emdash/src/docs/docs-layout.tsx +56 -0
  110. package/modules/docs/templates/astro-emdash/src/docs/docs-mdx.tsx +79 -0
  111. package/modules/docs/templates/astro-emdash/src/docs/docs-page-actions.tsx +146 -0
  112. package/modules/docs/templates/astro-emdash/src/docs/docs-page.tsx +70 -0
  113. package/modules/docs/templates/astro-emdash/src/docs/llm-text.ts +61 -0
  114. package/modules/docs/templates/astro-emdash/src/docs/source.ts +7 -0
  115. package/modules/docs/templates/astro-emdash/src/routes/docs/$.tsx +22 -0
  116. package/modules/docs/templates/astro-emdash/src/routes/docs/api/markdown.ts +12 -0
  117. package/modules/docs/templates/astro-emdash/src/routes/docs/api/search.ts +12 -0
  118. package/modules/docs/templates/astro-emdash/src/routes/docs.index.tsx +22 -0
  119. package/modules/docs/templates/astro-emdash/src/routes/docs.tsx +22 -0
  120. package/modules/docs/templates/astro-emdash/src/styles-docs.css +3 -0
  121. package/modules/docs/templates/react-router/app/components/mdx.tsx +79 -0
  122. package/modules/docs/templates/react-router/app/lib/layout.shared.tsx +54 -0
  123. package/modules/docs/templates/react-router/app/lib/source.ts +7 -0
  124. package/modules/docs/templates/react-router/app/routes/docs.$.tsx +49 -0
  125. package/modules/docs/templates/react-router/app/routes/docs.api.search.ts +10 -0
  126. package/modules/docs/templates/react-router/app/routes/docs.tsx +13 -0
  127. package/modules/docs/templates/react-router/content/docs/getting-started.mdx +8 -0
  128. package/modules/docs/templates/react-router/content/docs/index.mdx +8 -0
  129. package/modules/docs/templates/react-router/content/docs/mcp.mdx +121 -0
  130. package/modules/docs/templates/react-router/content/docs/meta.json +4 -0
  131. package/modules/docs/templates/react-router/source.config.ts +5 -0
  132. package/modules/docs/templates/tanstack-start/content/docs/getting-started.mdx +10 -0
  133. package/modules/docs/templates/tanstack-start/content/docs/index.mdx +8 -0
  134. package/modules/docs/templates/tanstack-start/content/docs/mcp.mdx +121 -0
  135. package/modules/docs/templates/tanstack-start/content/docs/meta.json +4 -0
  136. package/modules/docs/templates/tanstack-start/source.config.ts +10 -0
  137. package/modules/docs/templates/tanstack-start/src/docs/docs-assets.ts +1 -0
  138. package/modules/docs/templates/tanstack-start/src/docs/docs-client.tsx +22 -0
  139. package/modules/docs/templates/tanstack-start/src/docs/docs-data.ts +24 -0
  140. package/modules/docs/templates/tanstack-start/src/docs/docs-handler.tsx +105 -0
  141. package/modules/docs/templates/tanstack-start/src/docs/docs-layout.tsx +56 -0
  142. package/modules/docs/templates/tanstack-start/src/docs/docs-mdx.tsx +79 -0
  143. package/modules/docs/templates/tanstack-start/src/docs/docs-page-actions.tsx +146 -0
  144. package/modules/docs/templates/tanstack-start/src/docs/docs-page.tsx +70 -0
  145. package/modules/docs/templates/tanstack-start/src/docs/llm-text.ts +61 -0
  146. package/modules/docs/templates/tanstack-start/src/docs/source.ts +7 -0
  147. package/modules/docs/templates/tanstack-start/src/routes/docs/$.tsx +22 -0
  148. package/modules/docs/templates/tanstack-start/src/routes/docs/api/markdown.ts +12 -0
  149. package/modules/docs/templates/tanstack-start/src/routes/docs/api/search.ts +12 -0
  150. package/modules/docs/templates/tanstack-start/src/routes/docs.index.tsx +22 -0
  151. package/modules/docs/templates/tanstack-start/src/routes/docs.tsx +22 -0
  152. package/modules/docs/templates/tanstack-start/src/styles-docs.css +3 -0
  153. package/modules/guide/templates/astro-emdash/content/guide/capability-map.md +17 -0
  154. package/modules/guide/templates/astro-emdash/src/components/guide-widget.tsx +41 -0
  155. package/modules/guide/templates/astro-emdash/src/guide/actions.ts +8 -0
  156. package/modules/guide/templates/astro-emdash/src/guide/config.ts +21 -0
  157. package/modules/guide/templates/astro-emdash/src/guide/corpus.gen.ts +4 -0
  158. package/modules/guide/templates/astro-emdash/src/guide/corpus.manifest.json +72 -0
  159. package/modules/guide/templates/astro-emdash/src/guide/corpus.ts +4 -0
  160. package/modules/guide/templates/astro-emdash/src/guide/resources.json +4 -0
  161. package/modules/guide/templates/react-router/app/components/guide-widget.tsx +29 -0
  162. package/modules/guide/templates/react-router/app/guide/actions.ts +3 -0
  163. package/modules/guide/templates/react-router/app/guide/config.ts +21 -0
  164. package/modules/guide/templates/react-router/app/guide/corpus.gen.ts +4 -0
  165. package/modules/guide/templates/react-router/app/guide/corpus.manifest.json +22 -0
  166. package/modules/guide/templates/react-router/app/guide/corpus.ts +4 -0
  167. package/modules/guide/templates/react-router/app/guide/resources.json +4 -0
  168. package/modules/guide/templates/react-router/content/guide/capability-map.md +13 -0
  169. package/modules/guide/templates/tanstack-start/content/guide/capability-map.md +17 -0
  170. package/modules/guide/templates/tanstack-start/src/components/guide-widget.tsx +41 -0
  171. package/modules/guide/templates/tanstack-start/src/guide/actions.ts +17 -0
  172. package/modules/guide/templates/tanstack-start/src/guide/config.ts +21 -0
  173. package/modules/guide/templates/tanstack-start/src/guide/corpus.gen.ts +4 -0
  174. package/modules/guide/templates/tanstack-start/src/guide/corpus.manifest.json +22 -0
  175. package/modules/guide/templates/tanstack-start/src/guide/corpus.ts +4 -0
  176. package/modules/guide/templates/tanstack-start/src/guide/resources.json +4 -0
  177. package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
  178. package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
  179. package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
  180. package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
  181. package/modules/openai-subscription/templates/astro-emdash/src/openai-subscription.ts +11 -0
  182. package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
  183. package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
  184. package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
  185. package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
  186. package/modules/openai-subscription/templates/react-router/app/openai-subscription.ts +11 -0
  187. package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
  188. package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
  189. package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
  190. package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
  191. package/modules/openai-subscription/templates/tanstack-start/src/openai-subscription.ts +11 -0
  192. package/package.json +34 -8
  193. package/skills/README.md +122 -0
  194. package/skills/raybase-actions/SKILL.md +223 -0
  195. package/skills/raybase-actions/references/action-patterns.md +190 -0
  196. package/skills/raybase-actions/references/adapting-actions.md +93 -0
  197. package/skills/raybase-actions/references/testing-actions.md +48 -0
  198. package/skills/raybase-agent-debugging/SKILL.md +230 -0
  199. package/skills/raybase-ai/SKILL.md +1310 -0
  200. package/skills/raybase-api/SKILL.md +45 -0
  201. package/skills/raybase-astro-emdash/SKILL.md +143 -0
  202. package/skills/raybase-astro-emdash-content-model/SKILL.md +217 -0
  203. package/skills/raybase-astro-emdash-content-model/references/LICENSE-emdash +9 -0
  204. package/skills/raybase-astro-emdash-content-model/references/emdash-collections.md +265 -0
  205. package/skills/raybase-astro-emdash-design/LICENSE-impeccable +60 -0
  206. package/skills/raybase-astro-emdash-design/SKILL.md +170 -0
  207. package/skills/raybase-astro-emdash-design/reference/color.md +91 -0
  208. package/skills/raybase-astro-emdash-design/reference/copy.md +73 -0
  209. package/skills/raybase-astro-emdash-design/reference/direction.md +115 -0
  210. package/skills/raybase-astro-emdash-design/reference/imagery.md +84 -0
  211. package/skills/raybase-astro-emdash-design/reference/layout.md +69 -0
  212. package/skills/raybase-astro-emdash-design/reference/motion.md +75 -0
  213. package/skills/raybase-astro-emdash-design/reference/polish.md +75 -0
  214. package/skills/raybase-astro-emdash-design/reference/typography.md +72 -0
  215. package/skills/raybase-astro-emdash-galley/SKILL.md +265 -0
  216. package/skills/raybase-astro-emdash-migration/SKILL.md +218 -0
  217. package/skills/raybase-astro-emdash-migration/references/inventory-and-conversion.md +242 -0
  218. package/skills/raybase-astro-emdash-security-review/SKILL.md +68 -0
  219. package/skills/raybase-astro-emdash-theme-selection/SKILL.md +216 -0
  220. package/skills/raybase-auth/SKILL.md +358 -0
  221. package/skills/raybase-background-jobs/SKILL.md +774 -0
  222. package/skills/raybase-building/SKILL.md +409 -0
  223. package/skills/raybase-building/references/interview-and-spec.md +87 -0
  224. package/skills/raybase-building/references/planning-docs.md +26 -0
  225. package/skills/raybase-building/references/schema-and-config.md +70 -0
  226. package/skills/raybase-changing-a-live-app/SKILL.md +119 -0
  227. package/skills/raybase-data-and-policies/SKILL.md +377 -0
  228. package/skills/raybase-deploy/SKILL.md +136 -0
  229. package/skills/raybase-docs-writing/SKILL.md +119 -0
  230. package/skills/raybase-guide/SKILL.md +235 -0
  231. package/skills/raybase-mcp/SKILL.md +309 -0
  232. package/skills/raybase-mcp/agents/openai.yaml +4 -0
  233. package/skills/raybase-notifications/SKILL.md +138 -0
  234. package/skills/raybase-pro-migration/SKILL.md +28 -0
  235. package/skills/raybase-react-router/SKILL.md +241 -0
  236. package/skills/raybase-react-router-design/LICENSE-impeccable +60 -0
  237. package/skills/raybase-react-router-design/SKILL.md +135 -0
  238. package/skills/raybase-react-router-design/reference/color.md +87 -0
  239. package/skills/raybase-react-router-design/reference/copy.md +83 -0
  240. package/skills/raybase-react-router-design/reference/delight.md +48 -0
  241. package/skills/raybase-react-router-design/reference/interaction.md +91 -0
  242. package/skills/raybase-react-router-design/reference/layout.md +82 -0
  243. package/skills/raybase-react-router-design/reference/motion.md +86 -0
  244. package/skills/raybase-react-router-design/reference/polish.md +79 -0
  245. package/skills/raybase-react-router-design/reference/typography.md +71 -0
  246. package/skills/raybase-react-router-security-review/LICENSE +22 -0
  247. package/skills/raybase-react-router-security-review/SKILL.md +190 -0
  248. package/skills/raybase-react-router-security-review/agents/openai.yaml +4 -0
  249. package/skills/raybase-react-router-security-review/references/api-security.md +519 -0
  250. package/skills/raybase-react-router-security-review/references/authentication.md +353 -0
  251. package/skills/raybase-react-router-security-review/references/authorization.md +372 -0
  252. package/skills/raybase-react-router-security-review/references/business-logic.md +443 -0
  253. package/skills/raybase-react-router-security-review/references/cryptography.md +329 -0
  254. package/skills/raybase-react-router-security-review/references/csrf.md +398 -0
  255. package/skills/raybase-react-router-security-review/references/data-protection.md +378 -0
  256. package/skills/raybase-react-router-security-review/references/deserialization.md +410 -0
  257. package/skills/raybase-react-router-security-review/references/error-handling.md +436 -0
  258. package/skills/raybase-react-router-security-review/references/file-security.md +457 -0
  259. package/skills/raybase-react-router-security-review/references/injection.md +259 -0
  260. package/skills/raybase-react-router-security-review/references/logging.md +433 -0
  261. package/skills/raybase-react-router-security-review/references/misconfiguration.md +435 -0
  262. package/skills/raybase-react-router-security-review/references/modern-threats.md +475 -0
  263. package/skills/raybase-react-router-security-review/references/raybase-react-router-security.md +235 -0
  264. package/skills/raybase-react-router-security-review/references/ssrf.md +413 -0
  265. package/skills/raybase-react-router-security-review/references/supply-chain.md +405 -0
  266. package/skills/raybase-react-router-security-review/references/xss.md +336 -0
  267. package/skills/raybase-realtime/SKILL.md +158 -0
  268. package/skills/raybase-realtime/agents/openai.yaml +4 -0
  269. package/skills/raybase-schema/SKILL.md +209 -0
  270. package/skills/raybase-search/SKILL.md +137 -0
  271. package/skills/raybase-search/agents/openai.yaml +4 -0
  272. package/skills/raybase-settings/SKILL.md +139 -0
  273. package/skills/raybase-settings/agents/openai.yaml +4 -0
  274. package/skills/raybase-tanstack-start/SKILL.md +166 -0
  275. package/skills/raybase-tanstack-start-design/LICENSE-impeccable +60 -0
  276. package/skills/raybase-tanstack-start-design/SKILL.md +140 -0
  277. package/skills/raybase-tanstack-start-design/reference/color.md +80 -0
  278. package/skills/raybase-tanstack-start-design/reference/copy.md +83 -0
  279. package/skills/raybase-tanstack-start-design/reference/delight.md +48 -0
  280. package/skills/raybase-tanstack-start-design/reference/interaction.md +91 -0
  281. package/skills/raybase-tanstack-start-design/reference/layout.md +82 -0
  282. package/skills/raybase-tanstack-start-design/reference/motion.md +86 -0
  283. package/skills/raybase-tanstack-start-design/reference/polish.md +79 -0
  284. package/skills/raybase-tanstack-start-design/reference/typography.md +71 -0
  285. package/skills/raybase-tanstack-start-security-review/LICENSE +22 -0
  286. package/skills/raybase-tanstack-start-security-review/SKILL.md +194 -0
  287. package/skills/raybase-tanstack-start-security-review/agents/openai.yaml +4 -0
  288. package/skills/raybase-tanstack-start-security-review/references/api-security.md +519 -0
  289. package/skills/raybase-tanstack-start-security-review/references/authentication.md +353 -0
  290. package/skills/raybase-tanstack-start-security-review/references/authorization.md +372 -0
  291. package/skills/raybase-tanstack-start-security-review/references/business-logic.md +443 -0
  292. package/skills/raybase-tanstack-start-security-review/references/cryptography.md +329 -0
  293. package/skills/raybase-tanstack-start-security-review/references/csrf.md +398 -0
  294. package/skills/raybase-tanstack-start-security-review/references/data-protection.md +378 -0
  295. package/skills/raybase-tanstack-start-security-review/references/deserialization.md +410 -0
  296. package/skills/raybase-tanstack-start-security-review/references/error-handling.md +436 -0
  297. package/skills/raybase-tanstack-start-security-review/references/file-security.md +457 -0
  298. package/skills/raybase-tanstack-start-security-review/references/injection.md +259 -0
  299. package/skills/raybase-tanstack-start-security-review/references/logging.md +433 -0
  300. package/skills/raybase-tanstack-start-security-review/references/misconfiguration.md +435 -0
  301. package/skills/raybase-tanstack-start-security-review/references/modern-threats.md +475 -0
  302. package/skills/raybase-tanstack-start-security-review/references/raybase-tanstack-security.md +208 -0
  303. package/skills/raybase-tanstack-start-security-review/references/ssrf.md +413 -0
  304. package/skills/raybase-tanstack-start-security-review/references/supply-chain.md +405 -0
  305. package/skills/raybase-tanstack-start-security-review/references/xss.md +336 -0
  306. package/skills-manifest.json +41 -0
  307. package/templates/astro-emdash/.dev.vars.example +7 -0
  308. package/templates/astro-emdash/AGENTS.md +122 -0
  309. package/templates/astro-emdash/DESIGN.md +90 -0
  310. package/templates/astro-emdash/components.json +21 -0
  311. package/templates/astro-emdash/content/docs/getting-started.mdx +20 -0
  312. package/templates/astro-emdash/content/docs/index.mdx +13 -0
  313. package/templates/astro-emdash/content/docs/mcp.mdx +11 -0
  314. package/templates/astro-emdash/content/docs/meta.json +4 -0
  315. package/templates/astro-emdash/content/docs/site-templates.mdx +62 -0
  316. package/templates/astro-emdash/dev/CODEBASE-MAP.md +46 -0
  317. package/templates/astro-emdash/dev/SPEC-OVERVIEW.md +15 -0
  318. package/templates/astro-emdash/dev/SPEC.md +84 -0
  319. package/templates/astro-emdash/dev/features/archive/.gitkeep +1 -0
  320. package/templates/astro-emdash/docs/theme-previews/base.svg +24 -0
  321. package/templates/astro-emdash/docs/theme-previews/steel.svg +24 -0
  322. package/templates/astro-emdash/docs/theme-previews/zen.svg +24 -0
  323. package/templates/astro-emdash/docs/themes.md +106 -0
  324. package/templates/astro-emdash/drizzle.config.ts +5 -0
  325. package/templates/astro-emdash/gitignore +11 -0
  326. package/templates/astro-emdash/migrations/app/meta/_journal.json +5 -0
  327. package/templates/astro-emdash/package.json +79 -0
  328. package/templates/astro-emdash/pnpm-workspace.yaml +71 -0
  329. package/templates/astro-emdash/public/_headers +4 -0
  330. package/templates/astro-emdash/site/astro.config.mjs +120 -0
  331. package/templates/astro-emdash/site/demo/README.md +72 -0
  332. package/templates/astro-emdash/site/demo/content/collection.json +43 -0
  333. package/templates/astro-emdash/site/demo/content/entries.json +120 -0
  334. package/templates/astro-emdash/site/demo/templates/demo-article-card/manifest.json +51 -0
  335. package/templates/astro-emdash/site/demo/templates/demo-article-card/sample-content.json +5 -0
  336. package/templates/astro-emdash/site/demo/templates/demo-article-card/template.liquid +48 -0
  337. package/templates/astro-emdash/site/demo/templates/demo-article-page/host.json +9 -0
  338. package/templates/astro-emdash/site/demo/templates/demo-article-page/manifest.json +38 -0
  339. package/templates/astro-emdash/site/demo/templates/demo-article-page/sample-content.json +34 -0
  340. package/templates/astro-emdash/site/demo/templates/demo-article-page/template.liquid +84 -0
  341. package/templates/astro-emdash/site/demo/templates/demo-articles-index/manifest.json +64 -0
  342. package/templates/astro-emdash/site/demo/templates/demo-articles-index/page.json +7 -0
  343. package/templates/astro-emdash/site/demo/templates/demo-articles-index/sample-content.json +24 -0
  344. package/templates/astro-emdash/site/demo/templates/demo-articles-index/template.liquid +100 -0
  345. package/templates/astro-emdash/site/demo/templates/demo-menu-nav/manifest.json +51 -0
  346. package/templates/astro-emdash/site/demo/templates/demo-menu-nav/sample-content.json +5 -0
  347. package/templates/astro-emdash/site/demo/templates/demo-menu-nav/template.liquid +70 -0
  348. package/templates/astro-emdash/site/gitignore +1 -0
  349. package/templates/astro-emdash/site/package.json +56 -0
  350. package/templates/astro-emdash/site/scripts/apply-site-templates.mjs +560 -0
  351. package/templates/astro-emdash/site/scripts/galley-demo.mjs +298 -0
  352. package/templates/astro-emdash/site/scripts/seed-galley-starter.mjs +360 -0
  353. package/templates/astro-emdash/site/scripts/site-origin.mjs +45 -0
  354. package/templates/astro-emdash/site/seed/seed.json +154 -0
  355. package/templates/astro-emdash/site/seed/templates/.gitkeep +1 -0
  356. package/templates/astro-emdash/site/src/components/RaybaseSignedInMenu.astro +163 -0
  357. package/templates/astro-emdash/site/src/components/blocks/RaybaseActionIsland.astro +41 -0
  358. package/templates/astro-emdash/site/src/content-door/raybase-routes.ts +738 -0
  359. package/templates/astro-emdash/site/src/content-door/resolve-page.ts +142 -0
  360. package/templates/astro-emdash/site/src/content-door/seed.ts +85 -0
  361. package/templates/astro-emdash/site/src/env.d.ts +12 -0
  362. package/templates/astro-emdash/site/src/layouts/SiteLayout.astro +68 -0
  363. package/templates/astro-emdash/site/src/lib/palettes.gen.ts +7 -0
  364. package/templates/astro-emdash/site/src/lib/site-motion.ts +169 -0
  365. package/templates/astro-emdash/site/src/lib/site-shell.ts +294 -0
  366. package/templates/astro-emdash/site/src/live.config.ts +8 -0
  367. package/templates/astro-emdash/site/src/middleware.ts +20 -0
  368. package/templates/astro-emdash/site/src/pages/[...slug].astro +113 -0
  369. package/templates/astro-emdash/site/src/pages/_raybase/handoff/consume.ts +6 -0
  370. package/templates/astro-emdash/site/src/pages/_raybase/islands/action.ts +8 -0
  371. package/templates/astro-emdash/site/src/pages/_raybase/sign-out/index.ts +6 -0
  372. package/templates/astro-emdash/site/src/styles/palette-fonts.gen.css +1 -0
  373. package/templates/astro-emdash/site/src/styles/palettes.gen.css +3 -0
  374. package/templates/astro-emdash/site/src/styles.css +607 -0
  375. package/templates/astro-emdash/site/tsconfig.json +12 -0
  376. package/templates/astro-emdash/site/wrangler.jsonc +34 -0
  377. package/templates/astro-emdash/source.config.ts +10 -0
  378. package/templates/astro-emdash/src/actions.ts +58 -0
  379. package/templates/astro-emdash/src/ai/agents.ts +20 -0
  380. package/templates/astro-emdash/src/ai/retrieval.ts +36 -0
  381. package/templates/astro-emdash/src/auth-door.ts +18 -0
  382. package/templates/astro-emdash/src/client.tsx +25 -0
  383. package/templates/astro-emdash/src/components/.gitkeep +1 -0
  384. package/templates/astro-emdash/src/components/account-menu.tsx +91 -0
  385. package/templates/astro-emdash/src/components/auth-shell.tsx +69 -0
  386. package/templates/astro-emdash/src/components/mode-toggle.tsx +32 -0
  387. package/templates/astro-emdash/src/components/search-command-palette.tsx +107 -0
  388. package/templates/astro-emdash/src/components/setup-token-page.tsx +196 -0
  389. package/templates/astro-emdash/src/components/ui/avatar.tsx +107 -0
  390. package/templates/astro-emdash/src/components/ui/badge.tsx +52 -0
  391. package/templates/astro-emdash/src/components/ui/button.tsx +69 -0
  392. package/templates/astro-emdash/src/components/ui/checkbox.tsx +29 -0
  393. package/templates/astro-emdash/src/components/ui/dialog.tsx +158 -0
  394. package/templates/astro-emdash/src/components/ui/dropdown-menu.tsx +303 -0
  395. package/templates/astro-emdash/src/components/ui/input.tsx +20 -0
  396. package/templates/astro-emdash/src/components/ui/label.tsx +20 -0
  397. package/templates/astro-emdash/src/components/ui/scroll-area.tsx +53 -0
  398. package/templates/astro-emdash/src/components/ui/select.tsx +215 -0
  399. package/templates/astro-emdash/src/components/ui/separator.tsx +23 -0
  400. package/templates/astro-emdash/src/components/ui/sheet.tsx +138 -0
  401. package/templates/astro-emdash/src/components/ui/sidebar.tsx +728 -0
  402. package/templates/astro-emdash/src/components/ui/skeleton.tsx +13 -0
  403. package/templates/astro-emdash/src/components/ui/textarea.tsx +18 -0
  404. package/templates/astro-emdash/src/components/ui/tooltip.tsx +66 -0
  405. package/templates/astro-emdash/src/db/migrations.gen.ts +6 -0
  406. package/templates/astro-emdash/src/db/schema.ts +6 -0
  407. package/templates/astro-emdash/src/db/seed.ts +16 -0
  408. package/templates/astro-emdash/src/db/storage.ts +32 -0
  409. package/templates/astro-emdash/src/docs/docs-assets.ts +1 -0
  410. package/templates/astro-emdash/src/docs/docs-client.tsx +22 -0
  411. package/templates/astro-emdash/src/docs/docs-data.ts +24 -0
  412. package/templates/astro-emdash/src/docs/docs-handler.tsx +105 -0
  413. package/templates/astro-emdash/src/docs/docs-layout.tsx +56 -0
  414. package/templates/astro-emdash/src/docs/docs-mdx.tsx +79 -0
  415. package/templates/astro-emdash/src/docs/docs-page-actions.tsx +146 -0
  416. package/templates/astro-emdash/src/docs/docs-page.tsx +70 -0
  417. package/templates/astro-emdash/src/docs/llm-text.ts +61 -0
  418. package/templates/astro-emdash/src/docs/source.ts +7 -0
  419. package/templates/astro-emdash/src/guide/corpus.gen.ts +4 -0
  420. package/templates/astro-emdash/src/guide/corpus.manifest.json +72 -0
  421. package/templates/astro-emdash/src/hooks/use-mobile.ts +19 -0
  422. package/templates/astro-emdash/src/jobs.example.ts +48 -0
  423. package/templates/astro-emdash/src/lib/account.ts +12 -0
  424. package/templates/astro-emdash/src/lib/auth-client.ts +181 -0
  425. package/templates/astro-emdash/src/lib/utils.ts +6 -0
  426. package/templates/astro-emdash/src/mcp-app.ts +57 -0
  427. package/templates/astro-emdash/src/notifications.example.ts +37 -0
  428. package/templates/astro-emdash/src/raybase.auth.ts +70 -0
  429. package/templates/astro-emdash/src/raybase.config.ts +49 -0
  430. package/templates/astro-emdash/src/raybase.server.ts +56 -0
  431. package/templates/astro-emdash/src/realtime.example.ts +18 -0
  432. package/templates/astro-emdash/src/router.tsx +19 -0
  433. package/templates/astro-emdash/src/routes/__root.tsx +56 -0
  434. package/templates/astro-emdash/src/routes/_app/admin.tsx +13 -0
  435. package/templates/astro-emdash/src/routes/_app/forgot-password.tsx +97 -0
  436. package/templates/astro-emdash/src/routes/_app/index.tsx +169 -0
  437. package/templates/astro-emdash/src/routes/_app/invite.$token.tsx +11 -0
  438. package/templates/astro-emdash/src/routes/_app/login.tsx +193 -0
  439. package/templates/astro-emdash/src/routes/_app/profile.tsx +98 -0
  440. package/templates/astro-emdash/src/routes/_app/reset-password.$token.tsx +15 -0
  441. package/templates/astro-emdash/src/routes/_app/reset-password.tsx +115 -0
  442. package/templates/astro-emdash/src/routes/_app/setup.$token.tsx +11 -0
  443. package/templates/astro-emdash/src/routes/_app/signup.tsx +141 -0
  444. package/templates/astro-emdash/src/routes/_app/verify-email.$token.tsx +15 -0
  445. package/templates/astro-emdash/src/routes/_app/verify-email.tsx +154 -0
  446. package/templates/astro-emdash/src/routes/_app.tsx +33 -0
  447. package/templates/astro-emdash/src/routes/admin/$.ts +20 -0
  448. package/templates/astro-emdash/src/routes/api/$.ts +19 -0
  449. package/templates/astro-emdash/src/routes/docs/$.tsx +22 -0
  450. package/templates/astro-emdash/src/routes/docs/api/markdown.ts +12 -0
  451. package/templates/astro-emdash/src/routes/docs/api/search.ts +12 -0
  452. package/templates/astro-emdash/src/routes/docs.index.tsx +22 -0
  453. package/templates/astro-emdash/src/routes/docs.tsx +22 -0
  454. package/templates/astro-emdash/src/search.ts +6 -0
  455. package/templates/astro-emdash/src/settings.ts +12 -0
  456. package/templates/astro-emdash/src/styles-docs.css +3 -0
  457. package/templates/astro-emdash/src/styles.css +101 -0
  458. package/templates/astro-emdash/src/themes/base.css +76 -0
  459. package/templates/astro-emdash/src/themes/carbon.css +76 -0
  460. package/templates/astro-emdash/src/themes/fonts.css +25 -0
  461. package/templates/astro-emdash/src/themes/sage.css +76 -0
  462. package/templates/astro-emdash/src/themes/sand.css +76 -0
  463. package/templates/astro-emdash/src/themes/slate.css +81 -0
  464. package/templates/astro-emdash/src/themes/ultra.css +76 -0
  465. package/templates/astro-emdash/src/themes/zen.css +76 -0
  466. package/templates/astro-emdash/src/worker-entry.ts +31 -0
  467. package/templates/astro-emdash/tests/raybase-patterns.test.ts +29 -0
  468. package/templates/astro-emdash/tsconfig.json +36 -0
  469. package/templates/astro-emdash/vite.config.ts +130 -0
  470. package/templates/astro-emdash/vitest.config.ts +8 -0
  471. package/templates/astro-emdash/wrangler.jsonc +112 -0
  472. package/templates/react-router/.dev.vars.example +5 -0
  473. package/templates/react-router/.editorconfig +15 -0
  474. package/templates/react-router/AGENTS.md +54 -0
  475. package/templates/react-router/README.md +52 -0
  476. package/templates/react-router/app/app.css +44 -0
  477. package/templates/react-router/app/components/mdx.tsx +79 -0
  478. package/templates/react-router/app/components/ui/button.tsx +45 -0
  479. package/templates/react-router/app/components/ui/card.tsx +87 -0
  480. package/templates/react-router/app/components/ui/separator.tsx +22 -0
  481. package/templates/react-router/app/db/migrations.gen.ts +6 -0
  482. package/templates/react-router/app/db/schema.ts +56 -0
  483. package/templates/react-router/app/db/seed.ts +14 -0
  484. package/templates/react-router/app/entry.server.tsx +41 -0
  485. package/templates/react-router/app/globals.d.ts +1 -0
  486. package/templates/react-router/app/lib/layout.shared.tsx +52 -0
  487. package/templates/react-router/app/lib/source.ts +7 -0
  488. package/templates/react-router/app/lib/utils.ts +6 -0
  489. package/templates/react-router/app/raybase.server.ts +65 -0
  490. package/templates/react-router/app/root.tsx +23 -0
  491. package/templates/react-router/app/routes/_index.tsx +53 -0
  492. package/templates/react-router/app/routes/docs.$.tsx +49 -0
  493. package/templates/react-router/app/routes/docs.api.search.ts +10 -0
  494. package/templates/react-router/app/routes/docs.tsx +13 -0
  495. package/templates/react-router/app/routes.ts +3 -0
  496. package/templates/react-router/components.json +22 -0
  497. package/templates/react-router/content/docs/getting-started.mdx +15 -0
  498. package/templates/react-router/content/docs/index.mdx +8 -0
  499. package/templates/react-router/content/docs/mcp.mdx +121 -0
  500. package/templates/react-router/content/docs/meta.json +4 -0
  501. package/templates/react-router/dev/CODEBASE-MAP.md +48 -0
  502. package/templates/react-router/dev/SPEC-OVERVIEW.md +35 -0
  503. package/templates/react-router/dev/SPEC.md +93 -0
  504. package/templates/react-router/dev/features/archive/.gitkeep +1 -0
  505. package/templates/react-router/drizzle.config.ts +5 -0
  506. package/templates/react-router/env.d.ts +53 -0
  507. package/templates/react-router/gitignore +23 -0
  508. package/templates/react-router/migrations/app/meta/_journal.json +1 -0
  509. package/templates/react-router/package.json +70 -0
  510. package/templates/react-router/public/_headers +4 -0
  511. package/templates/react-router/public/favicon.ico +0 -0
  512. package/templates/react-router/react-router.config.ts +9 -0
  513. package/templates/react-router/source.config.ts +5 -0
  514. package/templates/react-router/tests/raybase-patterns.test.ts +23 -0
  515. package/templates/react-router/tsconfig.json +27 -0
  516. package/templates/react-router/vite.config.ts +59 -0
  517. package/templates/react-router/vitest.config.ts +8 -0
  518. package/templates/react-router/workers/app.ts +40 -0
  519. package/templates/react-router/wrangler.jsonc +111 -0
  520. package/templates/tanstack-start/.dev.vars.example +5 -0
  521. package/templates/tanstack-start/AGENTS.md +95 -0
  522. package/templates/tanstack-start/DESIGN.md +65 -0
  523. package/templates/tanstack-start/components.json +21 -0
  524. package/templates/tanstack-start/content/docs/getting-started.mdx +65 -0
  525. package/templates/tanstack-start/content/docs/index.mdx +10 -0
  526. package/templates/tanstack-start/content/docs/mcp.mdx +122 -0
  527. package/templates/tanstack-start/content/docs/meta.json +4 -0
  528. package/templates/tanstack-start/dev/CODEBASE-MAP.md +84 -0
  529. package/templates/tanstack-start/dev/SPEC-OVERVIEW.md +46 -0
  530. package/templates/tanstack-start/dev/SPEC.md +213 -0
  531. package/templates/tanstack-start/dev/features/archive/.gitkeep +1 -0
  532. package/templates/tanstack-start/docs/theme-previews/base.svg +24 -0
  533. package/templates/tanstack-start/docs/theme-previews/steel.svg +24 -0
  534. package/templates/tanstack-start/docs/theme-previews/zen.svg +24 -0
  535. package/templates/tanstack-start/docs/themes.md +116 -0
  536. package/templates/tanstack-start/drizzle.config.ts +5 -0
  537. package/templates/tanstack-start/gitignore +11 -0
  538. package/templates/tanstack-start/migrations/app/0000_low_karen_page.sql +26 -0
  539. package/templates/tanstack-start/migrations/app/meta/0000_snapshot.json +196 -0
  540. package/templates/tanstack-start/migrations/app/meta/_journal.json +13 -0
  541. package/templates/tanstack-start/package.json +77 -0
  542. package/templates/tanstack-start/public/_headers +8 -0
  543. package/templates/tanstack-start/public/icons/app-icon-maskable.svg +1 -0
  544. package/templates/tanstack-start/public/icons/app-icon.svg +1 -0
  545. package/templates/tanstack-start/public/icons/apple-touch-icon.png +0 -0
  546. package/templates/tanstack-start/public/manifest.webmanifest +14 -0
  547. package/templates/tanstack-start/public/raybase-push-sw.js +32 -0
  548. package/templates/tanstack-start/source.config.ts +10 -0
  549. package/templates/tanstack-start/src/actions.ts +560 -0
  550. package/templates/tanstack-start/src/ai/agents.ts +78 -0
  551. package/templates/tanstack-start/src/ai/retrieval.ts +36 -0
  552. package/templates/tanstack-start/src/auth-door.ts +18 -0
  553. package/templates/tanstack-start/src/client.tsx +25 -0
  554. package/templates/tanstack-start/src/components/.gitkeep +1 -0
  555. package/templates/tanstack-start/src/components/account-menu.tsx +127 -0
  556. package/templates/tanstack-start/src/components/auth-shell.tsx +69 -0
  557. package/templates/tanstack-start/src/components/install-app.tsx +35 -0
  558. package/templates/tanstack-start/src/components/mode-toggle.tsx +32 -0
  559. package/templates/tanstack-start/src/components/search-command-palette.tsx +107 -0
  560. package/templates/tanstack-start/src/components/setup-token-page.tsx +197 -0
  561. package/templates/tanstack-start/src/components/ui/avatar.tsx +107 -0
  562. package/templates/tanstack-start/src/components/ui/badge.tsx +52 -0
  563. package/templates/tanstack-start/src/components/ui/button.tsx +69 -0
  564. package/templates/tanstack-start/src/components/ui/checkbox.tsx +29 -0
  565. package/templates/tanstack-start/src/components/ui/dialog.tsx +158 -0
  566. package/templates/tanstack-start/src/components/ui/dropdown-menu.tsx +303 -0
  567. package/templates/tanstack-start/src/components/ui/input.tsx +20 -0
  568. package/templates/tanstack-start/src/components/ui/label.tsx +20 -0
  569. package/templates/tanstack-start/src/components/ui/scroll-area.tsx +53 -0
  570. package/templates/tanstack-start/src/components/ui/select.tsx +215 -0
  571. package/templates/tanstack-start/src/components/ui/separator.tsx +23 -0
  572. package/templates/tanstack-start/src/components/ui/sheet.tsx +138 -0
  573. package/templates/tanstack-start/src/components/ui/sidebar.tsx +728 -0
  574. package/templates/tanstack-start/src/components/ui/skeleton.tsx +13 -0
  575. package/templates/tanstack-start/src/components/ui/textarea.tsx +18 -0
  576. package/templates/tanstack-start/src/components/ui/tooltip.tsx +66 -0
  577. package/templates/tanstack-start/src/db/migrations.gen.ts +6 -0
  578. package/templates/tanstack-start/src/db/schema.ts +90 -0
  579. package/templates/tanstack-start/src/db/seed.ts +106 -0
  580. package/templates/tanstack-start/src/db/storage.ts +32 -0
  581. package/templates/tanstack-start/src/docs/docs-assets.ts +1 -0
  582. package/templates/tanstack-start/src/docs/docs-client.tsx +22 -0
  583. package/templates/tanstack-start/src/docs/docs-data.ts +24 -0
  584. package/templates/tanstack-start/src/docs/docs-handler.tsx +105 -0
  585. package/templates/tanstack-start/src/docs/docs-layout.tsx +56 -0
  586. package/templates/tanstack-start/src/docs/docs-mdx.tsx +79 -0
  587. package/templates/tanstack-start/src/docs/docs-page-actions.tsx +146 -0
  588. package/templates/tanstack-start/src/docs/docs-page.tsx +70 -0
  589. package/templates/tanstack-start/src/docs/llm-text.ts +61 -0
  590. package/templates/tanstack-start/src/docs/source.ts +7 -0
  591. package/templates/tanstack-start/src/hooks/use-mobile.ts +19 -0
  592. package/templates/tanstack-start/src/hooks/use-pwa-install.ts +77 -0
  593. package/templates/tanstack-start/src/jobs.example.ts +56 -0
  594. package/templates/tanstack-start/src/lib/account.ts +13 -0
  595. package/templates/tanstack-start/src/lib/auth-client.ts +187 -0
  596. package/templates/tanstack-start/src/lib/push-client.ts +98 -0
  597. package/templates/tanstack-start/src/lib/utils.ts +6 -0
  598. package/templates/tanstack-start/src/mcp-app.ts +74 -0
  599. package/templates/tanstack-start/src/notifications.example.ts +37 -0
  600. package/templates/tanstack-start/src/raybase.auth.ts +86 -0
  601. package/templates/tanstack-start/src/raybase.config.ts +86 -0
  602. package/templates/tanstack-start/src/raybase.server.ts +155 -0
  603. package/templates/tanstack-start/src/realtime.example.ts +46 -0
  604. package/templates/tanstack-start/src/router.tsx +19 -0
  605. package/templates/tanstack-start/src/routes/__root.tsx +73 -0
  606. package/templates/tanstack-start/src/routes/_app/admin.tsx +13 -0
  607. package/templates/tanstack-start/src/routes/_app/forgot-password.tsx +97 -0
  608. package/templates/tanstack-start/src/routes/_app/index.tsx +1316 -0
  609. package/templates/tanstack-start/src/routes/_app/invite.$token.tsx +11 -0
  610. package/templates/tanstack-start/src/routes/_app/login.tsx +193 -0
  611. package/templates/tanstack-start/src/routes/_app/profile.tsx +98 -0
  612. package/templates/tanstack-start/src/routes/_app/reset-password.$token.tsx +16 -0
  613. package/templates/tanstack-start/src/routes/_app/reset-password.tsx +115 -0
  614. package/templates/tanstack-start/src/routes/_app/setup.$token.tsx +11 -0
  615. package/templates/tanstack-start/src/routes/_app/signup.tsx +141 -0
  616. package/templates/tanstack-start/src/routes/_app/verify-email.$token.tsx +15 -0
  617. package/templates/tanstack-start/src/routes/_app/verify-email.tsx +154 -0
  618. package/templates/tanstack-start/src/routes/_app.tsx +33 -0
  619. package/templates/tanstack-start/src/routes/admin/$.ts +20 -0
  620. package/templates/tanstack-start/src/routes/api/$.ts +19 -0
  621. package/templates/tanstack-start/src/routes/docs/$.tsx +22 -0
  622. package/templates/tanstack-start/src/routes/docs/api/markdown.ts +12 -0
  623. package/templates/tanstack-start/src/routes/docs/api/search.ts +12 -0
  624. package/templates/tanstack-start/src/routes/docs.index.tsx +22 -0
  625. package/templates/tanstack-start/src/routes/docs.tsx +22 -0
  626. package/templates/tanstack-start/src/search.ts +26 -0
  627. package/templates/tanstack-start/src/settings.ts +12 -0
  628. package/templates/tanstack-start/src/styles-docs.css +3 -0
  629. package/templates/tanstack-start/src/styles.css +73 -0
  630. package/templates/tanstack-start/src/themes/base.css +76 -0
  631. package/templates/tanstack-start/src/themes/carbon.css +76 -0
  632. package/templates/tanstack-start/src/themes/fonts.css +18 -0
  633. package/templates/tanstack-start/src/themes/sage.css +76 -0
  634. package/templates/tanstack-start/src/themes/sand.css +76 -0
  635. package/templates/tanstack-start/src/themes/slate.css +76 -0
  636. package/templates/tanstack-start/src/themes/ultra.css +76 -0
  637. package/templates/tanstack-start/src/themes/zen.css +76 -0
  638. package/templates/tanstack-start/src/worker-entry.ts +30 -0
  639. package/templates/tanstack-start/tests/raybase-patterns.test.ts +247 -0
  640. package/templates/tanstack-start/tsconfig.json +33 -0
  641. package/templates/tanstack-start/vite.config.ts +132 -0
  642. package/templates/tanstack-start/vitest.config.ts +8 -0
  643. package/templates/tanstack-start/wrangler.jsonc +112 -0
  644. package/README.md +0 -3
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: raybase-changing-a-live-app
3
+ description: Safely change a previously deployed Raybase app.
4
+ ---
5
+
6
+ # Raybase Changing a Live App Skill
7
+
8
+ Day-8 work is riskier than greenfield work because real users, data, docs,
9
+ operator expectations, and deploy history already exist. Update intent before
10
+ implementation when behavior changes, and avoid destructive migrations or
11
+ deploys until the human has seen the risk. When a requested change leaves the
12
+ why unclear, clarify what problem it solves and what success looks like before
13
+ turning it into spec or code.
14
+
15
+ Day-8 sequence:
16
+
17
+ 1. Re-read `dev/SPEC.md`.
18
+ 2. Also read `dev/SPEC-OVERVIEW.md` and `dev/CODEBASE-MAP.md` when present
19
+ before substantial design, architecture, schema, route, integration,
20
+ workflow, AI/MCP, or data-model work.
21
+ 3. Update `dev/SPEC.md` first with the requested change when approved product
22
+ behavior, business goals, success criteria, access mode, roles, data,
23
+ permissions, workflows, integrations, AI/MCP, docs expectations, or
24
+ non-goals change.
25
+ 4. Update `dev/SPEC-OVERVIEW.md` when the product story, business outcome,
26
+ target user, workflow feel, important tradeoffs, or explicit exclusions
27
+ change.
28
+ 5. Update `dev/CODEBASE-MAP.md` when substantial route boundaries, schema/data
29
+ ownership, integrations, runtime handlers, app modules, generated files, or
30
+ architectural workflows change.
31
+ 6. Skip planning-doc churn for tiny bug fixes, pure styling polish, copy
32
+ tweaks, refactors that do not change boundaries, dependency bumps with no
33
+ app behavior change, or generated-file noise.
34
+ 7. Ask the human to confirm the updated spec.
35
+ - Confirmation matters when behavior, access, data shape, or destructive
36
+ migration risk changed. For tiny fixes, say why no spec confirmation was
37
+ needed.
38
+ 8. Change schema, policies, seed, and screens.
39
+ - Read the installed template skill first. It owns screen paths, route
40
+ conventions, local dev workflow, and template-specific framework seams.
41
+ - TanStack Start apps use `.agents/skills/raybase-tanstack-start/SKILL.md`.
42
+ - React Router apps use `.agents/skills/raybase-react-router/SKILL.md`.
43
+ - Apps created from an outside starter: also read the skills the starter
44
+ installed.
45
+ - astro-emdash apps use `.agents/skills/raybase-astro-emdash/SKILL.md`;
46
+ public page sections change through Galley templates
47
+ (`.agents/skills/raybase-astro-emdash-galley/SKILL.md`), not new Astro
48
+ components.
49
+ - Use the template's established UI and styling system.
50
+ - Raybase-owned auth/admin/server API routes should keep delegating to `@raybase/core`.
51
+ - Edit schema only in the template's app-owned schema source; there is no
52
+ admin UI schema editor.
53
+ - Keep data that another system owns in that system unless the spec
54
+ explicitly calls for app-owned projections.
55
+ - Keep app policies in business-role terms. Do not use generic `admin` or `owner` app roles.
56
+ - Use Raybase Kits for technical capabilities, not domain-specific business
57
+ workflows. Good Kit searches are things like `slack`, `email`,
58
+ `data grid`, `charts`, `files`, `ai chat`, or provider integrations. Do
59
+ not search Kits expecting employee leave, approval queues, procurement,
60
+ recruiting, or other business-domain workflows; implement those in app
61
+ code unless a Store app fits a larger rebuild. For a plausible
62
+ technical capability, check `raybase kits search <capability>` and
63
+ `raybase kits info <kit-id>` before hand-rolling source. Installed kits
64
+ are app-owned source; review and adapt them like any other app code.
65
+ 9. Keep Docs current when Docs are enabled.
66
+ - If `.agents/skills/raybase-docs-writing/SKILL.md` is installed, read it
67
+ and update `content/docs` for the changed behavior before demoing or
68
+ deploying.
69
+ - Document only real behavior that now exists. Do not create separate docs
70
+ surfaces when Docs were disabled by request.
71
+ 10. Run:
72
+
73
+ ```bash
74
+ raybase migrate
75
+ raybase kits doctor
76
+ raybase doctor
77
+ raybase dev
78
+ ```
79
+
80
+ 11. Run the template security review before demoing or deploying.
81
+ - For TanStack Start apps, read `.agents/skills/raybase-tanstack-start-security-review/SKILL.md` and follow it.
82
+ - For React Router apps, read `.agents/skills/raybase-react-router-security-review/SKILL.md` and follow it.
83
+ - For apps created from an outside starter, also follow the security review skill the starter installed, if any.
84
+ - For astro-emdash apps, read `.agents/skills/raybase-astro-emdash-security-review/SKILL.md` and follow it.
85
+ - Fix high-confidence findings, then rerun `raybase doctor` and the focused review.
86
+ 12. Demo locally, including `/docs` when Docs are enabled.
87
+ 13. If a schema change could drop data, ask the human before using `--allow-destructive`.
88
+ 14. Report in handoff what planning docs changed, or state that no planning-doc
89
+ update was needed. When a feature proposal is implemented, archive
90
+ `dev/features/<feature-slug>/` under `dev/features/archive/` after folding
91
+ durable facts into the root living docs.
92
+ 15. End the local-change handoff by offering to set the verified change live
93
+ next. Deploy only after explicit confirmation:
94
+ Production deploy changes the owner-facing app, not just local code. Wait
95
+ for explicit confirmation after local demo and verification.
96
+
97
+ ```bash
98
+ raybase deploy
99
+ ```
100
+
101
+ Notes:
102
+ - Schema changes are Drizzle migrations generated by `raybase migrate` into `migrations/app/` and compiled into `src/db/migrations.gen.ts` for TanStack Start and astro-emdash apps or `app/db/migrations.gen.ts` for React Router apps. Do not edit `migrations.gen.ts` by hand; doctor fails when it is stale.
103
+ - The Raybase Durable Object applies the new bundle lazily on first database access after deploy.
104
+ - For a production backup, use `raybase backup --url <app-url> --cookie <admin-cookie>`; it downloads an envelope-encrypted whole-database `.rbb` archive from the deployed app.
105
+ - Point-in-time restore rewinds app rows and Raybase users/sessions together. This is intentional whole-database consistency.
106
+ - Multi-tenancy, one app installed by many customer organizations, and SSO across apps are provided by Raybase Pro. Core is single-tenant by design; converting it yourself means re-architecting the control plane and is not a supported path.
107
+ - Operator MCP is the operator-scoped production evidence and narrow typed
108
+ admin-action endpoint at `/mcp/operator`; it should usually stay enabled
109
+ alongside app MCP with `mcp: { enabled: true }`. Disable all MCP with
110
+ `mcp: { enabled: false }`; keep app MCP but disable only Operator MCP with
111
+ `mcp: { enabled: true, operator: { enabled: false } }`.
112
+ - Never bypass policies with raw database access or `unsafeDb`; app server code must go through Raybase database helpers.
113
+ - Raybase package updates do not silently update installed kit source. Use
114
+ `raybase kits update --dry-run` to review source updates and conflicts.
115
+ - Package updates also do not refresh the installed `.agents/skills` set.
116
+ When `raybase doctor` reports a `skills-freshness` warning, run
117
+ `raybase skills sync` (preview with `--dry-run`) to refresh the installed
118
+ skills in place for the app's framework and enabled modules before leaning on
119
+ skill guidance; it overwrites local edits to Raybase-installed skills.
@@ -0,0 +1,377 @@
1
+ ---
2
+ name: raybase-data-and-policies
3
+ description: Model Raybase schema and permissions safely.
4
+ ---
5
+
6
+ # Raybase Data and Policies Skill
7
+
8
+ Tables live in the template's app-owned schema file and use `raybaseTable`.
9
+ TanStack Start and astro-emdash apps use `src/db/schema.ts` (the astro-emdash
10
+ spine follows the TanStack Start layout); React Router apps use
11
+ `app/db/schema.ts`. Raybase turns those declarations into Drizzle SQLite tables
12
+ for migrations while keeping policy metadata for runtime enforcement.
13
+
14
+ File buckets live in the template's storage declaration file
15
+ (`src/db/storage.ts` in TanStack Start and astro-emdash apps) and use
16
+ `raybaseBucket` plus `raybaseStorage`. File policy actions are the same four
17
+ actions as tables: `read`, `create`, `update`, and `delete`.
18
+
19
+ Schema declarations describe the data shape, and policies describe who can
20
+ reach that shape through Raybase-owned surfaces. The installed
21
+ `raybase-schema` skill owns the schema-change workflow boundary; this skill is
22
+ the rationale companion for modeling data and permissions. When in doubt,
23
+ start from an explicit decision for each operation rather than a permissive
24
+ default.
25
+
26
+ Recommended columns:
27
+
28
+ ```ts
29
+ id: id(),
30
+ createdBy: createdBy(),
31
+ createdAt: createdAt(),
32
+ updatedAt: updatedAt()
33
+ ```
34
+
35
+ Define business roles once in the template app config and reuse that tuple in
36
+ policies. `user` is built in; `appRoles` should contain only additional
37
+ business roles from the spec.
38
+
39
+ ```ts
40
+ import { defineRoles, type RaybaseConfig } from "@raybase/core";
41
+
42
+ export const appRoles = defineRoles(["manager", "operations"] as const);
43
+
44
+ export const appConfig = {
45
+ appName: "Example",
46
+ roles: appRoles,
47
+ auth: { signupMode: "invite-only", publicRoutes: [] }
48
+ } satisfies RaybaseConfig;
49
+ ```
50
+
51
+ Policy vocabulary:
52
+
53
+ ```ts
54
+ role(appRoles, "user")
55
+ role(appRoles, "manager")
56
+ role(appRoles, "operations")
57
+ owns("createdBy")
58
+ owns("employeeId")
59
+ anyOf(role(appRoles, "manager"), owns("createdBy"))
60
+ allOf(role(appRoles, "user"), owns("createdBy"))
61
+ fromService("briefings")
62
+ ```
63
+
64
+ Rules:
65
+ - A table with no policies is deny-all and `raybase doctor` fails it.
66
+ - Every app table must declare `read`, `create`, `update`, and `delete`.
67
+ - Use Raybase column helpers instead of importing Drizzle directly in generated app schemas.
68
+ - Store third-party credentials in `secret()` columns, never `text()`. Reads
69
+ redact them everywhere; only an audited `revealSecret()` in an action or job
70
+ returns plaintext.
71
+ - The keys passed to `raybaseSchema({ ... })` are the public table identifiers
72
+ used by `ctx.db`, `/api/data`, generated MCP, and admin surfaces. Use the
73
+ same string as the table name, for example
74
+ `raybaseSchema({ leave_requests: leaveRequests })` for
75
+ `raybaseTable("leave_requests", ...)`.
76
+ - Use `userRef()` for app data that points at a signed-in Raybase user. It
77
+ stores the Raybase user id for relationships such as requester, employee,
78
+ manager, approver, owner, or assignee.
79
+ - If the app needs a picker/search for invited login identities, expose a
80
+ deliberate read-only action that calls `listAppUsers(raybaseAuthExecutor(ctx.env), { appRoles: ... })`
81
+ and returns only the fields the UI should show. Any user allowed to call the
82
+ action can enumerate that role-scoped directory, so set the narrowest policy
83
+ that matches the workflow.
84
+ - Verify selected `userRef()` values at mutation time with
85
+ `getAppUserById()` or `getAppUserByEmail()` and the required `appRoles`
86
+ filter. Do not trust an old picker result after invites, disables, or role
87
+ changes.
88
+ - Do not read Core auth user tables, Better Auth tables, sessions, accounts,
89
+ invites, or `operatorRole` from generated app code. If assignable people are
90
+ not Raybase login identities, model them as app-owned domain rows instead.
91
+ - `owns("<column>")` works with any user reference column, not only
92
+ `createdBy`. Use it for relationships like `employeeId`, `managerId`,
93
+ `assigneeId`, or `requesterId`.
94
+ - Do not create custom user/session/password tables.
95
+ - Use `role(appRoles, "user")` for data any signed-in colleague may see.
96
+ - Use named business roles such as `role(appRoles, "manager")`,
97
+ `role(appRoles, "approver")`, or `role(appRoles, "operations")` for
98
+ destructive actions and sensitive tables. When `appRoles` comes from
99
+ `defineRoles([...] as const)`, misspelled role names fail at compile time.
100
+ - Do not use generic `role("admin")` or `role("owner")` in app policies. Admin access to `/admin` is separate and cannot be expressed in app policies.
101
+ - Align policies with product UI. Every non-admin create, update, delete, or
102
+ state-transition permission should have a visible main-app workflow, and
103
+ every implemented workflow should be allowed by the matching policy.
104
+ - Do not grant broad update/delete permissions to a business role just because
105
+ an operator could edit the same row in `/admin`.
106
+ Broad app policies also affect `/api/data`, generated MCP tools, and any UI
107
+ using the data client; for state-machine fields this can expose transitions
108
+ that were supposed to live behind one validated server function.
109
+ - Use `owns("createdBy")` only when the table has a `createdBy()` column. Use
110
+ the matching user reference column for relationship-owned records.
111
+ - Use `owns("createdBy")` for user-owned file buckets. Raybase file metadata
112
+ has `createdBy` automatically.
113
+ - Use named business roles in file policies, for example
114
+ `anyOf(role(appRoles, "manager"), owns("createdBy"))` for updates or deletes.
115
+ - Do not store raw R2 keys in app rows. Store Raybase file IDs or model a
116
+ domain-specific relationship in app data.
117
+ - Do not expose direct R2 URLs or presigned URLs. Use `/api/files` or
118
+ `createRaybaseStorage()` so policies and safe download headers apply.
119
+ - Schema changes happen in source code and migrations. Do not use raw SQL,
120
+ runtime DDL, app routes, MCP tools, admin shortcuts, or model-generated SQL to
121
+ mutate app schema.
122
+ - Before serious schema work, run `raybase check-updates` and apply printed
123
+ Raybase updates when relevant. If the release index cannot be fetched, treat
124
+ the check as inconclusive rather than proof that everything is current; note
125
+ the warning in handoff and continue only when no version-sensitive fix is
126
+ needed.
127
+ - Keep `dev/SPEC.md` and app config aligned: `Signup mode: invite-only` maps to
128
+ `auth.signupMode: "invite-only"`, `Signup mode: public self-signup` maps to
129
+ `auth.signupMode: "public"`, and `Signup mode: provider-only self-signup`
130
+ maps to `auth.signupMode: "provider-only"`.
131
+ - Keep the spec's `Cloudflare email capability`, `Auth email features`,
132
+ `Invite delivery`, and `Password recovery` lines aligned with
133
+ `appConfig.auth.email`; run `raybase doctor` after auth email changes.
134
+ - Destructive migrations require human approval, rollback or backup awareness,
135
+ and verification of what data will be dropped before using
136
+ `--allow-destructive`.
137
+ - After schema or storage changes, run `raybase migrate` and `raybase doctor`.
138
+ - Prefer soft-delete status fields when humans may need recovery.
139
+
140
+ Common patterns:
141
+
142
+ user-owned records:
143
+
144
+ ```ts
145
+ policies: {
146
+ read: anyOf(role(appRoles, "manager"), owns("createdBy")),
147
+ create: role(appRoles, "user"),
148
+ update: anyOf(role(appRoles, "manager"), owns("createdBy")),
149
+ delete: role(appRoles, "manager"),
150
+ }
151
+ ```
152
+
153
+ Company-wide reference data:
154
+
155
+ ```ts
156
+ policies: {
157
+ read: role(appRoles, "user"),
158
+ create: role(appRoles, "operations"),
159
+ update: role(appRoles, "operations"),
160
+ delete: role(appRoles, "operations"),
161
+ }
162
+ ```
163
+
164
+ Relationship-scoped routing data:
165
+
166
+ ```ts
167
+ policies: {
168
+ read: anyOf(owns("employeeId"), owns("managerId"), role(appRoles, "people-ops")),
169
+ create: role(appRoles, "people-ops"),
170
+ update: role(appRoles, "people-ops"),
171
+ delete: role(appRoles, "people-ops"),
172
+ }
173
+ ```
174
+
175
+ Workflow table with module-only writes:
176
+
177
+ ```ts
178
+ const workflowActions = new Set([
179
+ "requests.submit",
180
+ "requests.approve",
181
+ "requests.cancel",
182
+ "seed.requests"
183
+ ]);
184
+
185
+ function workflowOnlyWrite() {
186
+ return rowInvariant({
187
+ name: "requests.workflow_only_write",
188
+ on: ["create", "update"],
189
+ message: "Request changes must use the request workflow.",
190
+ check: ({ source, user }) =>
191
+ Boolean(user.operatorRole) || workflowActions.has(String(source?.actionName ?? ""))
192
+ });
193
+ }
194
+
195
+ export const requests = raybaseTable("requests", columns, {
196
+ invariants: [workflowOnlyWrite()],
197
+ policies: {
198
+ read: anyOf(owns("employeeId"), owns("managerId"), role(appRoles, "people-ops")),
199
+ create: denyAll,
200
+ update: denyAll,
201
+ delete: denyAll,
202
+ }
203
+ });
204
+ ```
205
+
206
+ Minimum policy shape:
207
+
208
+ ```ts
209
+ policies: {
210
+ read: anyOf(owns("employeeId"), owns("managerId"), role(appRoles, "people-ops")),
211
+ create: denyAll,
212
+ update: denyAll,
213
+ delete: denyAll,
214
+ }
215
+ ```
216
+
217
+ Use this pattern for approvals, reviews, cancellations, inventory reservations,
218
+ and other state machines where fields such as `status`, `managerId`,
219
+ `approverId`, totals, or decision comments must be server-controlled. Implement
220
+ the mutation once in a domain route/action/module, validate ownership, role,
221
+ input, and allowed state transitions there, and only then use an audited
222
+ service context or `adminOverride` for the final write.
223
+
224
+ For high-risk workflow tables, pair `denyAll` write policies with a
225
+ `rowInvariant()` that allows only known `source.actionName` values. This stops
226
+ future service/adminOverride writes unless the new workflow action is
227
+ deliberately added to the allowlist. Include the operator-role bypass only when
228
+ Raybase `/admin` repair writes should remain possible.
229
+
230
+ ## Table Denials Refuse; Row Policies Filter
231
+
232
+ Raybase distinguishes a principal-level table denial from a row-dependent read.
233
+ A caller that cannot satisfy a table's role, operator, or service-principal
234
+ policy receives `RaybaseDataReadDeniedError` with HTTP status `403` and stable
235
+ code `data_read_denied`; `db.list()` and `db.get()` refuse before querying the
236
+ table. `owns(...)` and mixed policies that still depend on a row continue to
237
+ filter normally, so an empty list or `null` remains a truthful visible-subset
238
+ result. Result length is therefore still not an ownership test.
239
+
240
+ Most application code should let the refusal propagate. Catch it only when a
241
+ surface deliberately translates the refusal while preserving its meaning:
242
+
243
+ ```ts
244
+ try {
245
+ return await db.list("partner_updates");
246
+ } catch (error) {
247
+ if (error instanceof RaybaseDataReadDeniedError) {
248
+ throw new Response("Forbidden", { status: error.status });
249
+ }
250
+ throw error;
251
+ }
252
+ ```
253
+
254
+ When the surface is legitimately privileged server code that must read across
255
+ user ownership, grant a named service principal on that table's `read` policy
256
+ and use `.forService(name)` as shown below. Keep the name and table grant narrow;
257
+ do not use `adminOverride` merely to make a denied read return data.
258
+
259
+ ## Named Service-Principal Reads
260
+
261
+ Use a named service principal when trusted server code needs a narrow
262
+ cross-user read. Grant that exact name on only the necessary table action:
263
+
264
+ ```ts
265
+ policies: {
266
+ read: anyOf(owns("userId"), fromService("briefings")),
267
+ create: role(appRoles, "user"),
268
+ update: owns("userId"),
269
+ delete: owns("userId")
270
+ }
271
+ ```
272
+
273
+ Server code opts in explicitly:
274
+
275
+ ```ts
276
+ const briefingDb = createRaybaseDb(env, schema, migrations)
277
+ .forService("briefings");
278
+ const rows = await briefingDb.list("partner_updates");
279
+ ```
280
+
281
+ `forService(name)` is a server-runtime constructor, not a browser client
282
+ feature. It does not bypass policies: only matching
283
+ `fromService("name")` terms pass, and data audit rows carry
284
+ `actorKind: "service"`.
285
+
286
+ Agent turn-state loaders must declare every allowed service name:
287
+
288
+ ```ts
289
+ turnState: {
290
+ servicePrincipals: ["briefings"],
291
+ async load({ dataAsService }) {
292
+ const db = dataAsService!("briefings");
293
+ return { updates: (await db.list("partner_updates")).rows };
294
+ }
295
+ }
296
+ ```
297
+
298
+ `dataAsService` is absent when no names are declared and rejects any
299
+ undeclared name. Prefer this narrow grant over `adminOverride` for assembly
300
+ reads that legitimately cross user ownership.
301
+
302
+ ## Revealing Secret Columns
303
+
304
+ `secret()` columns (see `raybase-schema`) are write-only on every generic
305
+ surface. Server code that needs the plaintext, to call the provider the token
306
+ belongs to, reveals it explicitly inside an action or job:
307
+
308
+ ```ts
309
+ handler: async (ctx, input) => {
310
+ const token = await ctx.db.revealSecret("cloudflare_accounts", input.accountId, "apiToken");
311
+ if (!token) throw new Error("Connect a Cloudflare account first.");
312
+ const response = await fetch("https://api.cloudflare.com/client/v4/zones", {
313
+ headers: { authorization: `Bearer ${token}` }
314
+ });
315
+ return { zoneCount: ((await response.json()) as { result: unknown[] }).result.length };
316
+ }
317
+ ```
318
+
319
+ - `revealSecret()` applies the table's read policy to the row exactly like
320
+ `get()`: a caller who cannot read the row gets `null`, as does an unset
321
+ secret. Before returning it records a `data.secret.reveal` audit event with
322
+ the column and key id, never the value.
323
+ - The read policy is therefore the reveal policy. Keep tables holding secrets
324
+ on `owns(...)`, a business role, or `fromService(...)`; `raybase doctor`
325
+ warns when every signed-in user satisfies it.
326
+ - Use the value for the outbound call and drop it. Never return it, write it
327
+ to another column, a job input, logs, settings, or a notification. An action
328
+ an Agent calls hands its output to the model.
329
+ - `revealSecret()` is typed on `ctx.db` for action, job, and app MCP-tool
330
+ handlers. Agent turn-state loaders, request contexts, and
331
+ `createRaybaseDb(...).forService(name)` clients do not offer it.
332
+
333
+ ## Policy-Aware Pagination
334
+
335
+ `db.list()` applies table read policies before `LIMIT`/`OFFSET` and returns
336
+ `total` as the full filtered count, not the current page length. `owns`,
337
+ `role`, `fromService`, `allowAll`, `denyAll`, `operator`, and
338
+ `anyOf`/`allOf`/`not` are compiled into the SQL predicate. Policy scope is
339
+ classified structurally before SQL; an unknown runtime policy primitive fails
340
+ loudly instead of being guessed from generated SQL or converted to an empty
341
+ result.
342
+
343
+ `allowAll` and `denyAll` are frozen policy constants, not functions. Write
344
+ `read: allowAll` and `delete: denyAll`, without parentheses.
345
+
346
+ Manager-only table:
347
+
348
+ ```ts
349
+ policies: {
350
+ read: role(appRoles, "manager"),
351
+ create: role(appRoles, "manager"),
352
+ update: role(appRoles, "manager"),
353
+ delete: role(appRoles, "manager"),
354
+ }
355
+ ```
356
+
357
+ User-owned file bucket:
358
+
359
+ ```ts
360
+ export const attachments = raybaseBucket("attachments", {
361
+ maxSizeBytes: 10 * 1024 * 1024,
362
+ accept: ["image/png", "image/jpeg", "application/pdf"],
363
+ policies: {
364
+ read: owns("createdBy"),
365
+ create: role(appRoles, "user"),
366
+ update: owns("createdBy"),
367
+ delete: owns("createdBy"),
368
+ },
369
+ });
370
+ ```
371
+
372
+ Routes that authenticate through something other than a Raybase session
373
+ (for example a starter for an app embedded in another platform's admin) may
374
+ reach app tables through an audited service context. A service context
375
+ bypasses policies, so those routes must scope every read and write to the
376
+ caller themselves. Policies are still mandatory on every table — they govern
377
+ `/admin`, `/api/data`, and any future membership-mapped access.
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: raybase-deploy
3
+ description: Deploy and operate Raybase apps with doctor, Cloudflare connection, owner setup, backups, and safe production changes.
4
+ ---
5
+
6
+ # Raybase Deploy
7
+
8
+ Before deployment or production maintenance, run:
9
+
10
+ ```bash
11
+ raybase check-updates
12
+ ```
13
+
14
+ If update commands are printed, run them before continuing.
15
+
16
+ Deploy only after local verification succeeds:
17
+
18
+ ```bash
19
+ raybase kits doctor
20
+ raybase doctor
21
+ raybase connect
22
+ raybase deploy
23
+ ```
24
+
25
+ `raybase doctor` and `raybase kits doctor` are non-optional. They encode
26
+ deterministic correctness checks for config, handlers, migrations, modules,
27
+ kits, secrets, public routes, stale generated files, and unsafe wiring. Skills
28
+ explain the sequence; doctor decides whether known machine-checkable contracts
29
+ are satisfied.
30
+
31
+ `raybase deploy` is more than `wrangler deploy`: it coordinates identity
32
+ collision checks, secrets, migrations, build output, health checks, and owner
33
+ setup. Raw deploy commands skip those guardrails.
34
+
35
+ Raybase apps usually keep MCP enabled in production. App MCP exposes declared
36
+ app tools at `/mcp`; Operator MCP exposes read-only production
37
+ visibility at `/mcp/operator` for authorized operators. Disable all MCP with
38
+ `mcp: { enabled: false }`, or disable only Operator MCP with
39
+ `mcp: { enabled: true, operator: { enabled: false } }`.
40
+
41
+ Rules:
42
+
43
+ - Do not deploy if `raybase doctor` reports errors.
44
+ - Do not deploy with unresolved `raybase kits doctor` warnings about missing
45
+ secrets, missing dependencies, or kit file drift unless the human accepts the
46
+ risk and the deploy notes call it out.
47
+ - Do not treat an app as production-ready with starter or stale docs when
48
+ `raybase.modules.docs.enabled` is true. Use
49
+ `.agents/skills/raybase-docs-writing/SKILL.md` and call out any intentional
50
+ Docs opt-out in the deploy notes.
51
+ - For substantial product or architecture changes, deployment handoff should
52
+ say whether `dev/SPEC.md`, `dev/SPEC-OVERVIEW.md`, or `dev/CODEBASE-MAP.md`
53
+ changed, or explicitly state that no planning-doc update was needed. Do not
54
+ churn those files for tiny fixes, styling polish, copy-only edits, or
55
+ generated-file noise.
56
+ - Relay Cloudflare login or account setup instructions exactly when
57
+ `raybase connect` prints them. These are valid human handoff points, not
58
+ failures to work around.
59
+ - On first deploy, deliver the owner setup URL prominently. It is single-use
60
+ and expires in 24 hours.
61
+ - Do not run raw `wrangler` for actions covered by `raybase`; it can skip app
62
+ identity checks, migrations, generated config, secrets, and health evidence.
63
+ - Never run `raybase destroy --confirm` unless the user has explicitly approved
64
+ the destructive warning.
65
+
66
+ Worker identity and name collisions:
67
+
68
+ - The first deploy claims a worker name. If the directory-derived name is taken
69
+ by another Raybase app, deploy automatically falls back to `<name>-2`,
70
+ `<name>-3`, and so on, then saves the result in `wrangler.jsonc`. Relay the
71
+ chosen name and URL; do not change it back.
72
+ - If deploy stops because a same-named worker exists with no Raybase app id, it
73
+ cannot tell whether that worker is this app's old deployment or someone
74
+ else's. Relay the printed options to the human and wait: `--claim-existing`,
75
+ `--name <other>`, or `raybase destroy` then redeploy.
76
+ - `raybase destroy` permanently deletes the worker and its entire database
77
+ (Durable Objects). Never run it with `--confirm` unless the human has read
78
+ its warning output and explicitly approved; there is no undo and no automatic
79
+ backup.
80
+
81
+ Expected first deploy result:
82
+
83
+ - A live `*.workers.dev` URL.
84
+ - `/docs` loads with current app-specific docs when this project has
85
+ `raybase.modules.docs.enabled`.
86
+ - App migration bundle compiled into the worker.
87
+ - The singleton Raybase Durable Object applies runtime and app schema lazily on
88
+ first database access.
89
+ - Health check passed, including a ping of the Raybase Durable Object.
90
+ - Owner setup URL printed.
91
+
92
+ For deployed production data, use:
93
+
94
+ ```bash
95
+ raybase backup --url <app-url> --cookie <operator-cookie>
96
+ ```
97
+
98
+ Use restore or destructive deployment paths only after the user confirms the
99
+ risk.
100
+
101
+ Notes:
102
+
103
+ - `raybase deploy` builds the app before `wrangler deploy`.
104
+ - Raybase stores auth state in Better Auth tables inside the Durable Object and
105
+ uses `BETTER_AUTH_SECRET`; do not create or set `RAYBASE_AUTH_SECRET`.
106
+ - External auth provider credentials belong in Worker secrets for deployment
107
+ and local `.dev.vars` for development. Core external auth remains
108
+ invite-only app login, not suite SSO; run `raybase doctor` after changing
109
+ `src/raybase.auth.ts` or `auth.externalProviders`.
110
+ - Point-in-time restore rewinds app rows and Raybase users/sessions together.
111
+ This is intentional whole-database consistency.
112
+ - Multi-tenancy, one app installed by many customer organizations, and SSO
113
+ across apps are provided by Raybase Pro. Core is single-tenant by design;
114
+ converting it yourself means re-architecting the control plane and is not a
115
+ supported path.
116
+ - Feed-only notifications do not require queues. External notification channels
117
+ require `raybase doctor` to pass queue, handler, and secret checks before
118
+ deploy; use `raybase jobs enable` for that queue wiring.
119
+ - Cloudflare Email Service auth email requires `raybase email enable`,
120
+ `appConfig.auth.email`, `Cloudflare email capability: transactional-email`
121
+ in `dev/SPEC.md`, Workers Paid for arbitrary recipients, and completed
122
+ Cloudflare DNS/domain onboarding. Read `.agents/skills/raybase-auth/SKILL.md`
123
+ before enabling password reset, invite email, welcome email, public signup
124
+ email verification, or magic links.
125
+
126
+ ## Building for another host, or for leaving
127
+
128
+ `raybase build` builds the app without touching Cloudflare: it declares the
129
+ secrets the app needs in the built Wrangler config (`secrets.required`) and
130
+ writes `raybase.requirements.json` beside it, the plain list of bindings,
131
+ triggers, vars and secrets. `raybase secrets list` explains each secret and
132
+ `raybase secrets new` prints fresh values as JSON for `wrangler deploy
133
+ --secrets-file`. `wrangler deploy` of the build then works on any account.
134
+ The app applies its own database changes on first use. See the hosting
135
+ guide (`docs/hosting.md` on the Raybase site) for the full contract.
136
+