Skip to content

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:

  1. direct-vps-proof.md
  2. production-checklist.md

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

  1. Push Code: Ensure your latest changes are pushed to GitHub main branch.
  2. Login to Vercel: Go to vercel.com and log in.
  3. Add New Project: Click "Add New..." -> "Project".
  4. Import Git Repository: Select careconnect.
  5. Configure Project:

  6. Framework Preset: Next.js (Should auto-detect).

  7. Root Directory: ./ (Default).
  8. Build Command: next build (Default: npm run build is fine too).

  9. Environment Variables (Crucial):

  10. Expand the "Environment Variables" section.

  11. Add OPENAI_API_KEY = sk-... (Recommended for AI features, though core search can run without it).
  12. Add NEXT_PUBLIC_SUPABASE_URL = https://... (Your Supabase Project URL).
  13. Add NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY = sb_publishable_... (Your Supabase Publishable Key).
  14. Reason: The build process may check environment variable types.

  15. Deploy: Click "Deploy".

  16. Data Integrity Check (Mandatory): After any data migration or deployment, run this script locally to ensure the database is healthy:

npm run db:verify

Expect " Verification PASSED"

3. Database Indexing (Zero-Downtime)

To ensure zero-downtime when creating indexes on large tables, use the provided concurrent indexing script:

  1. Access Supabase SQL Editor or CLI.
  2. Run the Script:
    supabase db execute < supabase/scripts/create-indexes-concurrently.sql
    
    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.ts and hooks are committed.
  • No Lightning Bolt: Open Browser Console (F12). Look for network errors fetching the .onnx model file.