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

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 Optimize

The optimize folder contains examples of projects using Prisma Optimize to identify and improve the performance of slow queries.

DemoDescription
starterA Prisma Optimize starter app
optimize-excessive-rowsAn example app demonstrating the "Excessive number of rows returned" recommendation provided by Optimize.
optimize-full-table-scanAn example app demonstrating the "Full table scans caused by LIKE operations" recommendation provided by Optimize.
optimize-unindexed-columnAn example app demonstrating the "Query filtering on an unindexed column" recommendation provided by Optimize.

Prisma ORM

Fullstack

DemoDescription
nextjs-api-routesNext.js app with a REST API (using Next.js API routes)
nextjs-graphqlNext.js app with a GraphQL API (using Apollo Server and GraphQL Nexus)
nextjs-trpcNext.js app with tRPC
nuxtNuxt.js app with a REST API
sveltekitSvelteKit app using SvelteKit's actions and load functions
remixRemix app
nuxt-prisma-moduleA nuxt example app using the Prisma Nuxt module

Backend only

DemoDescription
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
fastify-graphqlGraphQL server based on Fastify, Mercurius, and the SDL-first approach of graphql-tools
fastify-graphql-sdl-firstGraphQL server based on Fastify, Mercurius, and the SDL-first approach of graphql-tools
hapi-graphqlGraphQL server based on Hapi and Nexus Schema
hapi-graphql-sdl-firstGraphQL server based on Hapi and the SDL-first approach of Apollo Server Integration for Hapi
nest-graphqlGraphQL server based on NestJS (code-first)
nest-graphql-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
expressREST API with Express
fastifyREST API with Fastify
koaREST API with Koa
hapiREST API with hapi
nestREST API with NestJS
scriptUsage of Prisma Client JS in a TypeScript script
testing-expressDemo of integration tests with Jest, Supertest and Express

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)

Security

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