๐ŸŒ
Prisma
prisma.io โ€บ home โ€บ nestjs โ€บ nestjs โ€บ nestjs
How to use Prisma ORM and Prisma Postgres with NestJS | Prisma Documentation
IntroductionQuick startPrerequisites1. Create your NestJS project2. Set up Prisma2.1. Install Prisma and dependencies2.2. Initialize Prisma2.3. Set the generator output path2.4. Configure your database connection2.5. Define your data model2.6. Create and run your migration2.7.
๐ŸŒ
NestJS
docs.nestjs.com โ€บ recipes โ€บ prisma
Prisma | NestJS - A progressive Node.js framework
You are going to build a sample NestJS application with a REST API that can read and write data in a database. For the purpose of this guide, you'll use a SQLite database to save the overhead of setting up a database server.
๐ŸŒ
Prisma
prisma.io โ€บ nestjs
Enterprise-ready database for NestJS apps | Prisma
By creating a PrismaService that extends the PrismaClient, you can inject database access throughout your application. NestJS's controller/service pattern pairs naturally with Prisma's type-safe queries, creating a clean separation between your ...
๐ŸŒ
LogRocket
blog.logrocket.com โ€บ home โ€บ how to use nestjs with prisma
How to use NestJS with Prisma - LogRocket Blog
June 4, 2024 - With the Prisma service set up, generate a todo module for all the todo logic with the command below: ... import { Injectable } from '@nestjs/common'; import { PrismaService } from '../../prisma.service'; import { Todo, Prisma } from '@prisma/client'; @Injectable() export class TodoService { constructor(private prisma: PrismaService) {} async getAllTodo(): Promise<Todo[]> { return this.prisma.todo.findMany(); } async getTodo(id: number): Promise<Todo | null> { return this.prisma.todo.findUnique({ where: { id: Number(id) } }); } async createTodo(data: Todo): Promise<Todo> { return this.prisma.todo.create({ data, }); } async updateTodo(id: number): Promise<Todo> { return this.prisma.todo.update({ where: { id: Number(id) }, data: { completed: true }, }); } async deleteTodo(id: number): Promise<Todo> { return this.prisma.todo.delete({ where: { id: Number(id) }, }); } }
๐ŸŒ
Prisma
prisma.io โ€บ blog โ€บ nestjs-prisma-rest-api-7D056s1BmOL0
Build a REST API with NestJS, Prisma 7, PostgreSQL and Swagger
June 3, 2022 - Learn how to build a backend REST API with NestJS, Prisma ORM 7, PostgreSQL and Swagger. Set up the project, model your data, build the API and document it with Swagger. Fully updated for Prisma 7 and NestJS 11.
๐ŸŒ
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.
๐ŸŒ
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
๐ŸŒ
Tomray
tomray.dev โ€บ nestjs-prisma
Ultimate Guide: How to use Prisma with NestJS - Tom Ray
November 29, 2022 - Now, the above example is super simple, but hopefully, you get the idea. Here are a few ideas on how you can take this further: ... [Advanced] Add an auth layer so the userId can be passed in automatically instead of passed into the body of the request ยท Let's now see how we can work with GraphQL in a NestJS app with Prisma...
๐ŸŒ
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 - To install Prisma Client in your project, run the following command in your terminal: ... When setting up your NestJS application, youโ€™ll want to abstract away the Prisma Client API for database queries within a service.
Find elsewhere
๐ŸŒ
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
# for example docker build -t nest-prisma-server . After Docker build your docker image you are ready to start up a docker container running the nest server: docker run -d -t -p 3000:3000 --env-file .env nest-prisma-server ยท Now open up ...
Starred by 2.5K users
Forked by 366 users
Languages ย  TypeScript 96.7% | JavaScript 1.8% | Dockerfile 1.3% | Shell 0.2%
๐ŸŒ
GitHub
gist.github.com โ€บ EdouardDem โ€บ 5aa7ed56117aed79f43914583474d4ae
nestjs-prisma-example-tutorial ยท GitHub
To initialize Prisma, execute the following command in your terminal: ... In this step, you'll create a PostgreSQL database. We'll use Docker to run a PostgreSQL container. If you already have a PostgreSQL database installed on your computer, feel free to skip this step. Execute the following command in your terminal to create a PostgreSQL container: docker run --name nestjs-prisma-demo -e POSTGRES_PASSWORD=passwd -e POSTGRES_USER=user -e POSTGRES_DB=demo -p 5432:5432 -d postgres
๐ŸŒ
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 ...
๐ŸŒ
nestjs-prisma
nestjs-prisma.dev
nestjs-prisma
One command to automate the Prisma setup in your NestJS application.
๐ŸŒ
Nx
nx.dev โ€บ docs โ€บ getting started โ€บ intro to nx
What is Nx? Smart Monorepo Build System & CI | Nx
Nx is a build system with smart caching and task orchestration for monorepos and polyrepos. Ship faster and keep CI fast as your codebase scales.
๐ŸŒ
Medium
medium.com โ€บ yavar โ€บ how-to-implement-nestjs-with-prisma-e682ed83f286
How to implement NestJS with Prisma | by Gnanabillian | YavarTechWorks | Medium
October 3, 2022 - NestJS is a framework for creating scalable, server-side Node.js applications. It uses modern JavaScript, fully supports and is built using TypeScript, and combines elements of object-oriented, functional, and functional reactive programming. This post will demonstrate how to use Nest and Prisma to build a REST API.
๐ŸŒ
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 - 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(); } }
๐ŸŒ
Medium
medium.com โ€บ @hrynkevych โ€บ prisma-orm-and-postgresql-with-nestjs-bf0a551fcaff
Prisma ORM and PostgreSQL with NestJS | by Mykhailo (Michael) Hrynkevych | Medium
August 30, 2024 - To integrate Prisma ORM and PostgreSQL into a NestJS project, follow these steps: ... Edit the prisma/schema.prisma file to define your database schema. Hereโ€™s an example schema with a User model:
๐ŸŒ
Medium
medium.com โ€บ @msmiraj8 โ€บ get-started-with-prisma-7-with-nest-js-mysql-3919eaa7c760
Get Started With Prisma 7 with Nest Js & MySQL | by Mustak Sahariar | Medium
November 25, 2025 - import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common'; import { PrismaClient } from '../src/generated/prisma/client'; import { PrismaMariaDb } from '@prisma/adapter-mariadb'; @Injectable() export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { constructor() { const adapter = new PrismaMariaDb(process.env.DATABASE_URL!); super({ adapter, log: ['info', 'warn', 'error'] }); } async onModuleInit() { try { await this.$connect(); await this.$queryRaw`SELECT 1`; console.log('โœ… Prisma connected to MySQL'); } catch (error) { console.error('โŒ Prisma connection error:', error); throw error; } } async onModuleDestroy() { await this.$disconnect(); console.log('๐Ÿ”Œ Prisma disconnected from MySQL'); } }
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ @nestjs-mod โ€บ prisma
nestjs-mod/prisma
An example of access to module services with forFeature. import { InjectPrismaClient, PrismaModule } from '@nestjs-mod/prisma'; import { NestFactory } from '@nestjs/core'; import { randomUUID } from 'crypto'; import { Injectable, Module } from '@nestjs/common'; import { PrismaClient } from '@prisma/client'; @Injectable() export class FeatureService { constructor( @InjectPrismaClient() private readonly prismaService: PrismaClient ) {} async createUser({ externalUserId }: { externalUserId: string }) { return await this.prismaService.prismaUser.create({ data: { externalUserId } }); } async getUse
      ยป npm install @nestjs-mod/prisma
    
Published ย  Jun 16, 2025
Version ย  1.16.1
๐ŸŒ
DEV Community
dev.to โ€บ alfism1 โ€บ build-complete-rest-api-feature-with-nest-js-using-prisma-and-postgresql-from-scratch-beginner-friendly-part-1-5b73
Build Complete REST API Feature with Nest JS (Using Prisma and Postgresql) from Scratch - Beginner-friendly - PART 1 - DEV Community
July 7, 2024 - Each endpoint above already implemented validation as well according to the DTO, for example: Registration input validation (DTO create-user.dto) ... Now let's jump to the user service. In the service, we'll create functions to interact with the database via Prisma and they'll represent each endpoint mentioned above. ... import { ConflictException, HttpException, Injectable } from '@nestjs/common'; import { User } from '@prisma/client'; import { PrismaService } from 'src/core/services/prisma.service'; import { CreateUserDto } from './dtos/create-user.dto'; import { hash } from 'bcrypt'; @Injectable() export class UsersService { constructor(private prisma: PrismaService) {} // async registerUser // async loginUser // async updateUser // async deleteUser }