-
Install PostgreSQL (if not already installed):
- macOS:
brew install postgresql - Ubuntu/Debian:
sudo apt-get install postgresql - Windows: Download from https://www.postgresql.org/download/windows/
- macOS:
-
Start PostgreSQL:
- macOS:
brew services start postgresql - Linux:
sudo systemctl start postgresql - Windows: Start from Services
- macOS:
-
Create Database:
# Connect to PostgreSQL psql -U postgres # Create database CREATE DATABASE mcp_eval_db; # Exit \q
-
Update Environment Variables:
- Copy
.env.exampleto.env - Update
DATABASE_URLwith your PostgreSQL connection string - Default:
postgresql://postgres:postgres@localhost:5432/mcp_eval_db
- Copy
-
Run Database Migrations:
Option A - Using Push (Recommended for development):
# Push schema directly to database without generating migration files pnpm drizzle-kit pushOption B - Using Migrations (Recommended for production):
# Generate migration files pnpm drizzle-kit generate # Apply migrations to database pnpm drizzle-kit migrate
Other useful commands:
# Pull schema from existing database pnpm drizzle-kit pull # Check migration consistency pnpm drizzle-kit check
For production deployment on Vercel:
- Add a PostgreSQL database (e.g., Vercel Postgres, Supabase, or Neon)
- Add
DATABASE_URLenvironment variable in Vercel project settings - Deploy as usual
The Customer Information Form now:
- Saves submissions to PostgreSQL database
- Returns a unique submission ID
- Displays submission data on the result page by fetching from database
- No longer uses sessionStorage