Weekly Planner
Deploy

Vercel (app)

SPA rewrites, headers, env scopes, and OG URL injection for the product app.

Vercel (app)

vercel.json at repo root:

  • framework: "vite", trailingSlash: false
  • Rewrites: /api/(.*) → API; everything else (except API) → /index.html
  • Security headers: X-Content-Type-Options, Referrer-Policy
  • Long cache for hashed assets; no-cache for service worker / workbox / manifest

Do not enable cleanUrls — breaks SPA fallback to /index.html.

Environment (Preview + Production)

VariableWhy
INSTANT_ADMIN_TOKEN/api/invite, /api/share-meta
INSTANT_APP_IDAdmin SDK (or VITE_INSTANT_APP_ID)
SITE_URLOptional absolute origin for OG tags on custom domains

Vite injects social URLs from SITE_URLVERCEL_PROJECT_PRODUCTION_URLVERCEL_URL.

PWA notes

App shell precached; /api/* denied from navigate fallback; fonts CacheFirst. Instant owns offline app data via IndexedDB.

On this page