MCPcopy
hub / github.com/prisma/prisma-examples

github.com/prisma/prisma-examples @main sqlite

repository ↗ · DeepWiki ↗
1,727 symbols 3,294 edges 650 files 129 documented · 7%
README

Prisma Examples

Ready-to-run Prisma example projects 🚀

Website   •   Docs   •   Blog   •   Discord   •   Twitter   •   Demo videos


test

View full CI status


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).

Prisma ORM

Fullstack

Demo Description
nextjs Next.js 15 app using the App Router with Prisma Postgres
nextjs-graphql Next.js app with a GraphQL API (using Apollo Server and GraphQL Nexus)
nextjs-trpc Next.js app with tRPC
nuxt Nuxt.js app with a REST API
sveltekit SvelteKit app using SvelteKit's actions and load functions
remix Remix app
nuxt-prisma-module A nuxt example app using the Prisma Nuxt module

Backend only

Demo Description
graphql-auth GraphQL server with email-password authentication & permissions
graphql-sdl-first GraphQL server based on GraphQL Yoga
graphql-subscriptions GraphQL server with realtime subscriptions based on apollo-server and Nexus Schema
graphql-typegraphql GraphQL server based on @apollo/server and TypeGraphQL
graphql-typegraphql-crud CRUD GraphQL API based on @apollo/server and TypeGraphQL
fastify-graphql GraphQL server based on Fastify, Mercurius, and the SDL-first approach of graphql-tools
fastify-graphql-sdl-first GraphQL server based on Fastify, Mercurius, and the SDL-first approach of graphql-tools
hapi-graphql GraphQL server based on Hapi and Nexus Schema
hapi-graphql-sdl-first GraphQL server based on Hapi and the SDL-first approach of Apollo Server Integration for Hapi
nest-graphql GraphQL server based on NestJS (code-first)
nest-graphql-sdl-first GraphQL server based on NestJS and the SDL-first approach of graphql-tools
graphql GraphQL server based on GraphQL Yoga and Pothos
graphql-nexus GraphQL server based on @apollo/server and Nexus Schema
grpc gRPC API including runnable client scripts for testing
postgis-express Demo of spatial queries using Postgis and Express
express REST API with Express
fastify REST API with Fastify
koa REST API with Koa
hapi REST API with hapi
nest REST API with NestJS
script Usage of Prisma Client JS in a TypeScript script
testing-express Demo of integration tests with Jest, Supertest and Express

New prisma-client generator

The following examples are fullstack examples using the new prisma-client generator: | Demo | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | nextjs-starter-webpack | A Next.js 15 starter that uses Webpack 5 as the bundler and runs on Node.js. | | nextjs-starter-turbopack | A Next.js 15 starter powered by Turbopack (alpha) for bundling, running on Node.js. | | nextjs-starter-webpack-monorepo | A monorepo-based Next.js 15 starter using Webpack 5 and Node.js, managed with pnpm. | | nextjs-starter-webpack-with-middleware | A Next.js 15 starter with Webpack 5, running on Node.js for main pages and Vercel Edge Light for middleware. |

Database examples

The databases folder contains examples focused on specific databases and Prisma Postgres integrations.

Extension points exported contracts — how you extend this code

ServiceWorkerGlobalScope (Interface)
* This ServiceWorker API interface represents the global execution context of a service worker. * Available only in sec
generator-prisma-client/react-router-starter-cloudflare-workerd/worker-configuration.d.ts
ServiceWorkerGlobalScope (Interface)
* The **`ServiceWorkerGlobalScope`** interface of the Service Worker API represents the global execution context of a se
orm/cloudflare-workers/worker-configuration.d.ts
Resource (Interface)
(no doc)
generator-prisma-client/aws-lambda-sst-esbuild/sst-env.d.ts
QuoteData (Interface)
(no doc)
accelerate/astro-starter/src/types/quote.ts
PostProps (Interface)
(no doc)
accelerate/accelerate-hacker-news/components/Posts.tsx
QuotesProps (Interface)
(no doc)
accelerate/remix-starter/app/components/Quote/Quotes.tsx
TestExampleOptions (Interface)
(no doc)
tests/fixtures.ts
Context (Interface)
(no doc)
orm/fastify-graphql/src/context.ts

Core symbols most depended-on inside this repo

log
called by 261
orm/cloudflare-workers/worker-configuration.d.ts
json
called by 99
orm/cloudflare-workers/worker-configuration.d.ts
error
called by 83
orm/cloudflare-workers/worker-configuration.d.ts
get
called by 78
orm/cloudflare-workers/worker-configuration.d.ts
testExample
called by 43
tests/fixtures.ts
delete
called by 41
orm/cloudflare-workers/worker-configuration.d.ts
set
called by 27
orm/cloudflare-workers/worker-configuration.d.ts
now
called by 24
generator-prisma-client/react-router-starter-cloudflare-workerd/worker-configuration.d.ts

Shape

Interface 693
Method 439
Function 382
Class 204
Enum 9

Languages

TypeScript100%

Modules by API surface

orm/cloudflare-workers/worker-configuration.d.ts592 symbols
generator-prisma-client/react-router-starter-cloudflare-workerd/worker-configuration.d.ts569 symbols
orm/hapi-graphql/src/generated/nexus.ts23 symbols
orm/fastify-graphql/src/generated/nexus.ts23 symbols
orm/nest-graphql/src/resolvers.post.ts15 symbols
orm/nest/src/app.controller.ts12 symbols
orm/nest-graphql/src/resolvers.user.ts11 symbols
accelerate/remix-starter/app/entry.server.tsx8 symbols
orm/grpc/server/server.ts7 symbols
deployment-platforms/prisma-compute/tanstack-start/src/routeTree.gen.ts7 symbols
orm/typedsql/prisma/seed.ts6 symbols
orm/hapi/src/plugins/posts.ts6 symbols

Dependencies from manifests, versioned

@ai-sdk/openai2.0.24 · 1×
@ai-sdk/react2.0.34 · 1×
@apollo/client4.1.6 · 1×
@apollo/server5.4.0 · 1×
@as-integrations/express51.1.2 · 1×
@astrojs/check0.9.8 · 1×
@astrojs/node9.5.5 · 1×
@astrojs/react4.4.2 · 1×
@astrojs/tailwind6.0.2 · 1×
@auth/prisma-adapter2.10.0 · 1×
@clerk/astro2.17.9 · 1×

Datastores touched

(mongodb)Database · 1 repos
(mysql)Database · 1 repos
notesapiDatabase · 1 repos
prismaDatabase · 1 repos
postgresDatabase · 1 repos
prisma-mongoDatabase · 1 repos
defaultdbDatabase · 1 repos
notesapiDatabase · 1 repos

For agents

$ claude mcp add prisma-examples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact