19. Web source under web/ and Cloudflare project under cloudflare_site/
Date: 2026-04-15
Status
Accepted
Context
This repository mixes design documents, Go CLI code (cmd/), and a small browser-delivered surface (today the interactive document graph). That surface was previously rooted at docs/mindmap.html while Cloudflare Wrangler lived under site/, which read as a generic “website” folder rather than “Cloudflare deploy boundary,” and blurred documentation versus deployable HTML. Separating web/ (browser source) from cloudflare_site/ (Wrangler + deploy-time static) makes layout and CI obvious for contributors.
Decision
- Browser-oriented source (static HTML today; future Vite entrypoints and assets) lives under
web/. The landing page isweb/public/index.html(served at/); the interactive document graph isweb/public/graph.html(served at/graph.html). Node tooling (package.json, lockfile, and scripts such asnpm run dev/npm run build) stays at the repository root so day-to-day work does not requirecd web; Vite config may still pointrootatweb/(or a subdirectory) for resolution. - The sole Wrangler project in this repository lives under
cloudflare_site/(wrangler.tomlfrom the default-branch checkout on deploy, pluspublic/andworker/filled from the Build Site artifact). The GitHub Actions Deploy Site workflow continues to useworkingDirectory: cloudflare_site, downloads the artifact to_bundle/, and copies onlypublic/andworker/intocloudflare_site/; workflow names (Build Site, artifactsite, environmentssite-preview/site-production) stay stable for existing automation and operators. - Build Site assembles
_bundle/fromweb/(and later from JS build outputs) without changing that deploy contract.
Consequences
- Contributors edit the landing page at
web/public/index.htmland the document graph atweb/public/graph.html(formerlydocs/mindmap.html, thenweb/public/index.html). - Paths in runbooks and local Wrangler preview use
cloudflare_site/instead ofsite/. - Future SPA work adds Vite (and related devDependencies) using the root
package.json, with source and config underweb/, and extendssite-build.ymlto merge build output into_bundle/public/(and keep_bundle/worker/in sync) without renamingcloudflare_site/again. - Links and docs that referred to
site/wrangler.tomlordocs/mindmap.htmlmust be updated when backporting older instructions.
