๐ŸŒ
NestJS
docs.nestjs.com โ€บ recipes โ€บ prisma
Prisma | NestJS - A progressive Node.js framework
You're now able to send database queries with Prisma Client. If you want to learn more about building queries with Prisma Client, check out the API documentation. When setting up your NestJS application, you'll want to abstract away the Prisma Client API for database queries within a service.
๐ŸŒ
Prisma
prisma.io โ€บ nestjs
Enterprise-ready database for NestJS apps - Prisma ORM
Build high-performance and type-safe NestJS apps with Prisma's developer-friendly database tools: The world's most popular TypeScript ORM and the first serverless database without cold starts.
Discussions

Ultimate Guide: How To Use Prisma With NestJS
Very nice article! Iโ€™ve been meaning to play around with both NestJS and Prisma for a while. If I can make a suggestion for a follow up article, would be for pointer-based pagination and caching. Thanks for sharing. More on reddit.com
๐ŸŒ r/node
10
51
November 13, 2022
NestJS ORM (TypeORM vs Prisma)
๐ŸŒ r/nestjs
42
20
December 3, 2025
NestJS Entity and Prisma Client
As you know the Prisma client generates an interface representing your model (with all the properties). You can use this interface most of the time, but unfortunately not everywhere. Sometimes it's useful and necessary to have a class instead of an interface. For example with Nest's Swagger module, the type property is expecting a value that is available at runtime (it can be a class but not an interface). Another example is the @Exclude decorator that is quite powerful. If you don't use all that feel free to completely remove the class entity and use the Prisma interface instead. More on reddit.com
๐ŸŒ r/nestjs
9
5
July 22, 2024
NestJS + Prisma.. confusion about DTOs and the generated types
Hey ๐Ÿ‘‹, Tasin from Prisma here. Answer to your questions Sure many generated types can be used, but a manual DTO creation can't be avoided completely right? You're correct. In general, Prisma defines data types for your data layer. For DTOs in NestJS, you're typically defining the types for your application layer. There might be a strong overlap between the two, but they might not necessarily be a one-to-one mapping. I would personally suggest defining the DTOs manually. How are you managing this in your project: Any tricks on how I can avoid to now create all the DTOs manually for sending data back to the backend? Note that there are some libraries like this one that can help generate DTOs for you. Personally I just write them manually but feel free to use libraries like this. Usually they thought about everything in the docs, has this been forgotten as it's quite common to exclude fields or am I missing something? This is not currently supported by Prisma. There's a github feature request for this. Note that there are some workarounds in the prisma docs . How to elegantly omit a field like a password from your NestJS API For your use case, I would suggest omitting the field using the NestJS Class serialization interceptor instead of removing it at the service level. Here's a quick example of the remove password from the User object case. First, define a UserEntity and annotate the password field with Exclude() so the field is removed during serialization. import { Exclude } from 'class-transformer'; export class UserEntity { // If you have a Prisma `User` type with the same fields, this entity can `implement` the `User` type from '@prisma/client' if you want to reuse Prisma-generated types. id: string; firstName: string; lastName: string; @Exclude() // will remove this field during serialization password: string; constructor(partial: Partial) { Object.assign(this, partial); } } Let's say you have a UserService with a findAll and findOne method: @Injectable() export class UsersService { constructor(private prismaService: PrismaService) {} // These functions return the Prisma User types, with the password included. findOne(id: string): Promise { return this.prismaService.user.findUnique({ where: { id } }); } async findAll(): Promise { return this.prismaService.user.findMany({}); } } Inside the controller, you can define the corresponding route handlers like this: @Controller('users') export class UsersController { @Get(':id') async findOne(@Param('id') id: string) { return new UserEntity(await this.usersService.findOne(id)); } @Get() async findAll() { const users = await this.usersService.findAll(); return users.map((user) => new UserEntity(user)); } } You can globally bind the ClassSerializationInterceptor by adding this line to your main.ts async function bootstrap() { const app = await NestFactory.create(AppModule); app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector))); await app.listen(3000); } bootstrap(); Hope this helps! By the way, I'm currently writing a tutorial series about using NestJS and Prisma in the Prisma Blog . The first article shows how to create a basic CRUD REST API. We hope to cover a lot of topics (just like the use case you are talking about in this post) and show best practices in the upcoming articles. I would def suggest checking it out! More on reddit.com
๐ŸŒ r/Nestjs_framework
20
20
June 23, 2022
๐ŸŒ
Prisma
prisma.io โ€บ home โ€บ nestjs โ€บ nestjs โ€บ nestjs
How to use Prisma ORM and Prisma Postgres with NestJS | Prisma Documentation
This guide shows you how to use Prisma ORM with NestJS, a progressive Node.js framework for building efficient and scalable server-side applications.
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ nestjs-prisma
nestjs-prisma - npm
January 7, 2026 - Library and schematics to add Prisma integration to a NestJS application. Latest version: 0.27.0, last published: 7 months ago. Start using nestjs-prisma in your project by running `npm i nestjs-prisma`. There are 9 other projects in the npm registry using nestjs-prisma.
      ยป npm install nestjs-prisma
    
Published ย  Jan 07, 2026
Version ย  0.27.0
๐ŸŒ
nestjs-prisma
nestjs-prisma.dev
nestjs-prisma
Easy Prisma support for your NestJS application.
๐ŸŒ
Medium
medium.com โ€บ @rishabhgupta7210012474 โ€บ practical-guide-to-integrating-prisma-with-nestjs-for-seamless-development-9f91e83cc990
Practical Guide to Integrating Prisma with NestJS for Seamless Development | by Rishabh Gupta | Medium
January 19, 2024 - In this blog post, weโ€™ll explore ... building scalable server-side applications. Prisma simplifies database access and management, making it an excellent choice for NestJS Projects. Node.js and ......
๐ŸŒ
Prisma
prisma.io โ€บ blog โ€บ nestjs-prisma-rest-api-7D056s1BmOL0
Build a REST API with NestJS, Prisma 7, PostgreSQL and Swagger
June 3, 2022 - Updated (July 2026): This tutorial has been fully revised for Prisma ORM 7 and NestJS 11. Prisma 7 is Rust-free and uses driver adapters, generates the Prisma Client into your project (instead of node_modules), and is configured through a prisma.config.ts file.
๐ŸŒ
LogRocket
blog.logrocket.com โ€บ home โ€บ how to use nestjs with prisma
How to use NestJS with Prisma - LogRocket Blog
June 4, 2024 - This tutorial will explain Prisma's effectiveness with NestJS and demonstrate how to use Nest and Prisma together to build a REST API.
Find elsewhere
๐ŸŒ
Tomray
tomray.dev โ€บ nestjs-prisma
Ultimate Guide: How to use Prisma with NestJS - Tom Ray
November 29, 2022 - This will spin up a local instance of Prisma Studio (for me it opens on localhost:5555). Open this up in your browser and you'll see something like this: Go into the users and add a few mock users, then do the same with tweets! ... In order for the NestJS app to get and mutate data from the database we need to use Prisma Client.
๐ŸŒ
DEV Community
dev.to โ€บ xavier_carreragimbert โ€บ setting-up-nestjs-with-prisma-without-the-headache--47n2
Setting Up NestJS with Prisma (Without the Headache) - DEV Community
November 24, 2025 - Iโ€™m really glad it helped, Dennis! It should work fine without any major changes. Did you run into any issues while using Prisma 7? ... I tried to fix it, but it was too complicated for me. I decided to wait for the official sample to be updated: github.com/nestjs/nest/issues/15965
๐ŸŒ
DEV Community
dev.to โ€บ nadim_ch0wdhury โ€บ how-to-use-nest-js-with-prisma-52c0
How to use Nest JS with Prisma? - DEV Community
February 6, 2025 - datasource db { provider = "postgresql" url = env("DATABASE_URL") } generator client { provider = "prisma-client-js" } model User { id Int @id @default(autoincrement()) name String email String @unique } ... Create a Prisma Module: Create a prisma directory inside src and add prisma.service.ts and prisma.module.ts files. Prisma Service: Create src/prisma/prisma.service.ts: import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common'; import { PrismaClient } from '@prisma/client'; @Injectable() export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { async onModuleInit() { await this.$connect(); } async onModuleDestroy() { await this.$disconnect(); } }
๐ŸŒ
Prisma
prisma.io โ€บ blog โ€บ nestjs-prisma-authentication-7D056s1s0k3l
Building a REST API with NestJS and Prisma: Authentication
March 31, 2023 - Learn how to implement JWT authentication in a NestJS REST API with Prisma ORM 7 and Passport: login endpoint, JWT strategy, auth guards, Swagger integration and bcrypt password hashing.
๐ŸŒ
GitHub
github.com โ€บ notiz-dev โ€บ nestjs-prisma-starter
GitHub - notiz-dev/nestjs-prisma-starter: Starter template for NestJS ๐Ÿ˜ป includes GraphQL with Prisma Client, Passport-JWT authentication, Swagger Api and Docker
Prisma Client JS is a type-safe database client auto-generated based on the data model. ... Open up the example GraphQL queries and copy them to the GraphQL Playground. Some queries and mutations are secured by an auth guard.
Starred by 2.5K users
Forked by 366 users
Languages ย  TypeScript 96.7% | JavaScript 1.8% | Dockerfile 1.3% | Shell 0.2%
๐ŸŒ
Prisma
prisma.io โ€บ blog โ€บ nestjs-prisma-relational-data-7D056s1kOabc
Handling Relational Data in a REST API with NestJS and Prisma 7
3 weeks ago - Learn how to handle relational data in a REST API built with NestJS and Prisma ORM 7: model a one-to-many relation, build user CRUD endpoints, and exclude sensitive fields from responses.
๐ŸŒ
White Prompt Blog
blog.whiteprompt.com โ€บ an-overview-of-nest-js-with-prisma-orm-56c74d3930af
An overview of Nest.js with Prisma ORM | by Daniel Brum | White Prompt Blog
September 23, 2022 - Nest.js is a consolidated and widely used framework on the Node.js environment for building applications and services. It also has great support and integration with a lot of different tools like ORMs, or Object-Relational Mapping, message queues, logging, and more. Prisma is a great ORM that has been gaining traction lately.
๐ŸŒ
DEV Community
dev.to โ€บ rajat128 โ€บ from-beginner-to-pro-setting-up-a-typescript-nestjs-backend-with-prisma-bn5
From Beginner to Pro: Setting Up a TypeScript NestJS Backend with Prisma - DEV Community
January 8, 2026 - # 1. Install NestJS CLI globally npm install -g @nestjs/cli # 2. Create new project nest new my-awesome-api # Choose npm (or your preference) cd my-awesome-api # 3. Install Prisma npm install @prisma/client npm install -D prisma # 4. Initialize Prisma npx prisma init # 5.
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ @nestjs-mod โ€บ prisma
@nestjs-mod/prisma - npm
Next-generation Node.js and TypeScript ORM for NestJS-mod (preview version only for Postgres). Latest version: 1.16.1, last published: a year ago. Start using @nestjs-mod/prisma in your project by running `npm i @nestjs-mod/prisma`. There are no other projects in the npm registry using @nestjs-mod/prisma.
      ยป npm install @nestjs-mod/prisma
    
Published ย  Jun 16, 2025
Version ย  1.16.1
๐ŸŒ
nestjs-prisma
nestjs-prisma.dev โ€บ docs โ€บ examples
Examples - nestjs-prisma
Rust-free and driver adapter NestJS app with prisma-client (Rust-free), driver adapter and nestjs-prisma.