Back to Home

Setup Guide

Follow these steps to connect your Sports Disruptors platform to a PostgreSQL database and get everything running on Vercel.

Step 1: Create a Free Neon PostgreSQL Database

Go to neon.tech and create a free account. Then create a new project and database. Neon provides a generous free tier with serverless PostgreSQL that works perfectly with Vercel.

Step 2: Copy the Connection String

In your Neon dashboard, go to Connection Details. Copy the connection string — it will look like: postgresql://user:pass@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require

Step 3: Add Environment Variables to Vercel

In your Vercel project settings, go to Settings → Environment Variables and add:

  • DATABASE_URL — Your Neon pooled connection string
  • DIRECT_URL — Your Neon direct connection string (for migrations)

Step 4: Add OPENAI_API_KEY

Get an API key from platform.openai.com and add it as OPENAI_API_KEY in your Vercel environment variables. This powers the AI content generation pipeline.

Step 5: Redeploy

After adding all environment variables, trigger a new deployment in Vercel. The app will automatically run prisma generate during the build. Then run npx prisma db push to create the database tables.

Environment Variables Reference

DATABASE_URLRequired

PostgreSQL connection string (pooled/transaction mode)

postgresql://user:pass@ep-xxx.us-east-2.aws.neon.tech/sports_disruptors?sslmode=require

DIRECT_URLRequired

PostgreSQL direct connection string (for Prisma Migrate)

postgresql://user:pass@ep-xxx.us-east-2.aws.neon.tech/sports_disruptors?sslmode=require

OPENAI_API_KEYRequired

OpenAI API key for AI-powered content generation

sk-...

NEXTAUTH_SECRETRequired

Secret for NextAuth.js session encryption

Generate with: openssl rand -base64 32

NEXTAUTH_URLRequired

Your production URL

https://your-domain.vercel.app

CRON_SECRETRequired

Secret to protect cron API endpoints

Generate a random string

OPENAI_MODELOptional

Primary OpenAI model for article rewrites

gpt-4o-mini

OPENAI_BULK_MODELOptional

Secondary model for bulk content generation

gpt-4o-mini

RESEND_API_KEYOptional

Resend API key for email newsletters

re_...

All Set?

Once your database is connected and the app is redeployed, seed the database with initial data by running: npx prisma db push && npx tsx prisma/seed.ts

Go to Homepage