Quick setup guide for Windows and Mac.
- Docker Desktop installed and running
- Node.js 18+
- pnpm (
npm install -g pnpm)
# Start PostgreSQL in Docker
docker-compose up -d
# Verify it's running
docker-compose ps# Copy example env file
cp .env.example .env.local
# Edit .env.local and fill in:
# - AUTH_SECRET (generate at https://generate-secret.vercel.app/32)
# - XAI_API_KEY (from https://console.x.ai)
# - POSTGRES_URL=postgresql://chatbot:chatbot@localhost:5432/chatbot
# (Optional) AI_GATEWAY_API_KEY if you want to proxy through Vercel AI Gateway# Install packages
pnpm install
# Run database migrations
pnpm db:migratepnpm dev# Stop database
docker-compose down
# Stop and remove all data
docker-compose down -v
# View database logs
docker-compose logs -f postgres
# Open Drizzle Studio (database UI)
pnpm db:studioStop any existing PostgreSQL or change the port in docker-compose.yml:
ports:
- "5433:5432" # Use 5433 insteadThen update POSTGRES_URL to use port 5433.
Make sure Docker Desktop is running and the container is up:
docker-compose ps
docker-compose up -dCheck your POSTGRES_URL is correct and the database is running.