@builtbyfriends/bwf 0.0.0-stage → 1.9.2

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 (448) hide show
  1. package/AGENTS_TEMPLATE.md +4 -0
  2. package/LICENSE +22 -0
  3. package/README.md +48 -2
  4. package/dist/account-cmd-Ddt8lGeL.mjs +45 -0
  5. package/dist/agents-BLiMq9E1.mjs +113 -0
  6. package/dist/application-analysis-C9Ck2Yeg.mjs +1498 -0
  7. package/dist/application-routing-DbR-W5lG.mjs +25 -0
  8. package/dist/atomic-write-DA6eD1Kp.mjs +17 -0
  9. package/dist/auth-BKsUmWbT.d.mts +77 -0
  10. package/dist/auth-DkvoW5hB.mjs +33 -0
  11. package/dist/auth-aKyIWkdS.mjs +1 -0
  12. package/dist/auth-client-6-Ft9i9T.d.mts +5 -0
  13. package/dist/auth-client-DwCdwKbw.mjs +5 -0
  14. package/dist/auth-client-react-CJdeErvM.mjs +5 -0
  15. package/dist/auth-client-react-DvQLe5Zb.d.mts +5 -0
  16. package/dist/auth-link-CCl-hJol.mjs +26 -0
  17. package/dist/auth-migrations-DDeifS3v.mjs +206 -0
  18. package/dist/auth-router-BG74WFUf.mjs +66 -0
  19. package/dist/auth-xnkmpZUl.mjs +311 -0
  20. package/dist/base64-ikl9yBy3.mjs +15 -0
  21. package/dist/better-auth-shared-Br6TNaYJ.mjs +473 -0
  22. package/dist/better-auth-shared-CsBNvPOU.d.mts +56 -0
  23. package/dist/build-cmd-BnZezraT.mjs +153 -0
  24. package/dist/build-output-dir-Clj_unKN.mjs +402 -0
  25. package/dist/cancel-deploy-DKAj5U1Z.mjs +57 -0
  26. package/dist/cf-access-Bhz9wX6p.mjs +131 -0
  27. package/dist/cf-access-CUP5L08W.mjs +67 -0
  28. package/dist/cf-build-output-DA6uJomQ.mjs +1 -0
  29. package/dist/cf-build-output-DNQTwMNU.mjs +438 -0
  30. package/dist/cf-command-values-2kOtxMo1.mjs +26 -0
  31. package/dist/cf-config-migrate-COOCi4Ge.mjs +330 -0
  32. package/dist/cf-worker-settings-CIh4t_yG.mjs +41 -0
  33. package/dist/cli/cli.d.mts +1 -0
  34. package/dist/cli/cli.mjs +88 -0
  35. package/dist/cli/cloudflare-operation-process.d.mts +1 -0
  36. package/dist/cli/cloudflare-operation-process.mjs +1284 -0
  37. package/dist/cli/env-schema-probe.d.mts +43 -0
  38. package/dist/cli/env-schema-probe.mjs +165 -0
  39. package/dist/cli-main-BfYf6fnB.mjs +1846 -0
  40. package/dist/client-D3D5RM5h.mjs +940 -0
  41. package/dist/client-VF2Nzc7Z.mjs +1 -0
  42. package/dist/cloudflare-auth-DzkU9H6r.mjs +152 -0
  43. package/dist/cloudflare-cmd-Bm6UhzAQ.mjs +59 -0
  44. package/dist/cloudflare-config-i8yanry0.mjs +186 -0
  45. package/dist/cloudflare-connect-B4ItSbJi.mjs +55 -0
  46. package/dist/cloudflare-operations-BcK849ue.mjs +1 -0
  47. package/dist/cloudflare-operations-DGF7xH7O.mjs +627 -0
  48. package/dist/cloudflare-process-tThIjEB2.mjs +309 -0
  49. package/dist/cloudflare-user-output-CqONaAbP.mjs +19 -0
  50. package/dist/collect-8i0wU63d.mjs +1 -0
  51. package/dist/collect-C6Blu9yw.mjs +48 -0
  52. package/dist/config-CN_RFRkS.mjs +86 -0
  53. package/dist/config-D5G-Tx6o.mjs +1 -0
  54. package/dist/config-DOaFIK3w.mjs +88 -0
  55. package/dist/config-entry.d.mts +202 -0
  56. package/dist/config-entry.mjs +6 -0
  57. package/dist/config-tNx0HlFv.mjs +516 -0
  58. package/dist/connect-CSNWKLzB.mjs +84 -0
  59. package/dist/create-project-B35ux-LA.mjs +126 -0
  60. package/dist/create-project-tJ1KwNss.mjs +1 -0
  61. package/dist/database-provider-DkZo4VwN.mjs +5 -0
  62. package/dist/database-provider.d.mts +25 -0
  63. package/dist/database-provider.mjs +1 -0
  64. package/dist/db-SOv4E9wr.mjs +1735 -0
  65. package/dist/delete-BSKI7V23.mjs +65 -0
  66. package/dist/deploy-BCSQoKC0.mjs +2 -0
  67. package/dist/deploy-CWJ3JJs_.mjs +6512 -0
  68. package/dist/deploy.d.mts +31 -0
  69. package/dist/deploy.mjs +118 -0
  70. package/dist/dev-inbox-I0nqTCdf.mjs +216 -0
  71. package/dist/discover-DJPmQcL5.mjs +36 -0
  72. package/dist/discover-EVuydEoM.mjs +1 -0
  73. package/dist/dist-B6eN80gc.mjs +1612 -0
  74. package/dist/dist-Cp4b1_T9.mjs +1 -0
  75. package/dist/dist-DMYe8CZJ.mjs +48 -0
  76. package/dist/dist-STQXl8ck.mjs +1878 -0
  77. package/dist/domain-BJaAbxuQ.mjs +149 -0
  78. package/dist/dotenv-4NdUCXbB.mjs +156 -0
  79. package/dist/drizzle-DqVFXtlc.mjs +306 -0
  80. package/dist/drizzle-Ds5P0n-S.mjs +1 -0
  81. package/dist/edge.d.mts +2 -0
  82. package/dist/edge.mjs +1 -0
  83. package/dist/email-C_ATvNIG.mjs +2865 -0
  84. package/dist/email-cloudflare-oXk2G1G3.mjs +854 -0
  85. package/dist/email-protocol-CZ0bAkI8.mjs +81 -0
  86. package/dist/email-rIfZgVAB.mjs +742 -0
  87. package/dist/env-BGTu3KWZ.mjs +73 -0
  88. package/dist/env-DUyTzroe.mjs +88 -0
  89. package/dist/env-Dl4Wggec.mjs +71 -0
  90. package/dist/env-helpers-BX0APszT.mjs +135 -0
  91. package/dist/env-helpers-U56xuFgL.d.mts +20 -0
  92. package/dist/env-mask-BsHxq3R8.mjs +46 -0
  93. package/dist/env-public-Cw_xPi1D.d.mts +119 -0
  94. package/dist/env-raw-Bo6TtrHU.mjs +41 -0
  95. package/dist/env-types-Bg-dTh8u.mjs +56 -0
  96. package/dist/env-validation-BlXzGgLZ.mjs +1 -0
  97. package/dist/env-validation-DeqFUSKg.mjs +488 -0
  98. package/dist/fetch-CBgyyhzm.d.mts +87 -0
  99. package/dist/fetch-error-DmlRM6e4.mjs +264 -0
  100. package/dist/fetch-stream-2GUN3YN1.mjs +102 -0
  101. package/dist/fetch-stream-bUXynOyZ.d.mts +32 -0
  102. package/dist/fetch-tpPiSK10.mjs +25 -0
  103. package/dist/gen-dc13IRXh.mjs +509 -0
  104. package/dist/gen-kQqhFyOP.mjs +1 -0
  105. package/dist/generate-BgtlYpKg.mjs +1 -0
  106. package/dist/generate-Da9mWKzU.mjs +80 -0
  107. package/dist/generated-wrangler-config-CoDaaFsA.mjs +17 -0
  108. package/dist/git-metadata-Cukp5kV5.mjs +82 -0
  109. package/dist/github-cmd-DT5Onu6E.mjs +690 -0
  110. package/dist/handler-B_ocHStk.d.mts +279 -0
  111. package/dist/handler-CNq7aSs1.mjs +161 -0
  112. package/dist/help-BK35YcRa.mjs +1946 -0
  113. package/dist/help-DaRezBj7.mjs +1 -0
  114. package/dist/inbound-CqubE-9T.d.mts +311 -0
  115. package/dist/inbound-lHugZPuK.mjs +509 -0
  116. package/dist/index.d.mts +64 -0
  117. package/dist/index.mjs +4163 -0
  118. package/dist/info-CLQoCenb.mjs +109 -0
  119. package/dist/init-CXanf5ck.mjs +2486 -0
  120. package/dist/limits-CMmYT2l8.d.mts +16 -0
  121. package/dist/limits-D27Lp6FP.mjs +46 -0
  122. package/dist/link-DinwJnon.mjs +52 -0
  123. package/dist/list-B1WAE9Wt.mjs +130 -0
  124. package/dist/live-KkEeda1Z.d.mts +105 -0
  125. package/dist/live-saC8barp.mjs +410 -0
  126. package/dist/load-user-env-g0ahkZcj.mjs +34 -0
  127. package/dist/local-d1-bUoAtFUe.mjs +103 -0
  128. package/dist/log-JDnPc0cF.mjs +23 -0
  129. package/dist/login-BUzyiyHV.mjs +1 -0
  130. package/dist/login-Dbv_T3Ru.mjs +87 -0
  131. package/dist/logs-BjMJooJQ.mjs +129 -0
  132. package/dist/migrate-DjW9_-sS.mjs +1 -0
  133. package/dist/migrate-DtcfKqPW.mjs +125 -0
  134. package/dist/migration-handler-22qiuWPq.mjs +469 -0
  135. package/dist/migration-handler-Bb2BJh6g.d.mts +38 -0
  136. package/dist/mime-BMUN_QKG.mjs +1004 -0
  137. package/dist/mysql-migration-sql-CNuBSqdx.mjs +239 -0
  138. package/dist/neon-CJzQSycr.mjs +52 -0
  139. package/dist/node-tfv-3v0V.mjs +64 -0
  140. package/dist/operator-ai-logging-Ay7M4KWw.mjs +121 -0
  141. package/dist/operator-args-BiGmSlZx.mjs +722 -0
  142. package/dist/operator-auth-DdYZYEkO.mjs +47 -0
  143. package/dist/operator-client-DBujdELO.mjs +82 -0
  144. package/dist/operator-cmd-BsHKYJYt.mjs +1 -0
  145. package/dist/operator-cmd-DTIkOAnP.mjs +443 -0
  146. package/dist/output-Bb34lF0w.mjs +173 -0
  147. package/dist/output-CVolXKC1.mjs +1 -0
  148. package/dist/package-BX_giUBX.mjs +1444 -0
  149. package/dist/package-json-DvS6IFRv.mjs +43 -0
  150. package/dist/pg-DoyPxa_X.mjs +15 -0
  151. package/dist/picocolors-D1NxSLw-.mjs +71 -0
  152. package/dist/plan-BHNt1QhK.mjs +1 -0
  153. package/dist/plan-DX4_-OM5.mjs +58 -0
  154. package/dist/platform-args-C-DyuCNX.mjs +1 -0
  155. package/dist/platform-args-CyeQWaZ7.mjs +538 -0
  156. package/dist/platform-auth-config-BfXqKSyZ.mjs +371 -0
  157. package/dist/platform-auth-protection-5FR6qoP_.mjs +231 -0
  158. package/dist/platform-auth-recovery-B5ZlqA8K.mjs +309 -0
  159. package/dist/platform-cmd-CcFDxtrl.mjs +1 -0
  160. package/dist/platform-cmd-ChXeBrRH.mjs +193 -0
  161. package/dist/platform-discovery-Bxg9aZXU.mjs +40 -0
  162. package/dist/platform-domain-CwatS3cz.mjs +256 -0
  163. package/dist/platform-lifecycle-0cXTmMsh.mjs +8928 -0
  164. package/dist/platform-lifecycle-BcoBAMux.mjs +1 -0
  165. package/dist/platform-management-6Wbdbob5.mjs +1607 -0
  166. package/dist/platform-management-hhnczOzr.mjs +1 -0
  167. package/dist/platform-plans-config-CkbUKFpm.mjs +447 -0
  168. package/dist/platform-recovery-DgIwlqB-.mjs +96 -0
  169. package/dist/platform-registry-x1m9HBxf.mjs +450 -0
  170. package/dist/platform-runtime-logs-kkoiYFpF.mjs +72 -0
  171. package/dist/platform-setup-DX8y_6Kh.mjs +306 -0
  172. package/dist/prepare-B9mB47T5.mjs +84 -0
  173. package/dist/prepare-DNIq07so.mjs +13 -0
  174. package/dist/prepare-LHkyJqxi.mjs +1 -0
  175. package/dist/project-CC7eN00D.mjs +141 -0
  176. package/dist/project-DcSd4BeI.mjs +1 -0
  177. package/dist/project-cmd-BydRwr-x.mjs +109 -0
  178. package/dist/project-paths-iXHKRTTQ.mjs +159 -0
  179. package/dist/project-slug-BUy0lmyR.mjs +1 -0
  180. package/dist/project-slug-CO6ci9XG.mjs +7 -0
  181. package/dist/project-team-CvdLhDF2.mjs +129 -0
  182. package/dist/project-token-CwZdUEGu.mjs +70 -0
  183. package/dist/project-tsconfig-P9X952KG.mjs +98 -0
  184. package/dist/project-zero-trust-CKDoPdN1.mjs +64 -0
  185. package/dist/providers-Cd3c7wi0.mjs +64 -0
  186. package/dist/providers-Df69hb_X.d.mts +5 -0
  187. package/dist/provision-BA59NCPO.mjs +1 -0
  188. package/dist/provision-C90fULHJ.mjs +1814 -0
  189. package/dist/queues-Bc3FsBQT.d.mts +5 -0
  190. package/dist/r2-conditions-DSLmkiR5.mjs +60 -0
  191. package/dist/requests-DNhfyF3l.mjs +52 -0
  192. package/dist/resolve-project-BCsAMDRA.mjs +47 -0
  193. package/dist/resolve-project-DhU9_lIo.mjs +1 -0
  194. package/dist/resource-name-DlJ9QXzg.mjs +10 -0
  195. package/dist/response-HmNjB30w.mjs +29 -0
  196. package/dist/rollback-wi6WK5T6.mjs +150 -0
  197. package/dist/rolldown-runtime-uD8oG6U2.mjs +24 -0
  198. package/dist/route-types-CRWhr93D.mjs +592 -0
  199. package/dist/route-url-BIDZT78M.mjs +58 -0
  200. package/dist/route-url-Bla3Upsy.d.mts +42 -0
  201. package/dist/routes-stub.d.mts +24 -0
  202. package/dist/routes-stub.mjs +1 -0
  203. package/dist/routing-assets-CSheDWWM.mjs +54 -0
  204. package/dist/rpc-DcByS_q0.d.mts +39 -0
  205. package/dist/rpc-DtxIN9Tv.mjs +19 -0
  206. package/dist/runner-CPerdjIl.mjs +163 -0
  207. package/dist/runner-CUNtS5x7.mjs +1 -0
  208. package/dist/runner-mysql-BjSoQ-mW.mjs +1 -0
  209. package/dist/runner-mysql-BmTI2EiF.mjs +145 -0
  210. package/dist/runner-pg-2pjltt0t.mjs +1 -0
  211. package/dist/runner-pg-mYc75KfH.mjs +61 -0
  212. package/dist/runtime/ai.d.mts +50 -0
  213. package/dist/runtime/ai.mjs +455 -0
  214. package/dist/runtime/auth-client-react.d.mts +2 -0
  215. package/dist/runtime/auth-client-react.mjs +1 -0
  216. package/dist/runtime/auth-client.d.mts +2 -0
  217. package/dist/runtime/auth-client.mjs +1 -0
  218. package/dist/runtime/auth.d.mts +2 -0
  219. package/dist/runtime/auth.mjs +1 -0
  220. package/dist/runtime/better-auth-mysql.d.mts +5 -0
  221. package/dist/runtime/better-auth-mysql.mjs +21 -0
  222. package/dist/runtime/better-auth-pg.d.mts +5 -0
  223. package/dist/runtime/better-auth-pg.mjs +21 -0
  224. package/dist/runtime/better-auth.d.mts +6 -0
  225. package/dist/runtime/better-auth.mjs +22 -0
  226. package/dist/runtime/client-react.d.mts +5 -0
  227. package/dist/runtime/client-react.mjs +5 -0
  228. package/dist/runtime/client.d.mts +5 -0
  229. package/dist/runtime/client.mjs +5 -0
  230. package/dist/runtime/db-mysql.d.mts +2 -0
  231. package/dist/runtime/db-mysql.mjs +1 -0
  232. package/dist/runtime/db-pg.d.mts +2 -0
  233. package/dist/runtime/db-pg.mjs +1 -0
  234. package/dist/runtime/db.d.mts +17 -0
  235. package/dist/runtime/db.mjs +36 -0
  236. package/dist/runtime/drizzle-arktype.d.mts +1 -0
  237. package/dist/runtime/drizzle-arktype.mjs +2 -0
  238. package/dist/runtime/drizzle-valibot.d.mts +1 -0
  239. package/dist/runtime/drizzle-valibot.mjs +2 -0
  240. package/dist/runtime/drizzle-zod.d.mts +1 -0
  241. package/dist/runtime/drizzle-zod.mjs +2 -0
  242. package/dist/runtime/durable.d.mts +64 -0
  243. package/dist/runtime/durable.mjs +165 -0
  244. package/dist/runtime/email/testing.d.mts +108 -0
  245. package/dist/runtime/email/testing.mjs +268 -0
  246. package/dist/runtime/email-protocol.d.mts +25 -0
  247. package/dist/runtime/email-protocol.mjs +1 -0
  248. package/dist/runtime/email.d.mts +26 -0
  249. package/dist/runtime/email.mjs +524 -0
  250. package/dist/runtime/env-public-client.d.mts +19 -0
  251. package/dist/runtime/env-public-client.mjs +55 -0
  252. package/dist/runtime/env-public.d.mts +4 -0
  253. package/dist/runtime/env-public.mjs +277 -0
  254. package/dist/runtime/env.d.mts +12 -0
  255. package/dist/runtime/env.mjs +1 -0
  256. package/dist/runtime/fetch-server.d.mts +6 -0
  257. package/dist/runtime/fetch-server.mjs +29 -0
  258. package/dist/runtime/fetch-stream.d.mts +3 -0
  259. package/dist/runtime/fetch-stream.mjs +3 -0
  260. package/dist/runtime/fetch.d.mts +2 -0
  261. package/dist/runtime/fetch.mjs +3 -0
  262. package/dist/runtime/handler.d.mts +3 -0
  263. package/dist/runtime/handler.mjs +1 -0
  264. package/dist/runtime/kv.d.mts +45 -0
  265. package/dist/runtime/kv.mjs +103 -0
  266. package/dist/runtime/limits.d.mts +2 -0
  267. package/dist/runtime/limits.mjs +1 -0
  268. package/dist/runtime/live-client.d.mts +40 -0
  269. package/dist/runtime/live-client.mjs +282 -0
  270. package/dist/runtime/live-server.d.mts +11 -0
  271. package/dist/runtime/live-server.mjs +419 -0
  272. package/dist/runtime/live.d.mts +3 -0
  273. package/dist/runtime/live.mjs +1 -0
  274. package/dist/runtime/log.d.mts +24 -0
  275. package/dist/runtime/log.mjs +57 -0
  276. package/dist/runtime/migration-handler-mysql.d.mts +2 -0
  277. package/dist/runtime/migration-handler-mysql.mjs +111 -0
  278. package/dist/runtime/migration-handler-pg.d.mts +2 -0
  279. package/dist/runtime/migration-handler-pg.mjs +94 -0
  280. package/dist/runtime/migration-handler.d.mts +2 -0
  281. package/dist/runtime/migration-handler.mjs +1 -0
  282. package/dist/runtime/procedure.d.mts +27 -0
  283. package/dist/runtime/procedure.mjs +36 -0
  284. package/dist/runtime/procedures.d.mts +24 -0
  285. package/dist/runtime/procedures.mjs +56 -0
  286. package/dist/runtime/queues.d.mts +2 -0
  287. package/dist/runtime/queues.mjs +8 -0
  288. package/dist/runtime/remote/binding-handler.d.mts +11 -0
  289. package/dist/runtime/remote/binding-handler.mjs +227 -0
  290. package/dist/runtime/remote/index.d.mts +12 -0
  291. package/dist/runtime/remote/index.mjs +467 -0
  292. package/dist/runtime/response.d.mts +11 -0
  293. package/dist/runtime/response.mjs +1 -0
  294. package/dist/runtime/route-url.d.mts +2 -0
  295. package/dist/runtime/route-url.mjs +1 -0
  296. package/dist/runtime/routing.d.mts +53 -0
  297. package/dist/runtime/routing.mjs +425 -0
  298. package/dist/runtime/rpc-react.d.mts +16 -0
  299. package/dist/runtime/rpc-react.mjs +50 -0
  300. package/dist/runtime/rpc.d.mts +2 -0
  301. package/dist/runtime/rpc.mjs +1 -0
  302. package/dist/runtime/sandbox-container.d.mts +3 -0
  303. package/dist/runtime/sandbox-container.mjs +1 -0
  304. package/dist/runtime/sandbox.d.mts +5 -0
  305. package/dist/runtime/sandbox.mjs +196 -0
  306. package/dist/runtime/schema-d1.d.mts +1 -0
  307. package/dist/runtime/schema-d1.mjs +2 -0
  308. package/dist/runtime/schema-mysql.d.mts +1 -0
  309. package/dist/runtime/schema-mysql.mjs +2 -0
  310. package/dist/runtime/schema-pg.d.mts +1 -0
  311. package/dist/runtime/schema-pg.mjs +2 -0
  312. package/dist/runtime/seed.d.mts +34 -0
  313. package/dist/runtime/seed.mjs +5 -0
  314. package/dist/runtime/sse-client.d.mts +31 -0
  315. package/dist/runtime/sse-client.mjs +42 -0
  316. package/dist/runtime/sse.d.mts +32 -0
  317. package/dist/runtime/sse.mjs +1 -0
  318. package/dist/runtime/storage.d.mts +4 -0
  319. package/dist/runtime/storage.mjs +13 -0
  320. package/dist/runtime/validator.d.mts +2 -0
  321. package/dist/runtime/validator.mjs +1 -0
  322. package/dist/runtime/ws-server.d.mts +26 -0
  323. package/dist/runtime/ws-server.mjs +297 -0
  324. package/dist/runtime/ws.d.mts +2 -0
  325. package/dist/runtime/ws.mjs +108 -0
  326. package/dist/sandbox-CWDjoEG2.d.mts +50 -0
  327. package/dist/sandbox-container-BqamdFCx.d.mts +73 -0
  328. package/dist/sandbox-container-d1AHLpgn.mjs +291 -0
  329. package/dist/secret-D5XrWshs.mjs +146 -0
  330. package/dist/skills-Dr3AjuBF.mjs +63 -0
  331. package/dist/sqlite-validation-CLJXXN93.mjs +24 -0
  332. package/dist/sse-CxR30yMF.mjs +174 -0
  333. package/dist/standard-schema-CuDawHOC.d.mts +40 -0
  334. package/dist/static-asset-marker-mWMX2dLa.mjs +38 -0
  335. package/dist/subcommand-prompt-B9yUo--u.mjs +370 -0
  336. package/dist/terminal-log-text-DNsWJREL.mjs +31 -0
  337. package/dist/types-D7-4tBu7.d.mts +1 -0
  338. package/dist/untrusted-env-lL7RkYiC.mjs +50 -0
  339. package/dist/validate-B-zsjhiz.mjs +162 -0
  340. package/dist/validate-DbqGdPPY.mjs +1 -0
  341. package/dist/validator-8-NZs2Xr.mjs +168 -0
  342. package/dist/version-metadata-DPhqnpaa.mjs +23 -0
  343. package/dist/wrangler-C3uyPadQ.mjs +1 -0
  344. package/dist/wrangler-TqTvJFWS.mjs +1452 -0
  345. package/dist/ws-DZRiIpYw.d.mts +137 -0
  346. package/dist/yarn-pnp-DgWbE7z5.mjs +91 -0
  347. package/docs/guide/ai.md +273 -0
  348. package/docs/guide/app-types.md +101 -0
  349. package/docs/guide/auth.md +255 -0
  350. package/docs/guide/database/d1.md +86 -0
  351. package/docs/guide/database/mysql.md +72 -0
  352. package/docs/guide/database/postgresql.md +94 -0
  353. package/docs/guide/database.md +454 -0
  354. package/docs/guide/deployment.md +124 -0
  355. package/docs/guide/durable-state.md +192 -0
  356. package/docs/guide/edge/headers.md +47 -0
  357. package/docs/guide/edge/redirects.md +85 -0
  358. package/docs/guide/edge/rewrites.md +119 -0
  359. package/docs/guide/edge/static-assets.md +94 -0
  360. package/docs/guide/email/domains.md +119 -0
  361. package/docs/guide/email/receiving.md +142 -0
  362. package/docs/guide/email/sending.md +262 -0
  363. package/docs/guide/email.md +23 -0
  364. package/docs/guide/env-vars.md +115 -0
  365. package/docs/guide/index.md +37 -0
  366. package/docs/guide/jobs.md +80 -0
  367. package/docs/guide/kv.md +100 -0
  368. package/docs/guide/live.md +181 -0
  369. package/docs/guide/platform/administration/access.md +165 -0
  370. package/docs/guide/platform/administration/connected-apps.md +84 -0
  371. package/docs/guide/platform/administration/email.md +169 -0
  372. package/docs/guide/platform/administration/operations.md +100 -0
  373. package/docs/guide/platform/administration/plans.md +156 -0
  374. package/docs/guide/platform/administration/projects.md +74 -0
  375. package/docs/guide/platform/administration/zero-trust.md +205 -0
  376. package/docs/guide/platform/development/local.md +122 -0
  377. package/docs/guide/platform/development/runtime.md +115 -0
  378. package/docs/guide/platform/development/schema-ci.md +44 -0
  379. package/docs/guide/platform/installation/ci.md +62 -0
  380. package/docs/guide/platform/installation/credentials.md +140 -0
  381. package/docs/guide/platform/installation/domains.md +120 -0
  382. package/docs/guide/platform/installation/first-deployment.md +95 -0
  383. package/docs/guide/platform/installation/maintenance.md +250 -0
  384. package/docs/guide/platform/installation/prerequisites.md +176 -0
  385. package/docs/guide/platform/installation/setup.md +300 -0
  386. package/docs/guide/platform/installation/uninstall.md +110 -0
  387. package/docs/guide/platform-administration.md +19 -0
  388. package/docs/guide/platform-development.md +16 -0
  389. package/docs/guide/procedures.md +48 -0
  390. package/docs/guide/project-collaboration.md +99 -0
  391. package/docs/guide/queues.md +149 -0
  392. package/docs/guide/quickstart.md +129 -0
  393. package/docs/guide/remote-dev.md +67 -0
  394. package/docs/guide/sandboxes.md +134 -0
  395. package/docs/guide/self-hosted-platform.md +45 -0
  396. package/docs/guide/server-routing.md +283 -0
  397. package/docs/guide/sse.md +174 -0
  398. package/docs/guide/storage.md +82 -0
  399. package/docs/guide/testing.md +64 -0
  400. package/docs/guide/type-safety.md +270 -0
  401. package/docs/guide/typed-fetch.md +98 -0
  402. package/docs/guide/websockets.md +230 -0
  403. package/docs/index.md +102 -0
  404. package/docs/integrations/agents.md +38 -0
  405. package/docs/integrations/cloudflare.md +241 -0
  406. package/docs/integrations/hono.md +127 -0
  407. package/docs/reference/api/auth.md +195 -0
  408. package/docs/reference/api/client.md +90 -0
  409. package/docs/reference/api/database.md +118 -0
  410. package/docs/reference/api/deploy.md +63 -0
  411. package/docs/reference/api/durable.md +47 -0
  412. package/docs/reference/api/env.md +51 -0
  413. package/docs/reference/api/handlers.md +189 -0
  414. package/docs/reference/api/plugin.md +40 -0
  415. package/docs/reference/api/resources.md +116 -0
  416. package/docs/reference/api/rewrites.md +111 -0
  417. package/docs/reference/api/types.md +126 -0
  418. package/docs/reference/api.md +71 -0
  419. package/docs/reference/cli/auth.md +87 -0
  420. package/docs/reference/cli/database.md +159 -0
  421. package/docs/reference/cli/deploy.md +117 -0
  422. package/docs/reference/cli/domains.md +42 -0
  423. package/docs/reference/cli/email.md +145 -0
  424. package/docs/reference/cli/generate.md +113 -0
  425. package/docs/reference/cli/github.md +181 -0
  426. package/docs/reference/cli/platform-config.md +93 -0
  427. package/docs/reference/cli/platform-email.md +81 -0
  428. package/docs/reference/cli/platform-installation.md +166 -0
  429. package/docs/reference/cli/platform-operations.md +90 -0
  430. package/docs/reference/cli/platform-users.md +159 -0
  431. package/docs/reference/cli/platform-zero-trust.md +60 -0
  432. package/docs/reference/cli/platform.md +78 -0
  433. package/docs/reference/cli/project.md +208 -0
  434. package/docs/reference/cli/secrets.md +79 -0
  435. package/docs/reference/cli/setup.md +88 -0
  436. package/docs/reference/cli.md +115 -0
  437. package/docs/reference/config.md +478 -0
  438. package/docs/reference/resource-inference.md +72 -0
  439. package/docs/reference/structure.md +138 -0
  440. package/package.json +389 -3
  441. package/sandbox.Dockerfile +4 -0
  442. package/schema.json +353 -0
  443. package/skills/bwf/SKILL.md +100 -0
  444. package/skills/migrate-vite-cloudflare-to-bwf/SKILL.md +53 -0
  445. package/templates/assets/bwf.svg +5 -0
  446. package/templates/assets/icons.svg +49 -0
  447. package/templates/assets/react.svg +1 -0
  448. package/templates/assets/stack.svg +35 -0
