Skip to content

Layout: web/, cloudflare_site/, _bundle deploy artifact (ADR 0019) - #242

Merged
ifireball merged 2 commits into
fullsend-ai:mainfrom
ifireball:feat/web-cloudflare-site-layout
Apr 16, 2026
Merged

Layout: web/, cloudflare_site/, _bundle deploy artifact (ADR 0019)#242
ifireball merged 2 commits into
fullsend-ai:mainfrom
ifireball:feat/web-cloudflare-site-layout

Conversation

@ifireball

@ifireball ifireball commented Apr 15, 2026

Copy link
Copy Markdown
Member

What changes

  • Mindmap lives under web/public/index.html (served as / in production) instead of docs/mindmap.html, so browser-facing assets are clearly separate from design docs and match the planned single Vite tree under web/.
  • The Cloudflare Wrangler project moves from site/ to cloudflare_site/ so the name reflects the deploy boundary and Worker, not a generic "site" folder next to cmd/ and docs/.
  • cloudflare_site/worker/src/index.ts is a small ASSETS pass-through Worker with main set in wrangler.toml, so future OAuth/BFF work extends one file without new workflow paths.
  • Build Site produces artifact site as _bundle/public/ (static) and _bundle/worker/ (Worker sources from the same checkout as the build—PR head on PRs).
  • Deploy Site keeps default-branch checkout only for wrangler.toml and the rest of the Wrangler tree, downloads the artifact into _bundle/, then copies only public/ and worker/ into cloudflare_site/. Top-level entries under _bundle/ are validated (find, including dotfiles) so extra paths (e.g. a wrangler.toml inside the zip) fail the job and cannot run arbitrary config next to Cloudflare secrets.

Why

  • Clear repo layout: web/ is what ships to browsers; cloudflare_site/ is Cloudflare-only config, Worker, and CI-filled static output.
  • Deploy safety: PRs must not supply wrangler.toml on 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 applies public/ and worker/ from that artifact.

ADR

  • ADR 0019 (Accepted) records the web/ vs cloudflare_site/ split and that a root package.json is intended for future npm run dev / npm run build while source stays under web/.

Follow-ups for other branches

Rebase SPA / OAuth work onto this layout: align static output into _bundle/public, keep cloudflare_site/wrangler.toml as the single Wrangler config, and drop duplicate per-app Wrangler projects.

- 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
@github-actions

github-actions Bot commented Apr 15, 2026

Copy link
Copy Markdown

Site preview

Preview: https://c8b39ba6-site.fullsend-ai.workers.dev

Commit: 0f47cbb1b269d0ea32f9aa185576b26dd223b35e

@ifireball
ifireball requested review from ggallen, maruiz93 and waynesun09 and removed request for ggallen and waynesun09 April 15, 2026 12:40
@ifireball ifireball self-assigned this Apr 15, 2026
@ifireball
ifireball requested review from ggallen and ralphbean April 15, 2026 12:40
@ifireball
ifireball marked this pull request as ready for review April 15, 2026 12:52
@waynesun09

Copy link
Copy Markdown
Member

Review: minor doc typo

Three places still say _site/ but the implementation uses _bundle/:

  1. ADR 0019, Decision point 3:

    Build Site assembles _site/ from web/...

    → should be _bundle/

  2. ADR 0019, Consequences:

    ...extends site-build.yml to merge build output into _site/ without renaming cloudflare_site/ again.

    → should be _bundle/

  3. web/README.md:

    ...CI merges into _site/ for Cloudflare.

    → should be _bundle/

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
@ifireball

Copy link
Copy Markdown
Member Author

Thanks @waynesun09 — addressed in 0f47cbb: _site/_bundle/ in ADR 0019 §3 and Consequences, web/README.md updated, and ADR §2 now matches deploy (artifact to _bundle/, copy only public/ + worker/). CI re-green on the new head.

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Artifact validation is solid, all old path references updated, _site/_bundle/ typo fixed in 0f47cbb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants