A starter scaffold for a multiplayer cards app using:
npx sv createnpx sv add tailwindcssschema.ts (auth tables + starter game tables)http.ts (auth routes)auth.ts (Google + magic-link providers)auth.config.tsnpm install
convex/_generated/*, and writes .env.local):npx convex dev --once
npm run dev
See AUTH_SETUP.md for how to obtain and configure:
SITE_URLAUTH_GOOGLE_IDAUTH_GOOGLE_SECRETAUTH_RESEND_KEYAUTH_EMAIL_FROMVERCEL_PROJECT_NAME (for preview redirect fallback)VERCEL_PROJECT_URL_ENDING (for preview redirect fallback)@auth/core/providers/google with AUTH_GOOGLE_ID and AUTH_GOOGLE_SECRET.Email provider with authorize: undefined (token-only magic-link flow).SITE_URL is the primary redirect base and default post-auth destination.redirectTo are validated in convex/auth.ts.VERCEL_PROJECT_NAME and ends with VERCEL_PROJECT_URL_ENDING.AUTH_RESEND_KEY / AUTH_EMAIL_FROM are missing, magic-link URLs are logged to console as a dev fallback.<CONVEX_SITE_URL>/api/auth/callback/google (for local dev use .env.local PUBLIC_CONVEX_SITE_URL).This repo uses @sveltejs/adapter-auto and does not require a committed vercel.json by default.
Typical Vercel setup:
SvelteKit (auto-detected)npm run buildPUBLIC_CONVEX_URL, PUBLIC_CONVEX_SITE_URL (production Convex values)PUBLIC_CONVEX_URL, PUBLIC_CONVEX_SITE_URL (matching preview Convex values)SITE_URL, AUTH_*, VERCEL_PROJECT_*) in Convex deployment env, not in Vercel runtime envFor production Convex deploy + web build pipeline:
npx convex deploy --cmd 'npm run build'
For preview redirect fallback, set VERCEL_PROJECT_NAME and VERCEL_PROJECT_URL_ENDING in Convex env.