Database Setup

NextGenKit uses Prisma 7 with PostgreSQL. We recommend Neon for serverless PostgreSQL.

Option A: Neon (Recommended)

  1. Create a free account at neon.tech
  2. Create a new project and database
  3. Copy the connection string to DATABASE_URL in .env.local

Option B: Local PostgreSQL

# macOS with Homebrew
brew install postgresql@16
brew services start postgresql@16

# Create database
createdb nextgenkit

# Connection string
DATABASE_URL="postgresql://localhost:5432/nextgenkit"

Push Schema

# Development — push schema directly (no migration files)
pnpm db:push

# Production — create and apply migrations
pnpm db:migrate

Seed Data

pnpm db:seed

Prisma Studio

pnpm db:studio

Opens a visual editor for your database at localhost:5555.

Adding Models

  1. Edit prisma/schema.prisma
  2. Run pnpm db:migrate to create a migration
  3. The Prisma client auto-regenerates — import from @/lib/db
import { db } from "@/lib/db"

const users = await db.user.findMany()