Supabase Region Migration
Move CE Pro to a new Supabase region without missing auth, storage, mobile, or stress-validation work.
Supabase Region Migration
Moving CE Pro to a new Supabase project is not just a database copy.
The production stack currently depends on Supabase through:
- web runtime envs and service-role helpers
- hosted Auth callbacks and redirect allow-lists
- storage buckets and signed upload/download flows
- Supabase Edge Functions
- mobile Supabase config and mobile function invocation
CE Pro moved production Supabase traffic from Oregon to East US / North Virginia (us-east-1) on April 26, 2026. The active production Supabase project is yoztbemocmsljwgqqtgr, which keeps Supabase close to the Vercel Washington, D.C. / Virginia (iad1) runtime.
Current Production State
- Production Vercel is deployed from the East-backed build
rolling-suds-estimator-lp7cuq1as-mattclawdbot-9929s-projects.vercel.app. - Final cutover validation showed row-count parity across critical
public,auth, and storage metadata tables. - Post-cutover audit validation repaired East constraint drift for holiday follow-up sequences, Meta/Google Ads connector providers, lead assignment foreign keys, and the lead intake timestamp index.
- Storage object validation copied and verified 80 objects totaling 34,782,472 bytes; the audit also downloaded all 80 East objects and matched the expected byte total.
- Supabase Auth hosted settings, redirect allow-list, SMTP sender settings, Edge Functions, and function secrets were recreated on the East project.
- Production health checks now return
status: okwith Supabase reachable from Verceliad1. - Local web
.env.localwas realigned to the East Supabase URL and keys; direct DB migration pushes still need the EastSUPABASE_DB_PASSWORDavailable for the Supabase CLI. - Mobile EAS hosted environments for
development,preview, andproductionnow setEXPO_PUBLIC_SUPABASE_URLandEXPO_PUBLIC_SUPABASE_ANON_KEYto the East project; ignored local mobile.envfiles were realigned too. - The deployed
ai-assistantSupabase Edge Function now falls back toOPENAI_API_KEYwhenGOOGLE_AI_API_KEYis not configured, matching the active web admin AI route's OpenAI-backed provider.
Cutover Checklist
Before switching traffic:
- Create the new hosted project in East US / North Virginia (
us-east-1) and capture the new project ref, API URL, anon key, service-role key, and DB/pooler strings. - Recreate the hosted Auth settings on the new project, including the production
site_url, redirect allow-list, session limits, refresh rotation, and OTP expiry settings CE Pro expects. - Apply the full schema and deploy the required Supabase Edge Functions to the new project.
- Recreate the storage buckets CE Pro needs and copy storage objects, not just tables.
- Update the web app envs, mobile envs, and any local ops/scripts that still point to the old project.
- Drain or pause background jobs and webhook delivery work before the final delta copy so you do not process the same workload in two places.
- Run smoke checks, then rerun the stress harness against the
us-east-1stack before calling the move complete.
Repo Audit Highlights
The repo has a few migration-sensitive surfaces worth calling out explicitly.
Web app
The main web runtime is env-driven, so the core cutover values are:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEY
Those values drive the shared Supabase bootstrap paths, auth callback route, middleware session handling, direct proposal-view tracking, and script helpers.
Mobile
The mobile app has its own Supabase coupling and should be treated as a first-class migration surface.
- The runtime reads
EXPO_PUBLIC_SUPABASE_URLandEXPO_PUBLIC_SUPABASE_ANON_KEY. mobile/eas.jsonnow selects the matching EAS environment instead of committing a Supabase project URL or anon key.- Verify
EXPO_PUBLIC_SUPABASE_URLandEXPO_PUBLIC_SUPABASE_ANON_KEYare present in the EASdevelopment,preview, andproductionenvironments before rebuilding. - Update ignored local mobile
.envfiles during future cutovers so device testing does not keep talking to the previous region. - The mobile app invokes Supabase Functions directly, including
send-proposal.
If the mobile EAS environments or local mobile env files stay pointed at the previous project, the migration is only half-done.
Local CLI state
Before running migrations against the new project, confirm local Supabase CLI metadata is internally consistent.
supabase/.temp/project-refsupabase/.temp/pooler-urlsupabase/.temp/linked-project.json
A mismatch between those files means the local CLI has not been cleanly relinked yet.
Auth redirects
CE Pro generates hosted auth links for:
- password reset
- team invite/setup
- customer magic-link login
- super-admin reset flows
That means the new Supabase project must have the correct hosted redirect allow-list for the production app origin and the /auth/callback and /auth/complete flows CE Pro uses.
Storage buckets
At minimum, verify the currently active hosted buckets:
bug-report-screenshotsproposal-photosproposals
Some of these are called out in repo migrations as manual bucket-creation steps on a fresh project, so do not assume db push alone makes storage ready.
Post-migration Validation
Run this in order:
GET /api/health- admin login, customer login, forgot-password, and invite flows
- admin Jobs, Invoices, Services, Lead Sources, and Tags reads
- job-photo and attachment upload/download
- proposal send and proposal-view tracking
- webhook smoke tests for the providers you actively use
Also verify:
- background-job queue health
- webhook-delivery health
- no missing Edge Functions on the new project
Stress Test Rerun
After the smoke checks, rerun the same stress harness used during the scale-hardening work.
Small shakeout:
STRESS_BASE_URL=https://cleanestimate.pro \
STRESS_ADMIN_COOKIE_FILE=.secrets/va-admin-cookies.txt \
STRESS_CRON_SECRET=replace-me \
npm run test:stress -- --stages='[{"name":"shakeout","sessions":10,"durationSec":120}]'Then the full 1k-ready profile:
STRESS_BASE_URL=https://cleanestimate.pro \
STRESS_ADMIN_COOKIE_FILE=.secrets/va-admin-cookies.txt \
STRESS_CRON_SECRET=replace-me \
npm run test:stressThe March 22, 2026 stabilized Oregon-backed baseline was:
- error rate
1.70% - overall
p952465ms - health
p95351ms
The us-east-1 cutover should at minimum preserve correctness and improve that latency ceiling.
Related Guides
Related articles
Was this article helpful?
Still need help? Contact support