Skip to content

chore(web): migrate hosting from Vercel to Cloudflare Pages#41

Merged
exitzerolabs-admin merged 3 commits into
mainfrom
chore/migrate-vercel-to-cloudflare
Jun 28, 2026
Merged

chore(web): migrate hosting from Vercel to Cloudflare Pages#41
exitzerolabs-admin merged 3 commits into
mainfrom
chore/migrate-vercel-to-cloudflare

Conversation

@exitzerolabs-admin

Copy link
Copy Markdown
Contributor

Summary

  • Migrates the web/SPA build (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.
  • Replaces Vercel Analytics with Cloudflare Web Analytics (free, cookieless, no profiling).
  • Deploy method: Cloudflare Pages Git integration (mirrors the current Vercel auto-deploy-on-push; zero GitHub Actions minutes).

Changes

Area Before After
Host config vercel.json (SPA rewrite) wrangler.toml + public/_redirects (/* /index.html 200)
Analytics @vercel/analytics in src/app.tsx src/components/cloudflare-analytics.tsx — runtime-injected beacon, web-only
Dependency @vercel/analytics removed from package.json + lockfile
Privacy page "hosted on Vercel" "hosted on Cloudflare Pages" + cookieless-analytics disclosure
Docs new docs/runbooks/deploying-the-website.md; architecture host row updated

The beacon is gated by !isTauri() and a build-time VITE_CF_BEACON_TOKEN, so it can never ship into the desktop build. SPA deep-link routing is preserved via _redirects (confirmed present in dist after build:web).

Test plan

  • npm run build:web — clean; dist/_redirects present
  • npx tsc --noEmit — clean
  • npx biome check . — clean (1 pre-existing unrelated CSS !important warning)
  • npx vitest --run425 pass (3 new for CloudflareAnalytics: no-token, token-present, dedup)
  • Post-merge, account-side: create CF Pages project, set VITE_CF_BEACON_TOKEN, cut DNS over, decommission Vercel (steps in the new runbook)

⚠️ Note (out of scope)

main CI is already red from a pre-existing cargo fmt drift in src-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

exitzerolabs-admin and others added 3 commits June 28, 2026 17:01
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>
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threat-forge Ready Ready Preview, Comment Jun 28, 2026 9:09pm

Request Review

@exitzerolabs-admin exitzerolabs-admin merged commit be1cafd into main Jun 28, 2026
5 of 6 checks passed
@exitzerolabs-admin exitzerolabs-admin deleted the chore/migrate-vercel-to-cloudflare branch June 28, 2026 21:26
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.

1 participant