Build high-performance and type-safe Next.js apps with Prisma’s developer-friendly database tools: The world’s most popular TypeScript ORM and the first serverless database without cold starts.
Try Next.js with PrismaBuilt on unikernels, Prisma Postgres runs on bare metal servers for peak performance and infinite scalability.
The first serverless database with pay-as-you-go pricing, no infrastructure management, and zero cold starts.
Display your data using client-side rendering, server-side rendering and static site generation.
Add a cache strategy to any database query and its results will be cached close to your users for peak performance and UX.
Pairing Prisma with Next.js ensures your app is coherently typed, from the database to your React components.
Both Next.js and Prisma have vibrant communities where you find support, fun events and amazing developers.
Prisma’s database tools are the perfect fit for building Next.js applications. They serve as the data access layer for Server Components (both static and dynamic), Server Actions, Route Handlers, and standalone services.
Next.js 13+ introduced a fundamental shift in how we handle data fetching. Server Components, which are the default in the App Router, allow you to fetch data directly in your components without extra wrappers or special functions. This means you can use Prisma directly in your components and automatically get static generation when possible.
Here's how to implement a blog page that's statically generated at build time. The data fetching happens server-side, and the HTML is generated once during build.
// app/blog/[slug]/page.tsximport { PrismaClient } from '@prisma/client'const prisma = new PrismaClient()// Return a list of `params` to populate the [slug] dynamic segmentexport async function generateStaticParams() {const posts = await prisma.post.findMany()return posts.map((post) => ({slug: post.slug,}))}// Multiple versions of this page will be statically generated// using the `params` returned by `generateStaticParams`export default async function Page({ params }: { params: { slug: string } }) {// Fetch the post based on slugconst post = await prisma.post.findUnique({where: { slug: params.slug },})// Simple demo renderingreturn (<div><h1>{post?.title || 'Post not found'}</h1><p>{post?.content || 'No content available'}</p></div>)}
Next.js 13+ introduced a fundamental shift in how we handle data fetching. Server Components, which are the default in the App Router, allow you to fetch data directly in your components without extra wrappers or special functions. This means you can use Prisma directly in your components and automatically get static generation when possible.
Here's how to implement a blog page that's statically generated at build time. The data fetching happens server-side, and the HTML is generated once during build.
// app/blog/[slug]/page.tsximport { PrismaClient } from '@prisma/client'const prisma = new PrismaClient()// Return a list of `params` to populate the [slug] dynamic segmentexport async function generateStaticParams() {const posts = await prisma.post.findMany()return posts.map((post) => ({slug: post.slug,}))}// Multiple versions of this page will be statically generated// using the `params` returned by `generateStaticParams`export default async function Page({ params }: { params: { slug: string } }) {// Fetch the post based on slugconst post = await prisma.post.findUnique({where: { slug: params.slug },})// Simple demo renderingreturn (<div><h1>{post?.title || 'Post not found'}</h1><p>{post?.content || 'No content available'}</p></div>)}
Learn how to build a fullstack Next.js 15 app with Prisma Postgres from scratch! This tutorial starts with bootstrapping an app using create-next-app
and provides step-by-step instructions for gradually adding adds more functionality using Prisma Postgres as a database.
This demo for a blogging application demonstrates how to build login and functionality using Prisma Postgres and Next.js 15. It uses “Login with GitHub” by default and can easily be expanded to other authentication providers.
Next.js and Prisma is the ultimate combo if you need a database in React apps! 🚀
A starter template for modern SaaS apps! next-forge comes with Next.js 15, auth, DB & ORM, payments, docs, blog, o11y, analytics, emails, and a lot more, to save you the initial boilerplate for your next Next.js SaaS app.
Learn best practices for using Prisma with Next.js App Router! Explore server components, server actions, and edge middleware, plus efficient querying, handling migrations, and deploying to Vercel. Perfect your database workflow and scale seamlessly!
t3 is a web development stack focused on simplicity, modularity, and full-stack type safety. It includes Next.js, tRPC, Tailwind, TypeScript, Prisma and NextAuth.
Blitz.js is an application framework that is built on top of Next.js and Prisma. It brings back the simplicity and conventions of server-rendered frameworks like Ruby on Rails while preserving everything developers love about React and client-side rendering.
This comprehensive 4-hour tutorial teaches you how to build a fullstack form application. The form will be responsive, allow for drag & drop functionality, features different kinds of layout fields like titles, subtitles and paragraphs as well various kinds of field types like text, number, dropdowns, dates, checkbox and text areas.
We have multiple channels where you can engage with members of our community as well as the Prisma team.
Browse the Prisma source code, send feedback, and get answers to your technical questions.
Find moreStay updated, engage with our team, and become an integral part of our vibrant online community.
Find moreStay updated, engage with our team, and become an integral part of our vibrant online community.
Find more