Prerequisites
Before you begin, make sure you have the following:- Node.js v18 or later
- pnpm package manager
- A PostgreSQL database (e.g. local Postgres, Neon, or Supabase)
- An OpenAI API key — used for the default
gpt-4ochat model - A Fireworks AI API key — used for reasoning models
Set up environment variables
Copy
.env.example to .env.local and fill in your values:BLOB_READ_WRITE_TOKEN and POSTGRES_URL are created automatically when you deploy to Vercel and add the Vercel Blob and Vercel Postgres storage integrations. For local development, create these resources manually and paste the connection values here.Run database migrations
Drizzle reads
POSTGRES_URL from .env.local and applies the schema defined in lib/db/schema.ts:Migrations are also run automatically as part of
pnpm build (tsx lib/db/migrate && next build), so you only need to run this command explicitly during local development.Start the development server
next dev --turbo) for fast local rebuilds.Open the app and create an account
Navigate to http://localhost:3000 in your browser.Register a new account, then start a conversation to verify everything is working.