chore(web): migrate hosting from Vercel to Cloudflare Pages#41
Merged
Conversation
Eliminates the Vercel bill by moving the web/SPA build (threatforge.dev) to Cloudflare Pages via Git integration, and replaces Vercel Analytics with Cloudflare Web Analytics (free, cookieless). Desktop Tauri app is unaffected. - Remove vercel.json; add wrangler.toml + public/_redirects (SPA fallback) - Drop @vercel/analytics; add env-gated CloudflareAnalytics (web-only, never ships in the Tauri build) wired via VITE_CF_BEACON_TOKEN - Update privacy page (Vercel -> Cloudflare), architecture doc, and add docs/runbooks/deploying-the-website.md with dashboard setup + cutover steps Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
threatforge.dev— marketing site + browser app) off Vercel and onto Cloudflare Pages to eliminate the Vercel Pro bill. The desktop Tauri app (GitHub Releases) is unaffected.Changes
vercel.json(SPA rewrite)wrangler.toml+public/_redirects(/* /index.html 200)@vercel/analyticsinsrc/app.tsxsrc/components/cloudflare-analytics.tsx— runtime-injected beacon, web-only@vercel/analyticspackage.json+ lockfiledocs/runbooks/deploying-the-website.md; architecture host row updatedThe beacon is gated by
!isTauri()and a build-timeVITE_CF_BEACON_TOKEN, so it can never ship into the desktop build. SPA deep-link routing is preserved via_redirects(confirmed present indistafterbuild:web).Test plan
npm run build:web— clean;dist/_redirectspresentnpx tsc --noEmit— cleannpx biome check .— clean (1 pre-existing unrelated CSS!importantwarning)npx vitest --run— 425 pass (3 new forCloudflareAnalytics: no-token, token-present, dedup)VITE_CF_BEACON_TOKEN, cut DNS over, decommission Vercel (steps in the new runbook)mainCI is already red from a pre-existingcargo fmtdrift insrc-tauri/src/menu.rs(since #40, unrelated to this PR — this PR touches zero Rust). Not fixed here to keep the diff focused; happy to send a one-line follow-up.🤖 Generated with Claude Code