Version: 1.2.0
Last Updated: 2026-03-16
Overview
This guide documents the Vercel deployment configuration for the Encore OS Platform. The project uses Vercel for hosting the frontend application with environment-specific configurations.Project Configuration
Vercel Project Details
Deployment URLs
Environment Variables
Important: Same Supabase URL, Different Keys
Note: TheThis is the expected configuration for Supabase branching. The anon key determines which branch’s data you access.VITE_SUPABASE_URLbeing the same across all environments is CORRECT. We use Supabase Branching (not separate projects), which means:
- Same base URL:
https://anuwknikgsijbameytzr.supabase.co- Different anon keys per branch (critical for data isolation)
- Data is isolated per branch; only migrations sync on merge
Required Variables
These environment variables must be configured in the Vercel dashboard for each environment:Production
Preview/Staging
Development
Sentry (error tracking and source maps)
For browser error capture and session replay, setVITE_SENTRY_DSN (from Sentry project → Settings → Client Keys). If unset, the client disables Sentry and no events are sent.
For readable stack traces in production, set these build-time variables in Vercel so the Vite build uploads source maps:
When all three are set,
vite.config.ts enables @sentry/vite-plugin and uploads source maps during npm run build. Omit for local builds if you do not need source map upload.
Environment Variable Scopes
*Optional for basic error capture; required for readable stack traces (source map upload).
Setting Environment Variables
- Go to Vercel Dashboard
- Select the
cloud-migration-pathproject - Navigate to Settings → Environment Variables
- Add each variable with the appropriate scope
Branch-to-Environment Mapping
Git Integration
Environment Configuration
Preview Deployments
Every pull request automatically receives a preview deployment with:- Unique URL based on branch name
- Preview environment variables
- Staging Supabase database connection
Local Development
Initial Setup
-
Install Vercel CLI (optional):
-
Link Project (optional):
-
Pull Environment Variables (optional):
Local Environment File
Create.env.local for local development:
vercel.json Configuration
The project usesvercel.json for build and deployment configuration:
Key Settings
Verification
Using Verification Script
Using Vercel MCP
For AI-assisted verification, use these MCP commands:Verification Checklist
-
vercel.jsonexists and is valid - Custom domains configured:
-
northsightrecovery.app→ main branch (Production) -
northsightrecovery.dev→ staging branch (Staging)
-
- DNS records configured for both domains
- Environment variables set for all environments:
- Production (main branch)
- Staging (staging branch)
- Preview (all other branches)
- Sentry:
VITE_SENTRY_DSNset for Production and Preview (enables browser error capture). OptionallySENTRY_AUTH_TOKEN,SENTRY_ORG,SENTRY_PROJECTfor source map upload during build. - Preview deployments working for feature branches
- Supabase URLs point to correct projects/branches
- Build succeeds without errors
- SPA routing works correctly
Deployment
Automatic Deployments
Deployments are triggered automatically when:- Pushing to
mainbranch (Production) - Pushing to any other branch (Preview)
- Opening/updating pull requests
Manual Deployments
Using Vercel CLI:Troubleshooting
Build Failures
- Check build logs in Vercel dashboard
- Verify environment variables are set
- Run local build:
npm run build - Check for TypeScript errors:
npm run typecheck
Environment Variable Issues
- Verify variable names match
VITE_prefix - Check variable scopes (Production/Preview/Development)
- Redeploy after changing variables
Preview URL Not Working
- Check deployment status in Vercel dashboard
- Verify branch name is valid
- Wait for deployment to complete (check progress)
SPA Routing Issues
Ensurevercel.json has the rewrite rule:
Security Considerations
Environment Variables
- ⚠️ Never commit
.env.localor secrets to Git - ⚠️ Use scoped variables (don’t expose production keys in preview)
- ⚠️ Rotate keys if accidentally exposed
Access Control
- Only team members can access Vercel dashboard
- Preview deployments may be publicly accessible
- Consider enabling Vercel Authentication for staging
Domain Configuration
Custom Domains Setup
The following custom domains need to be configured in Vercel:Configuring Custom Domains
- Go to Project Settings → Domains
- Add
northsightrecovery.app- Set as Production Domain
- Configure DNS records as instructed
- Add
northsightrecovery.dev- Assign to
stagingbranch - Configure DNS records as instructed
- Assign to
DNS Configuration
For each domain, configure these DNS records at your registrar: A Record (Root Domain):Related Documentation
- Pre-Migration Test Plan (archived 2026-01 migration) - Comprehensive verification tests
- Pre-Migration Checklist (archived 2026-01 migration) - Dashboard verification steps
- Supabase Setup
- Staging Setup Guide (archived 2026-01 migration)
- Supabase MCP Usage
- Sentry Verification Runbook - Confirm errors and source maps in Sentry after deploy