Skip to content

feat(web): serve the SvelteKit app on cryptly.dev via Vercel - #57

Merged
szymeo merged 1 commit into
mainfrom
szymeo/svelte-migration-not-live
Oct 11, 2026
Merged

szymeo merged 1 commit into
mainfrom
szymeo/svelte-migration-not-live

Conversation

@szymeo

@szymeo szymeo commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Why

`cryptly.dev` still serves the React app. The Svelte app (#52) targets Cloudflare Workers, but DNS points at Vercel and nothing deploys `apps/web`. Vercel builds every push from the repo (root dir `frontend/`), so a committed `vercel.json` can switch what it ships without dashboard access.

What

  • `frontend/vercel.json`: build `apps/web` and move its `.vercel/output` (Build Output API) into `frontend/`. Drops the React SPA rewrite.
  • `apps/web/svelte.config.js`: `adapter-vercel` when `VERCEL=1` (set by Vercel builds), Cloudflare otherwise.
  • `public-env.ts`: `$env/dynamic/public` -> `$env/static/public` (inlined at build). Vercel only has the React `VITE_` vars, so runtime `PUBLIC_` would be empty. Dev fallbacks unchanged.
  • `apps/web/.env.production`: prod public values (moved from `wrangler.jsonc` vars).
  • Docs: README, AGENTS/CLAUDE.md, cutover runbook.

Verified locally

  • Ran the exact `buildCommand` from `frontend/` with `VERCEL=1`, served the output: `/`, `/blog`, `/app/`, `/invite/` render; Google sign-in uses the prod client id and `https://cryptly.dev/app/callbacks/oauth/google\`.
  • `pnpm check`, `pnpm lint`, default (Cloudflare) `pnpm build` pass.

Rollback

Revert this PR; Vercel rebuilds the React app on the next push.

Note: PostHog analytics stop on cutover (the Svelte app dropped `posthog-js` in #52).

Vercel (root dir frontend/) builds every push but still shipped the React app.
frontend/vercel.json now builds apps/web with adapter-vercel and hands Vercel
its Build Output API directory. Public env moves to build-time static env so it
works without dashboard env vars; prod values live in apps/web/.env.production.
@vercel

vercel Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cryptly Ready Ready Preview Oct 11, 2026 8:24pm UTC

@szymeo
szymeo merged commit 80104b7 into main Oct 11, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 8303c27b Deployed Oct 11, 2026 by vercel[bot]
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