Home

Awesome

<br /> <div align="center"> <h1>Prisma Examples</h1> <p><h3 align="center">Ready-to-run Prisma example projects 🚀</h3></p> <a href="https://www.prisma.io/">Website</a> <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span> <a href="https://www.prisma.io/docs/">Docs</a> <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span> <a href="https://www.prisma.io/blog">Blog</a> <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span> <a href="https://pris.ly/discord/">Discord</a> <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span> <a href="https://twitter.com/prisma">Twitter</a> <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span> <a href="https://www.youtube.com/watch?v=0RhtQgIs-TE&list=PLn2e1F9Rfr6k9PnR_figWOcSHgc_erDr5&index=1">Demo videos</a> </div> <hr> <div align="center">

test keep-prisma-dependencies-updated keep-dev-branches-in-sync-with-latest

View full CI status

</div> <hr>

This repository contains a number of ready-to-run example projects demonstrating various use cases of Prisma. Pick an example and follow the instructions in the corresponding README.

You can also find links to real-world and production ready examples further below in this README.

Are you missing an example? Please feel free to open an issue (read the contribution guidelines for more info).

<!-- Please keep the absolute URLs so it's easier to copy&paste to prisma/prisma/README.md -->

Prisma Accelerate

The accelerate folder contains examples of projects using Prisma Accelerate for connection pooling and global caching.

DemoDescription
nextjs-starterA Next.js project using Prisma Accelerate's caching and connection pooling
svelte-starterA SvelteKit project using Prisma Accelerate's caching and connection pooling
solidstart-starterA Solidstart project using Prisma Accelerate's caching and connection pooling
remix-starterA Remix project using Prisma Accelerate's caching and connection pooling
nuxt-starterA Nuxt.js project using Prisma Accelerate's caching and connection pooling
astro-starterAn Astro project using Prisma Accelerate's caching and connection pooling

Prisma Pulse

The pulse folder contains examples of projects using Prisma Pulse to listen to real-time database change events.

DemoDescription
starterA Prisma Pulse starter app
email-with-resendAn example app to send emails to new users using Prisma Pulse and Resend
fullstack-leaderboardA live leaderboard (built with Next.js)
fullstack-simple-chatA simple chat app (built with Next.js & Express)
product-search-with-typesenseA cron job that syncs data into Typesense (built with Hono.js)
data-sync-with-bigqueryA script that automatically syncs data into Google BigQuery

Prisma ORM (TypeScript)

Fullstack

DemoDescription
rest-nextjs-api-routesNext.js app with a REST API (using Next.js API routes)
rest-nextjs-api-routes-authNext.js app with a REST API (using Next.js API routes) and authentication (using NextAuth.js)
rest-nextjs-expressNext.js app with a REST API (using Express)
rest-nuxtjsNuxt.js app with a REST API
graphql-nextjsNext.js app with a GraphQL API (using Apollo Server and GraphQL Nexus)
rest-sveltekitSvelteKit app with a REST API
sveltekitSvelteKit app using SvelteKit's actions and load functions
trpc-nextjsNext.js app with tRPC
remixRemix app
nuxt-prisma-nuxt-moduleA nuxt example app using the Prisma Nuxt module

Backend only

DemoDescription
graphql-apollo-serverGraphQL server based on @apollo/server and Nexus Schema
graphql-authGraphQL server with email-password authentication & permissions
graphql-sdl-firstGraphQL server based on GraphQL Yoga
graphql-subscriptionsGraphQL server with realtime subscriptions based on apollo-server and Nexus Schema
graphql-typegraphqlGraphQL server based on @apollo/server and TypeGraphQL
graphql-typegraphql-crudCRUD GraphQL API based on @apollo/server and TypeGraphQL
graphql-fastifyGraphQL server based on Fastify, Mercurius, and the SDL-first approach of graphql-tools
graphql-fastify-sdl-firstGraphQL server based on Fastify, Mercurius, and the SDL-first approach of graphql-tools
graphql-hapiGraphQL server based on Hapi and Nexus Schema
graphql-hapi-sdl-firstGraphQL server based on Hapi and the SDL-first approach of Apollo Server Integration for Hapi
graphql-nestjsGraphQL server based on NestJS (code-first)
graphql-nestjs-sdl-firstGraphQL server based on NestJS and the SDL-first approach of graphql-tools
graphqlGraphQL server based on GraphQL Yoga and Pothos
graphql-nexusGraphQL server based on @apollo/server and Nexus Schema
grpcgRPC API including runnable client scripts for testing
postgis-expressDemo of spatial queries using Postgis and Express
rest-expressREST API with Express
rest-fastifyREST API with Fastify
rest-koaREST API with Koa
rest-hapiREST API with hapi
rest-nestjsREST API with NestJS
scriptUsage of Prisma Client JS in a TypeScript script
testing-expressDemo of integration tests with Jest, Supertest and Express

Prisma ORM (JavaScript / Node.js)

Fullstack

DemoDescription
rest-nextjsNext.js app with a REST API (using Next.js API routes)
rest-nuxtjsNuxtJS app with a REST API
rest-sveltekitSvelteKit app with a REST API

Backend only

DemoDescription
graphql-apollo-serverGraphQL server based on @apollo/server
graphql-authGraphQL server with email-password authentication & permissions
graphql-sdl-firstGraphQL server based on GraphQL Yoga
grpcgRPC API including runnable client scripts for testing
rest-expressREST API with Express
rest-fastifyREST API with Fastify
rest-koaREST API with Koa
scriptUsage of Prisma Client JS in a Node.js script

Deployment platforms

The projects in the deployment-platforms directory show what "Prisma Client"-based deployment setups look like for various deployment providers. Learn more about deployment in the Prisma documentation.

Real-world & production-ready example projects with Prisma

<hr>

Starter kits

Badges

Made with Prisma Made with Prisma

Built something awesome with Prisma? 🌟 Show it off with these badges, perfect for your readme or website.

[![Made with Prisma](http://made-with.prisma.io/dark.svg)](https://prisma.io)
[![Made with Prisma](http://made-with.prisma.io/indigo.svg)](https://prisma.io)

About this repository

The latest branch of this repository contains the examples with the latest stable version of Prisma CLI and Prisma Client (@latest on npm). These dependencies are kept up to date with a GitHub Action workflow, which updates them every time a new version of Prisma is released.

There are also the automated branches dev and patch-dev, which mirror the code from latest (synced via a GitHub Action workflow), but they use the respective development channels of Prisma CLI and Prisma Client from npm instead (@dev and @patch-dev, also updated via a GitHub Action workflow). Thanks to the test coverage of all projects, this can point us to incompatibilities early.

Security

If you have a security issue to report, please contact us at security@prisma.io

CI status

CI StatusBranch
test latestlatest
test devdev
test patch-devpatch-dev
CI Status
keep-prisma-dependencies-updated
keep-dev-branches-in-sync-with-latest