@@ -0,0 +1,176 @@
1
+ ---
2
+ description: 'Check the Cloudflare account, domain, and API token permissions you need before installing a bwf platform.'
3
+ outline: deep
4
+ ---
5
+
6
+ # Prerequisites
7
+
8
+ To run a bwf platform, you need:
9
+
10
+ - A Cloudflare account with Workers for Platforms, R2, and Analytics Engine enabled.
11
+ - An empty hosted PostgreSQL database.
12
+ - An account with your chosen login provider: GitHub, Google, OIDC, or Cloudflare Access.
13
+ - A domain for your apps, or `workers.dev` for testing. You can [add a domain later](/guide/platform/installation/domains#adding-a-domain).
14
+
15
+ bwf creates the Workers, storage, queues, routing, and database tables through the CLI.
16
+
17
+ Workers for Platforms requires its own paid plan. Analytics Engine is available on Workers Free, but you must enable it for the account. Review [Analytics Engine pricing and allowances](https://developers.cloudflare.com/analytics/analytics-engine/pricing/). Your database and Cloudflare usage are billed separately.
18
+
19
+ ## Prepare Your Cloudflare Account and Domain
20
+
21
+ In the [Cloudflare dashboard](https://dash.cloudflare.com/), select the account where you want the platform to live:
22
+
23
+ 1. Open **Workers & Pages** once to let Cloudflare provision Workers for the account.
24
+ 2. Open **Workers for Platforms** and enable its plan. Review [Workers for Platforms pricing](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/reference/pricing/) before confirming.
25
+ 3. Open **R2 Object Storage** and complete its activation. bwf creates the bucket later.
26
+ 4. Open **Analytics Engine** and select **Enable** if prompted. You do not need to create a dataset manually. If the page has no **Enable** action and installation reports code 10089, follow the [steps below](#if-cloudflare-rejects-analytics-engine).
27
+ 5. For a domain installation, choose a domain you own, such as `example.app`. If you need one, register it with your preferred registrar. Use a spare domain's root: apps will be served at `my-app.example.app`. For workers.dev testing, skip this step and the DNS setup below.
28
+
29
+ If that domain is already in this Cloudflare account, use its existing zone. Otherwise, [add the domain to Cloudflare](https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/) and follow the nameserver instructions until the zone is active. A zone is Cloudflare's DNS configuration for a domain; creating one does not buy the domain.
30
+
31
+ You can also let bwf create the zone during installation. Setting it up now lets you scope the API tokens to that zone and finish installation without a DNS pause. The platform API uses `workers.dev` by default, so it needs no additional domain.
32
+
33
+ ### If Cloudflare rejects Analytics Engine
34
+
35
+ The platform stores request metrics and logs in Analytics Engine. If installation stops with "You need to enable Analytics Engine" (code 10089), open the Analytics Engine dashboard link in the error and select **Enable** for that account. Activation is available on Workers Free; this error does not require a Workers plan upgrade or a replacement API token. Then run the printed `bwf platform install --resume` command.
36
+
37
+ If your account's dashboard has no **Enable** action, create a disposable Hello World Worker, add an Analytics Engine binding under **Settings** > **Bindings**, and deploy it once from the dashboard. Then resume installation. Use a separate Worker for this step; leave the platform's own Workers unchanged.
38
+
39
+ ## Install the CLI and Preview
40
+
41
+ With Node.js 24.22+ or 26.12+, install the CLI:
42
+
43
+ ```sh
44
+ pnpm add --global @builtbyfriends/bwf
45
+ bwf platform install --plan
46
+ ```
47
+
48
+ Sign in to Cloudflare when prompted, then choose an installation name and account. `--plan` previews the resources without changing them or requiring runtime secrets. Completed plans save your choices locally. Run `bwf platform install` again to select a saved plan; bwf checks the current Cloudflare state before asking you to apply it.
49
+
50
+ For a domain installation, use these answers. Testing mode skips the application domain, zone, and catch-all questions:
51
+
52
+ | Prompt | Answer |
53
+ | -------------------------------------- | --------------------------------------------------- |
54
+ | Installation name | A short name, such as `team` |
55
+ | Application base domain | Your domain, such as `example.app` |
56
+ | Cloudflare zone | The same domain |
57
+ | Platform display name | Any name your team will recognize |
58
+ | Optional custom API hostname | Leave empty to use `workers.dev` |
59
+ | Dedicate all unmatched traffic to bwf? | Yes only if this whole zone belongs to the platform |
60
+
61
+ Choose an unused installation name in your account. For example, `team` creates resources such as `nosam-team-api` and `nosam-team-proxy`.
62
+
63
+ The preview lists the credentials you will need. Review [Credentials](/guide/platform/installation/credentials), then run the install command printed at the end. The guided installation provides setup links and the login callback when needed.
64
+
65
+ You can select either path directly:
66
+
67
+ ```sh
68
+ bwf platform install --application-domain example.app --plan
69
+ bwf platform install --workers-dev --plan
70
+ ```
71
+
72
+ `--workers-dev` cannot be combined with `--application-domain`, `--zone`, or `--dedicated-zone`.
73
+
74
+ ## Create the Platform Database {#platform-database}
75
+
76
+ Use an empty PostgreSQL database dedicated to this platform. It stores users, projects, and deployments; individual apps can still use D1. bwf creates the tables and the Hyperdrive connection, but does not provision the PostgreSQL server.
77
+
78
+ Use any PostgreSQL provider that accepts connections from your computer and Cloudflare:
79
+
80
+ 1. Create a fresh database or project dedicated to the platform, with no existing application tables. Use a database role that can create and manage its tables and schemas.
81
+ 2. Open the provider's connection details and select the primary database. Use a direct connection or a session-mode pooler, not transaction pooling. The connection must work from both your computer and Cloudflare.
82
+ 3. Copy the PostgreSQL connection URL, including the password and SSL settings, into your password manager. Paste only the URL—not a surrounding `psql` command—into bwf's `PostgreSQL DATABASE_URL` prompt, as the provider gives it, including SSL settings such as `sslmode=verify-full`. A Hyperdrive that bwf creates trusts only public certificate authorities, so if your database uses a private certificate authority, use a separately managed Hyperdrive, as described below.
83
+
84
+ | Provider | Connection setup |
85
+ | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
86
+ | [PlanetScale Postgres](https://planetscale.com/docs/postgres/connecting) | Choose **Postgres**, not Vitess/MySQL. Open **Connect**, create role credentials, and use the direct primary connection on port `5432`, not PgBouncer on `6432`. |
87
+ | [Neon](https://neon.com/docs/get-started-with-neon/connect-neon) | Open **Connect**, select the database and owner role, and turn **connection pooling off**. |
88
+
89
+ When sizing your database, include the connection pools for every platform installation and application sharing that server. Adjust each Hyperdrive's [origin connection limit](https://developers.cloudflare.com/hyperdrive/configuration/tune-connection-pool/) to fit the server's capacity, leaving room for migrations, administration, provider-reserved connections, and temporary bursts.
90
+
91
+ Once installation claims the database, continue using that same database for resume and maintenance commands. If installation stops because it cannot use the database, for example because the database is not empty, set `NOSAM_PLATFORM_DATABASE_URL` to another database's URL before you resume. Uninstall never deletes external PostgreSQL.
92
+
93
+ ### Use a provider CLI
94
+
95
+ You can create the database and retrieve its connection URL from either provider's CLI instead of its dashboard.
96
+
97
+ ::: details PlanetScale Postgres
98
+
99
+ Install the latest [PlanetScale CLI](https://planetscale.com/docs/cli/planetscale-environment-setup). On macOS, use `brew install pscale`; the installation guide also covers Linux and Windows.
100
+
101
+ Sign in and list your organizations and regions:
102
+
103
+ ```sh
104
+ pscale auth login
105
+ pscale org list
106
+ pscale region list --org <organization>
107
+ ```
108
+
109
+ Replace `<organization>` with your organization slug and choose a region. List the available Postgres cluster sizes and their prices for that region:
110
+
111
+ ```sh
112
+ pscale size cluster list --org <organization> --engine postgresql --region <region>
113
+ ```
114
+
115
+ Create a dedicated Postgres database with your chosen cluster size, then create a role with permission to create and migrate bwf's tables:
116
+
117
+ ```sh
118
+ pscale database create nosam-platform \
119
+ --org <organization> \
120
+ --engine postgresql \
121
+ --region <region> \
122
+ --cluster-size <cluster-size> \
123
+ --wait
124
+
125
+ pscale role create nosam-platform main nosam_owner \
126
+ --org <organization> \
127
+ --inherited-roles postgres
128
+ ```
129
+
130
+ Save the **DATABASE URL** printed by the role-creation command in your password manager and paste it into bwf's `PostgreSQL DATABASE_URL` prompt. Use the direct primary connection on port `5432` with `sslmode=verify-full`. The role's password is shown when it is created, so save it before closing the terminal.
131
+
132
+ See PlanetScale's [database commands](https://planetscale.com/docs/cli/database) and [role commands](https://planetscale.com/docs/cli/role) for more options.
133
+
134
+ :::
135
+
136
+ ::: details Neon
137
+
138
+ Install the latest [Neon CLI](https://neon.com/docs/cli/install) and sign in:
139
+
140
+ ```sh
141
+ pnpm add --global neon@latest
142
+ neon login
143
+ ```
144
+
145
+ Create a dedicated project, database, and owner role. Replace `<region-id>` with one of Neon's [supported regions](https://neon.com/docs/cli/projects#create), such as `aws-us-east-2`:
146
+
147
+ ```sh
148
+ neon projects create --name nosam-platform \
149
+ --database nosam_platform \
150
+ --role nosam_owner \
151
+ --region-id <region-id>
152
+ ```
153
+
154
+ Use the project ID from the output to retrieve a direct primary connection URL with TLS certificate verification:
155
+
156
+ ```sh
157
+ neon connection-string --project-id <project-id> \
158
+ --database-name nosam_platform \
159
+ --role-name nosam_owner \
160
+ --endpoint-type read_write \
161
+ --ssl verify-full
162
+ ```
163
+
164
+ Save the printed URL in your password manager and paste it into bwf's `PostgreSQL DATABASE_URL` prompt. Keep this connection unpooled. See Neon's [connection-string command](https://neon.com/docs/cli/connection-string) for more options.
165
+
166
+ :::
167
+
168
+ ### Use an existing Hyperdrive
169
+
170
+ The installer can create Hyperdrive for you or use one you manage separately. For an existing configuration:
171
+
172
+ 1. Point it at the dedicated platform database using a runtime user, and disable SQL result caching.
173
+ 2. Select it in the installer and review the database, host and port (or Workers VPC service ID), and runtime user.
174
+ 3. Supply a database owner connection at the PostgreSQL URL prompt so bwf can apply migrations.
175
+
176
+ To create one first, choose **Set up a separately managed Hyperdrive** and follow the printed instructions or [Cloudflare’s setup guide](https://developers.cloudflare.com/hyperdrive/get-started/). Rerun the installer once it is ready. bwf leaves its configuration under your control. For unattended setup, use the Hyperdrive variables in [Install from CI](/guide/platform/installation/ci).
@@ -0,0 +1,300 @@
1
+ ---
2
+ description: 'Install a bwf platform and choose how administrators and developers sign in.'
3
+ outline: deep
4
+ ---
5
+
6
+ # Install and Configure Login
7
+
8
+ Press Enter to accept a suggested zone or display name, or type to replace it. Enter your own installation name and application domain; examples such as `company` and `example.com` are placeholders.
9
+
10
+ For workers.dev testing, start the interactive install and choose your login method below:
11
+
12
+ ```sh
13
+ bwf platform install --workers-dev
14
+ ```
15
+
16
+ bwf asks for a management API token when it needs to create a zone, add wildcard DNS, or configure Access. Follow the token-creation link and paste the token into the masked prompt. For an existing domain, change **All Domains** to **Specified Domains** and select your zone.
17
+
18
+ Browser login can use an existing proxied `*.<application domain>` record, but cannot change DNS or configure Access. Interactive installation doesn't require shell environment variables.
19
+
20
+ ::: details Use an existing management token from the shell
21
+
22
+ Set `CLOUDFLARE_API_TOKEN` to use an existing token instead of the prompt. In Bash or zsh, read it without displaying it or putting its value in command history:
23
+
24
+ ```sh
25
+ printf 'Cloudflare management API token: '
26
+ read -rs CLOUDFLARE_API_TOKEN
27
+ printf '\n'
28
+ export CLOUDFLARE_API_TOKEN
29
+ bwf platform install
30
+ ```
31
+
32
+ In PowerShell:
33
+
34
+ ```powershell
35
+ $env:CLOUDFLARE_API_TOKEN = [System.Net.NetworkCredential]::new('', (Read-Host 'Cloudflare management API token' -AsSecureString)).Password
36
+ bwf platform install
37
+ ```
38
+
39
+ :::
40
+
41
+ After reviewing `--plan`, run `bwf platform install` and select your saved plan, or run the command printed under **Next, run this command to install the platform**. Both carry your choices into installation and check the current Cloudflare state. Review the refreshed plan. At **Apply this plan?**, **Yes** is selected; press Enter to continue to the credential prompts, or choose **No** to stop. bwf opens the relevant setup pages and provides fallback links in the terminal. It reuses values you have already supplied.
42
+
43
+ Saved plans contain your installation choices, including paths to any authentication configuration or custom runtime. They contain no secrets or approval to install. Declining the plan or cancelling management-token setup keeps those choices for your next attempt.
44
+
45
+ ## Choose login methods
46
+
47
+ The installer offers GitHub, Google, generic OIDC, and Cloudflare Access login. Select all methods you want to enable; none are selected initially.
48
+ Cloudflare Access protection is a separate choice from Access login. The
49
+ GitHub OAuth steps below apply when you select GitHub login.
50
+
51
+ ## Choose who can access apps
52
+
53
+ The installer asks **Who should be able to access deployed apps?**
54
+
55
+ - **Same people allowed by the platform’s Access policy** reuses your selected company identities and policies. This is recommended when platform Access protection is enabled.
56
+ - **Anyone — public apps** allows public visits.
57
+ - **Choose a different Access policy** selects separate company rules for apps. Without platform protection, this option is **Set up Cloudflare Access protection**.
58
+
59
+ The plan shows the default app access. bwf finishes and verifies app access before
60
+ opening application traffic; new projects inherit the selected default automatically.
61
+ If setup stops, use the printed resume command. Existing installations retain their
62
+ administrator settings during upgrades.
63
+
64
+ App protection uses the account hosting your platform. If platform login or
65
+ protection uses another account, select equivalent identity providers and policies
66
+ in the hosting account when prompted. Use the app domain’s apex or a workers.dev
67
+ hostname for the API so it stays outside the app wildcard.
68
+
69
+ bwf checks account-wide Default-Deny during setup. For public apps in an account
70
+ that requires Access rules, it creates rules for each app and its verified custom
71
+ domains. Other subdomains keep their existing access rules. It leaves account-wide
72
+ Default-Deny enabled and does not bypass the platform API or proxy.
73
+
74
+ App rules need **Access: Apps and Policies Edit** and **Organizations, Identity
75
+ Providers, and Groups Read**. bwf stores this management token encrypted for future
76
+ apps and domain changes. The installer asks before retaining a setup-only token for
77
+ that purpose, or guides you to create a dedicated token. Public apps without
78
+ Default-Deny need no ongoing Access-management credential.
79
+
80
+ For scripts, use `--app-access public|platform|custom`. Supply
81
+ `NOSAM_PLATFORM_APP_ACCESS_TOKEN` when app rules are needed, or add an `appAccess`
82
+ section to your `--auth-config` file:
83
+
84
+ ```json
85
+ {
86
+ "appAccess": {
87
+ "mode": "custom",
88
+ "identityProviderIds": ["hosting-account-identity-provider-id"],
89
+ "policyIds": ["hosting-account-company-policy-id"],
90
+ "tokenEnv": "APP_ACCESS_API_TOKEN"
91
+ }
92
+ }
93
+ ```
94
+
95
+ Keep the file’s existing `connections` configuration. For `mode: "platform"`,
96
+ same-account identity and policy selections are reused. Headless setup requires an
97
+ explicit app-management token; it never silently retains an installer-only token.
98
+
99
+ ## Choose what runtime logs record {#runtime-logs}
100
+
101
+ By default, runtime logs include request URLs, console output, and exception messages. Project owners read them with `bwf project logs`; administrators use `bwf platform deployment logs`. Logs stay in your Cloudflare account, in Workers Logs and the platform's log history.
102
+
103
+ If your apps can put personal data in URLs, logs, or error messages, install with minimal runtime logs:
104
+
105
+ ```sh
106
+ bwf platform install --runtime-logs minimal
107
+ ```
108
+
109
+ With minimal runtime logs:
110
+
111
+ - Workers Logs is disabled for platform and project Workers.
112
+ - The platform's log history keeps request times, methods, statuses, outcomes, deployments, log levels, and exception names. URLs and message text are omitted.
113
+ - You can still filter by `--level` or search exception names with `--filter`. Log views show that URLs and messages aren't recorded.
114
+
115
+ The setting covers the whole platform. To change it later, see [Change runtime logs](/guide/platform/installation/maintenance#runtime-logs).
116
+
117
+ ## Choose a default storage location
118
+
119
+ Set a preferred location for new project R2 buckets:
120
+
121
+ ```sh
122
+ bwf platform install --storage-location apac
123
+ ```
124
+
125
+ Supported hints are `apac`, `eeur`, `enam`, `weur`, `wnam`, and `oc`. The default is automatic placement by Cloudflare. Projects can override the default with [`storage.locationHint`](/reference/config#storage-locationhint).
126
+
127
+ To change the default later, use `bwf platform upgrade <id> --storage-location weur`. Use `--storage-location automatic` to clear it; omitting the flag keeps the current setting. Changes affect only newly created project buckets, not existing buckets or the platform's own asset bucket. Location hints are [best effort](https://developers.cloudflare.com/r2/reference/data-location/), not data residency guarantees.
128
+
129
+ ## Finish login configuration
130
+
131
+ For Google, create an OAuth client and register the printed callback URL. You
132
+ can restrict it to named Google Workspace domains. For OIDC or Access login,
133
+ provide the issuer URL, client ID, and client secret. Select **Company-approved
134
+ users** when the configured company policy should allow colleagues to create
135
+ accounts automatically without individual invitations.
136
+
137
+ When using the configurable setup, installation prints a one-time setup code
138
+ and a `/setup` URL. Enter the code, authenticate with the chosen administrator
139
+ method, and review the identity before confirming its administrator role. That
140
+ method becomes enabled; additional selected methods are saved as pending
141
+ configurations to test and enable in Settings. No GitHub account is required
142
+ for a Google-only or OIDC-only installation.
143
+
144
+ For scripts, pass `--auth-config <path>` with nonsecret configuration and
145
+ environment-variable references for secrets. For example:
146
+
147
+ ```json
148
+ {
149
+ "connections": [
150
+ {
151
+ "configuration": {
152
+ "id": "google",
153
+ "kind": "google",
154
+ "label": "Company Google",
155
+ "clientId": "your-google-client-id",
156
+ "allowedDomains": ["example.com"]
157
+ },
158
+ "clientSecretEnv": "GOOGLE_CLIENT_SECRET"
159
+ }
160
+ ],
161
+ "administratorConnectionId": "google",
162
+ "admission": {
163
+ "mode": "company",
164
+ "connections": ["google"],
165
+ "access": false
166
+ }
167
+ }
168
+ ```
169
+
170
+ `--plan` reads this configuration without requiring the referenced secret.
171
+ Supply the secret through your secret manager when applying the installation.
172
+
173
+ ### Cloudflare Access
174
+
175
+ Choose Access login, platform protection, or both. Protection can also be used
176
+ with GitHub or another login method. With company-approved signup, a colleague
177
+ who passes the company gate can create an ordinary account using GitHub even
178
+ when their GitHub email differs from their company email.
179
+
180
+ Your identity provider determines how employees sign in, such as through Okta or
181
+ Google Workspace. Your Access policies determine who can reach the platform and
182
+ which MFA or device requirements apply.
183
+
184
+ Automatic setup uses an existing Zero Trust organization, selected identity
185
+ providers, and existing company policies. bwf creates dedicated applications
186
+ and a scoped service token for protected installation checks. It preserves your
187
+ company policies, including device and MFA requirements.
188
+
189
+ If no policy fits, choose **Allow my company’s email domain** in the policy list
190
+ and enter your domains. bwf creates that Allow policy in your account and keeps
191
+ it there for reuse; you can add MFA or device rules to it in Cloudflare later.
192
+ For identity-provider groups or other rules, choose **Create in Cloudflare** and
193
+ follow the printed steps.
194
+
195
+ An Allow policy must name who may sign in: emails, email domains or lists,
196
+ identity-provider groups (Okta, Microsoft Entra ID, Google Workspace, GitHub
197
+ organizations, or SAML), authentication contexts, members of a Cloudflare
198
+ account, or Access groups built from them. Microsoft Entra ID groups and
199
+ authentication contexts count only when they come from an identity provider you
200
+ select. A login method also counts when it is one of the identity providers you select and uses
201
+ Cloudflare's connector for a company directory: Microsoft Entra ID, Okta,
202
+ OneLogin, PingOne, Centrify, Google Workspace, or the Cloudflare login with
203
+ **Restrict to account members** turned on. Policies that allow everyone, any
204
+ service token, or bypass Access are rejected, and so are policies that rely
205
+ only on One-time PIN, a public login such as GitHub, or a login added with the
206
+ generic **OpenID Connect** or **SAML** option, even one that fronts your
207
+ company directory. bwf cannot tell who can sign in through a generic login;
208
+ add a Require rule such as **Emails ending in** your company domain to that
209
+ policy.
210
+
211
+ The setup credential needs **Access: Apps and Policies Write** and
212
+ **Access: Organizations, Identity Providers, and Groups Read** in the identity
213
+ account. Creating protection also needs **Access: Service Tokens Write**.
214
+ For setup in the installation account, the initial management-token link includes
215
+ these permissions. bwf checks Access reads before provisioning and reuses that
216
+ management token during Access setup, so you do not need a second API token.
217
+ For applications in another account, provide a token scoped to that identity
218
+ account when asked. Scripts can supply an explicit override through
219
+ `NOSAM_PLATFORM_ACCESS_SETUP_TOKEN`. The platform's runtime token does not need
220
+ Access management permissions. See Cloudflare's
221
+ [Access API](https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/applications/)
222
+ and [service-token permissions](https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/service_tokens/methods/create/).
223
+
224
+ To automate Access setup, add this to the authentication configuration file:
225
+
226
+ ```json
227
+ {
228
+ "protection": true,
229
+ "cloudflareAccess": {
230
+ "mode": "create",
231
+ "identityProviderIds": ["your-company-identity-provider-id"],
232
+ "policyIds": ["your-company-allow-policy-id"]
233
+ }
234
+ }
235
+ ```
236
+
237
+ Keep the file's `connections` list from the example above, or use a connection
238
+ with `{"id":"access","kind":"cloudflare-access","label":"Company Access"}`
239
+ to create Access login as well. Omit `protection` for login-only setup.
240
+
241
+ To connect applications managed elsewhere, select **Use Access applications your company already manages**.
242
+ Enter the account that owns the Access applications; it can differ from the
243
+ account hosting bwf.
244
+ Scripts use `mode: "existing"`, optional `accountId`, and `loginApplicationId`
245
+ and/or `protectionApplicationId`. For login, set `loginClientSecretEnv`. For
246
+ protection, supply `serviceToken` with `id`, `clientIdEnv`, and `clientSecretEnv`
247
+ for a token already admitted by the application. The selected policies must
248
+ cover both printed API and proxy origins. Connecting existing resources needs
249
+ read access to their applications, policies, organization, identity providers,
250
+ groups, and service tokens; bwf leaves their policies unchanged.
251
+
252
+ Access login alone can connect to another account using only its issuer, client
253
+ ID, and secret, without a `cloudflareAccess` block or Cloudflare management token.
254
+ Follow Cloudflare's [OIDC application guide](https://developers.cloudflare.com/cloudflare-one/access-controls/applications/http-apps/saas-apps/generic-oidc-saas/)
255
+ and register the exact callback printed by bwf.
256
+
257
+ ### GitHub
258
+
259
+ For GitHub login:
260
+
261
+ 1. The installer opens [GitHub's new OAuth App form](https://github.com/settings/applications/new) when it needs OAuth credentials. Sign in as the account that will own the login integration.
262
+ 2. Set **Application name** to your platform's display name and **Homepage URL** to the API URL bwf just printed.
263
+ 3. Set the **Redirect URI** (also called **Authorization callback URL**) to the exact printed URL ending in `/auth/callback`, then register the application. This URL is now pinned in your saved draft and remains the same if credential setup is interrupted.
264
+ 4. Save the **Client ID**, generate a **Client Secret**, and save that too. GitHub's [registration guide](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) describes the form.
265
+
266
+ This OAuth App handles sign-in.
267
+
268
+ ## Finish installation
269
+
270
+ The installer collects your runtime token, PostgreSQL URL, login-provider credentials, and R2 credentials, and generates the [signing and encryption keys](/guide/platform/installation/credentials#signing-and-encryption-keys). It masks secret values and saves setup progress encrypted through your system keychain. Keep a password-manager copy for recovery on another machine.
271
+
272
+ Once installation finishes, open the printed admin dashboard link. For GitHub-only setup, sign in as the administrator selected during installation. For configurable login, use the one-time `/setup` code to confirm the administrator’s identity. Use the printed API URL to [connect and deploy an app](/guide/platform/installation/first-deployment).
273
+
274
+ If you supplied a management token through the shell, remove it when finished:
275
+
276
+ ```sh
277
+ unset CLOUDFLARE_API_TOKEN
278
+ ```
279
+
280
+ In PowerShell, use `Remove-Item Env:CLOUDFLARE_API_TOKEN`. Keep the saved token for future maintenance.
281
+
282
+ ::: details If setup pauses for DNS or is interrupted
283
+
284
+ If bwf created a zone, it stops in `waiting-for-dns` and prints nameservers. Set those at your registrar, wait for the zone to become active, then resume using the installation ID printed by bwf:
285
+
286
+ ```sh
287
+ bwf platform install --resume --name <installation-id>
288
+ ```
289
+
290
+ Resume reuses the saved management token and asks for one if it is missing or rejected by Cloudflare. You can override it through `CLOUDFLARE_API_TOKEN`. When using a source build, also pass the same `--runtime` directory. Resume uses the saved checkpoint and original secrets; do not start a second installation or generate replacement keys. If setup stopped before a checkpoint was saved, rerun `bwf platform install` and select your saved plan, or rerun the original command.
291
+
292
+ You can also rerun `bwf platform install` and choose **Continue setup** for an unfinished installation. For non-interactive recovery, use `--resume --name <id>`. Manage completed platforms with `platform status`, `repair`, or `upgrade`.
293
+
294
+ Resume restores your selected Hyperdrive. If that selection is missing from the saved checkpoint, add `--hyperdrive <existing-id>` when resuming, using the same configuration you originally selected.
295
+
296
+ If Cloudflare rejects a saved runtime token, bwf opens the token page and asks for a replacement. For a missing [email permission](/guide/platform/installation/credentials#enable-email), update the existing token's permissions and resume. If you supplied a token through an environment variable, update that variable.
297
+
298
+ To replace a revoked runtime token, set `NOSAM_PLATFORM_RUNTIME_CLOUDFLARE_API_TOKEN` to its replacement and resume. bwf saves it and updates any platform Workers deployed by the interrupted run.
299
+
300
+ :::
@@ -0,0 +1,110 @@
1
+ ---
2
+ description: 'Disable a platform without deleting its data, or uninstall it and remove its Cloudflare resources.'
3
+ outline: deep
4
+ ---
5
+
6
+ # Disable and Uninstall
7
+
8
+ To pause a platform without removing its data:
9
+
10
+ ```sh
11
+ bwf platform disable [id] --plan
12
+ bwf platform disable [id]
13
+ ```
14
+
15
+ Disabled platforms reject application traffic while retaining domains and routes. The platform API also rejects requests, so CLI commands that use it, including login and deploy, fail until you enable the platform again. Only the administrator status page at `<api-url>/admin/status` and administrator sign-in stay available. Repair and upgrade preserve that state.
16
+
17
+ Enabling redeploys the platform Workers from the selected runtime, verifies them, and then restores traffic. Pass `--runtime <path>` to enable with a custom platform build:
18
+
19
+ ```sh
20
+ bwf platform enable [id] --plan
21
+ bwf platform enable [id]
22
+ ```
23
+
24
+ Add `--yes` to commands that make changes in a non-interactive shell.
25
+
26
+ While disabled, the platform retries queue batches after five minutes instead of delivering them to apps. Queue retention and retry limits still apply. For a long pause, plan a dead-letter queue or another way to recover messages.
27
+
28
+ ## Uninstall
29
+
30
+ Preview removal before applying it:
31
+
32
+ ```sh
33
+ bwf platform uninstall [id] --plan
34
+ bwf platform uninstall [id]
35
+ ```
36
+
37
+ Uninstall blocks platform traffic, removes Queues that no remaining platform Worker uses, and lists the resources left for you to review. Use `--plan` to review deletions and retained resources before making changes. By default, Workers, the Queues they use, KV, R2, Hyperdrive, the dispatch namespace, and AI Gateway remain in your account. Adopted resources, external PostgreSQL, and zones are always retained. To install a platform again, use a new empty PostgreSQL database. Email Routing settings are retained; `--purge-resources` removes only the rules that send mail to the platform. DNS records, routes, custom domains, and Cloudflare Access resources are retained unless you use `--purge-resources`.
38
+
39
+ When uninstall finishes, the record of what was kept stays at `~/.bwf/platforms/<account-id>/<installation-id>.json`. Without `--purge-data`, the encrypted credentials file `<installation-id>.recovery.enc` next to it is kept too. Delete both once you have finished the manual cleanup below.
40
+
41
+ To also remove eligible data resources owned by the installer:
42
+
43
+ ```sh
44
+ bwf platform uninstall [id] --purge-data
45
+ ```
46
+
47
+ Even with `--purge-data`, bwf retains Workers, the Queues they use, R2, AI Gateway, DNS records, routes, custom domains, Access resources, adopted resources, external PostgreSQL, and zones. Review those in the Cloudflare dashboard if you want to remove them, or use `--purge-resources`.
48
+
49
+ ### Remove everything bwf created
50
+
51
+ To delete every Cloudflare resource the installation created:
52
+
53
+ ```sh
54
+ bwf platform uninstall [id] --purge-resources --plan
55
+ bwf platform uninstall [id] --purge-resources
56
+ ```
57
+
58
+ `--purge-resources` includes `--purge-data`. It also deletes the platform Workers, Queues, the application Workers left in the dispatch namespace, the R2 bucket and its objects, the AI Gateway, the platform DNS record, Worker routes and custom domains, and the Access applications and service tokens the installer created. The plan lists each resource in deletion order, and everything that stays. If Cloudflare shows that the AI Gateway was created after installation, for example because it was deleted and created again under the same name, it is kept and listed.
59
+
60
+ If the platform sends email, it first deletes the Email Routing rules in the sender domain's zone that send mail to the platform email gateway Worker, and resets such a catch-all rule to drop mail. It leaves Email Routing enabled and keeps the sender domain's MX, SPF, and DKIM records.
61
+
62
+ It never removes zones, adopted resources, external PostgreSQL, other Email Routing settings, Analytics Engine datasets, Access policies or identity providers you chose, or API tokens. Revoke the API tokens you created for the platform afterward.
63
+
64
+ Before making changes, `--purge-resources` checks that no projects remain and that it can read the resources it plans to delete. Delete any projects with `bwf project delete <name>` first.
65
+
66
+ Set `CLOUDFLARE_API_TOKEN` to a token with the Edit permissions listed by `--plan`. Browser login cannot delete DNS records or Access resources. Access resources in a separate identity account need permissions in that account; email-enabled platforms also need **Zone → Email Routing Rules → Edit** for the sender domain's zone.
67
+
68
+ The read checks cannot verify Edit permissions. If a deletion is denied, uninstall may have already disabled traffic or removed resources. Update the token permissions and rerun the command to resume.
69
+
70
+ If a route, custom domain, DNS record, or Access resource no longer matches what the installation recorded, for example a route that now sends traffic to another Worker, it is kept and listed with the reason, and uninstall continues. Do not run `--purge-resources` while someone else is changing the platform's Workers, routes, or custom domains: a change made after bwf checks a resource and before it deletes it is not detected.
71
+
72
+ If Cloudflare refuses a deletion, for example because a Worker you created yourself still sends logs to the platform tail Worker, uninstall stops and names the resource. Fix it, then rerun the same command to continue.
73
+
74
+ If a plain or `--purge-data` uninstall stopped before it finished, rerun it with `--purge-resources` to also delete what it kept. Once an uninstall finishes, use the manual steps below instead.
75
+
76
+ ### Remove retained resources
77
+
78
+ After an uninstall without `--purge-resources`, Cloudflare refuses to delete a resource while a platform Worker still uses it. In the Cloudflare dashboard, remove what is left in this order, skipping anything already gone:
79
+
80
+ 1. Delete the platform DNS record, Worker routes, and custom domains.
81
+ 2. If the platform sends email, open **Email Routing** for the sender domain's zone. Delete the routing rules and any catch-all rule that send mail to the platform email gateway Worker. Then remove the sender subdomain from Email Routing, or disable Email Routing if you enabled it only for the platform.
82
+ 3. Open each platform Queue and remove the platform API Worker from its consumers.
83
+ 4. Delete the platform Workers, except the tail Worker (its name ends in `-tail`).
84
+ 5. Delete the platform Queues.
85
+ 6. Delete the application Workers in the dispatch namespace, then delete the namespace.
86
+ 7. Delete the tail Worker. Cloudflare refuses while other Workers still send logs to it.
87
+ 8. Delete the platform KV namespaces and Hyperdrive configuration.
88
+ 9. Empty the R2 bucket, then delete it.
89
+ 10. Delete the AI Gateway.
90
+
91
+ If installation configured Cloudflare Access, the uninstall plan lists its recorded applications and service tokens with their ownership and IDs. Review them in Zero Trust after uninstall. Remove installer-created resources only when nothing else uses them; resources connected from an existing company setup remain under their owner's control.
92
+
93
+ Uninstall does not remove the applications created for [project Zero Trust](/guide/platform/administration/zero-trust). While Zero Trust is enabled or still has Access applications, uninstall and `--plan` stop before any change and list those applications. Run `bwf platform zero-trust disable` first. Uninstall reads this from the installation database, so it also stops when the database cannot be reached.
94
+
95
+ If the installation database is permanently lost, [remove its Cloudflare resources manually](#remove-retained-resources). Once cleanup is complete, delete the local record at `~/.bwf/platforms/<account-id>/<installation-id>.json` and its sibling `<installation-id>.recovery.enc` and `<installation-id>.secrets.enc` files. These files contain installation metadata and encrypted credentials; deleting them leaves Cloudflare resources in place.
96
+
97
+ If no platform user exists yet, for example because first administrator setup did
98
+ not finish, nobody can run `zero-trust disable`. Uninstall then turns off project
99
+ Zero Trust and deletes its applications itself. Run it on the computer that installed
100
+ the platform. If the uninstall asks you to, update an older platform runtime first.
101
+
102
+ ::: details Why some resources require manual cleanup
103
+
104
+ Resources that may have been shared or repurposed require manual review before deletion. bwf verifies ownership, keeps those resources in place, and blocks platform traffic.
105
+
106
+ If removal is interrupted, rerun the command to continue. If a resource has changed ownership, resolve the reported conflict before retrying.
107
+
108
+ External PostgreSQL and its data always remain under your control.
109
+
110
+ :::
@@ -0,0 +1,19 @@
1
+ ---
2
+ description: 'Manage people, projects, deployment logs, and platform health from the terminal with void platform.'
3
+ outline: deep
4
+ ---
5
+
6
+ # Platform Administration
7
+
8
+ `bwf platform` lets you manage the people and apps on a bwf platform from your terminal. You can give teammates access, inspect their projects, follow deployment logs, and check the platform's health.
9
+
10
+ The operator commands for users, projects, deployments, and system status require an administrator account. Connection and installation lifecycle commands use their own authentication. If you're setting up a platform for the first time, start with [Install a bwf Platform](/guide/self-hosted-platform).
11
+
12
+ ## Administration Guides
13
+
14
+ - [Sign-in and Access](/guide/platform/administration/access)
15
+ - [Users and Projects](/guide/platform/administration/projects)
16
+ - [Plans and Limits](/guide/platform/administration/plans)
17
+ - [Project Zero Trust](/guide/platform/administration/zero-trust)
18
+ - [Email](/guide/platform/administration/email)
19
+ - [Operations](/guide/platform/administration/operations)
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: 'Change the platform in this repository, test it locally, and deploy a runtime built from your fork.'
3
+ outline: deep
4
+ ---
5
+
6
+ # Developing a bwf Platform
7
+
8
+ The framework, CLI, and platform live in one repository. You can change the platform, test it locally, and deploy a runtime built from your fork into your own Cloudflare account.
9
+
10
+ If you want to run the released platform without changing its implementation, start with [Install a bwf Platform](/guide/self-hosted-platform). Use [Platform Administration](/guide/platform-administration) for managing an installed platform.
11
+
12
+ ## Development Guides
13
+
14
+ - [Local Development](/guide/platform/development/local)
15
+ - [Runtime and Source Builds](/guide/platform/development/runtime)
16
+ - [Schema and CI](/guide/platform/development/schema-ci)