Layout: web/, cloudflare_site/, _bundle deploy artifact (ADR 0019) - #242
Conversation
- Move the document graph to web/public/index.html; rename site/ to cloudflare_site/ for the sole Wrangler project. - ADR 0019 (Accepted): web/ for browser source; contributor-guidance; root package.json for future npm/Vite while source stays under web/. - Build Site: stage _bundle/public and _bundle/worker (worker from the build checkout) and upload as artifact site. - Deploy Site: default-branch checkout only (trusted wrangler.toml); download artifact to _bundle/; validate top-level entries with find and copy only public/ and worker/ into cloudflare_site/ so the zip cannot inject wrangler.toml or other files beside the Worker tree. - Add a minimal ASSETS pass-through Worker at cloudflare_site/worker. - Update Makefile mindmap target, README, architecture.md, and site / Cloudflare rollout docs. Made-with: Cursor
Site previewPreview: https://c8b39ba6-site.fullsend-ai.workers.dev Commit: |
Review: minor doc typoThree places still say
Everything else looks good — artifact validation is solid, Worker code is correct, all old path references updated. |
Fix _site/ typos (waynesun09 review). Clarify Deploy Site applies artifact via _bundle/ and selective copy; decision 3 uses _bundle/. Made-with: Cursor
|
Thanks @waynesun09 — addressed in |
waynesun09
left a comment
There was a problem hiding this comment.
LGTM. Artifact validation is solid, all old path references updated, _site/ → _bundle/ typo fixed in 0f47cbb.
What changes
web/public/index.html(served as/in production) instead ofdocs/mindmap.html, so browser-facing assets are clearly separate from design docs and match the planned single Vite tree underweb/.site/tocloudflare_site/so the name reflects the deploy boundary and Worker, not a generic "site" folder next tocmd/anddocs/.cloudflare_site/worker/src/index.tsis a small ASSETS pass-through Worker withmainset inwrangler.toml, so future OAuth/BFF work extends one file without new workflow paths.siteas_bundle/public/(static) and_bundle/worker/(Worker sources from the same checkout as the build—PR head on PRs).wrangler.tomland the rest of the Wrangler tree, downloads the artifact into_bundle/, then copies onlypublic/andworker/intocloudflare_site/. Top-level entries under_bundle/are validated (find, including dotfiles) so extra paths (e.g. awrangler.tomlinside the zip) fail the job and cannot run arbitrary config next to Cloudflare secrets.Why
web/is what ships to browsers;cloudflare_site/is Cloudflare-only config, Worker, and CI-filled static output.wrangler.tomlon the privileged deploy runner (for example[build].command). Preview Worker code still tracks the PR because it is built into the artifact on the unprivileged Build Site workflow, while Deploy Site only appliespublic/andworker/from that artifact.ADR
web/vscloudflare_site/split and that a rootpackage.jsonis intended for futurenpm run dev/npm run buildwhile source stays underweb/.Follow-ups for other branches
Rebase SPA / OAuth work onto this layout: align static output into
_bundle/public, keepcloudflare_site/wrangler.tomlas the single Wrangler config, and drop duplicate per-app Wrangler projects.