Legacy Vercel Deployment Guide
Status: Legacy deployment guide.
The repo is being rebaselined away from Vercel dependence. Use this document only if you intentionally need the old Vercel deployment path. Do not treat it as the long-term production baseline.
Current production work should use the active direct-VPS path documented in:
The direct-VPS public cutover completed successfully on 2026-03-11. The app is now live at https://careconnect.ing, with www.careconnect.ing redirecting to the apex and the container bound privately at 127.0.0.1:3300.
This document records the older Vercel deployment path.
1. Prerequisites
- A GitHub account (where this repo is pushed).
- A Vercel account (if you are intentionally using the legacy deployment path).
- Your
OPENAI_API_KEY(Required for the build step).
2. Deploy Steps
- Push Code: Ensure your latest changes are pushed to GitHub
mainbranch. - Login to Vercel: Go to vercel.com and log in.
- Add New Project: Click "Add New..." -> "Project".
- Import Git Repository: Select
careconnect. -
Configure Project:
-
Framework Preset: Next.js (Should auto-detect).
- Root Directory:
./(Default). -
Build Command:
next build(Default:npm run buildis fine too). -
Environment Variables (Crucial):
-
Expand the "Environment Variables" section.
- Add
OPENAI_API_KEY=sk-...(Recommended for AI features, though core search can run without it). - Add
NEXT_PUBLIC_SUPABASE_URL=https://...(Your Supabase Project URL). - Add
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=sb_publishable_...(Your Supabase Publishable Key). -
Reason: The build process may check environment variable types.
-
Deploy: Click "Deploy".
-
Data Integrity Check (Mandatory): After any data migration or deployment, run this script locally to ensure the database is healthy:
Expect " Verification PASSED"
3. Database Indexing (Zero-Downtime)
To ensure zero-downtime when creating indexes on large tables, use the provided concurrent indexing script:
- Access Supabase SQL Editor or CLI.
- Run the Script: Note: Creating indexes CONCURRENTLY can take several minutes but will not lock your tables.
4. Post-Deployment Verification
- Visit the URL provided by the legacy Vercel deployment (for example,
careconnect.vercel.app). - Test Search: Type "Food".
- Success: Results appear instantly.
- Test Semantic Search: Type "I feel empty".
- Success: The "Lightning Bolt" appears after ~10s, and results appear.
4. Troubleshooting
- Build Fail: Check Vercel logs. If it says "Module not found", ensure
app/worker.tsandhooksare committed. - No Lightning Bolt: Open Browser Console (F12). Look for network errors fetching the
.onnxmodel file.