Database Setup
NextGenKit uses Prisma 7 with PostgreSQL. We recommend Neon for serverless PostgreSQL.
Option A: Neon (Recommended)
- Create a free account at neon.tech
- Create a new project and database
- Copy the connection string to
DATABASE_URLin.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
- Edit
prisma/schema.prisma - Run
pnpm db:migrateto create a migration - The Prisma client auto-regenerates — import from
@/lib/db
import { db } from "@/lib/db"
const users = await db.user.findMany()