Prisma Next is a ground-up TypeScript rewrite of Prisma ORM, designed for composability, extensibility, and AI-assisted workflows. Instead of generating an opaque runtime client, Prisma Next emits a deterministicDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/prisma/prisma-next/llms.txt
Use this file to discover all available pages before exploring further.
contract.json and TypeScript types that serve as a stable, machine-readable contract between your schema and your queries.
Quickstart
Go from schema to your first type-safe query in minutes.
Installation
Install
prisma-next and the Postgres facade package.Core concepts
Understand the contract-first model that powers Prisma Next.
CLI reference
Full reference for every
prisma-next command.How it works
Prisma Next follows a three-step contract-first workflow:Define your schema
Write your data model in PSL (Prisma Schema Language) or TypeScript builders.
schema.psl
Emit the contract
Run
prisma-next contract emit to produce a deterministic contract.json and contract.d.ts. No executable code is generated — only data and types.Key features
Contract-first design
Schema emits a deterministic
contract.json + TypeScript types. No generated runtime client — just data and types.Two query APIs
Fluent ORM client for model-level access and a composable SQL DSL for lower-level control. Both are fully type-safe.
Runtime verification
Cryptographic hash checks detect schema drift before any query runs, catching mismatches at startup.
Extension packs
Add pgvector, PostGIS, CipherStash, and more without touching core. Each pack contributes codecs, operations, and migration support.
Serverless-ready
Dedicated per-request facade for Cloudflare Workers, AWS Lambda, Vercel Edge, Deno Deploy, and Bun.
Migration system
Contract-to-contract migration graph with planner, runner, preflight verification, and multi-environment refs.