Prisma Next is in early access.Read the docs
Quickstart

PostgreSQL

Create a new Prisma Next project with PostgreSQL using create-prisma@next.

Create a Prisma Next app with PostgreSQL, seed it, and run your first query.

Quick start

bunx create-prisma@next --provider postgres

Run this from a Node.js 24 or newer environment. The command preselects PostgreSQL, so you can focus on the template and database URL prompts. Pick Prisma Postgres if you want setup to create the database for you, or paste your own DATABASE_URL.

Setup gives you the app template, a starter contract, prisma-next.md, project-level Prisma Next skills for your coding agent, and package scripts for the database steps below.

If you use your own database, keep the connection string ready before you start.

1. Check the database connection

Open .env and confirm that DATABASE_URL points to the PostgreSQL database you want Prisma Next to use.

.env
DATABASE_URL="postgresql://username:password@host:5432/database?sslmode=require"

If you chose Prisma Postgres during setup, this value is already written for you. If you pasted your own connection string, keep it in .env and do not hardcode it in application code.

2. Initialize the database

From the generated project directory, run db:init to apply the starter schema to PostgreSQL and sign the database.

bun run db:init

3. Seed data

db:seed inserts sample users so the first query has data to show.

bun run db:seed

4. Run the app

Start the app and confirm the sample query runs successfully.

bun run dev

Use the URL or terminal output shown by your template. You should see the seeded users returned from PostgreSQL.

Next steps

  • Open src/prisma/contract.prisma or src/prisma/contract.ts and change the starter model.
  • Use the PostgreSQL existing-project guide if you already have an app and database.
  • Read the Prisma Next overview when you want the concepts behind contracts, query APIs, and migrations.

On this page