19. Web source under web/ and Cloudflare project under cloudflare_site/
Date: 2026-04-15
Note (2026-08-20): The admin installation SPA described in points 1 and 3 was removed.
web/now holds only the static landing page and document graph underweb/public/; there is no Vite build. Point 1's principle still holds — Node tooling stays at the repository root — but its example scripts are stale:npm run devandnpm run buildno longer exist. The root scripts today arenpm test,npm run dev:worker, andnpm run docs:*. The site Worker undercloudflare_site/worker/is a static-asset passthrough — its OAuth BFF was removed with the SPA. Theweb/vscloudflare_site/split this ADR decided is unchanged, as is the Build Site / Deploy Site artifact contract. The public mint Worker (internal/dispatch/cf/workersrc/,mint.fullsend.sh) is a separate deployment and was never covered by this ADR.
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.
