Build type-safe APIs with NestJS and oRPC — define shared contracts with Zod, implement validated CRUD endpoints, and auto-generate OpenAPI docs in a Turborepo monorepo.
Includes full-stack React frontend integration with TanStack Query for complete end-to-end type safety.
Length 1:04:47
Captions English (Generated), Spanish (Auto-translated), French (Auto-translated), Korean (Auto-translated), Portuguese (Auto-translated), Vietnamese (Auto-translated) #orpc #turborepo #nestjs #react #typescript #zod #fullstack #monorepo #openapi #web-development
0:00 All right, so to start this project, we're gonna go ahead 0:02 and initialize it inside 0:03 of a Turborepo. Now, Turborepo is a monorepo manager 0:07 that allows us to host multiple applications and libraries in a 0:11 single Git repository, in a single project, which is gonna make 0:15 our ORPC full stack integration very useful because 0:19 we'll share our common types for ORPC in a 0:23 library that can then be consumed by both our UI and back-end 0:27 application. 0:29 So if you wanna learn more about Turborepo, I have a separate video where I 0:33 do a deep dive on it. I'll leave a link in the description 0:36 below. 0:38 Otherwise, let's go ahead and use pnpm to create 0:41 turborepo at latest. So this is a command to initialize a 0:45 new Turborepo, and I'm gonna move forward with pnpm as my 0:49 package manager. 0:51 So go ahead and let's set this up. So you can go ahead 0:53 and call this whatever you'd 0:54 like. I'll call mine nestjs-orpc, 0:58 and again, choose pnpm. So this command will go ahead and set 1:02 up Turborepo with some starting applications in 1:06 libraries. We can CD into the new directory and open 1:10 it up. So I open my project in VS Code, and you can 1:14 see we have our starting Turborepo. 1:16 And again, I'm not gonna dive deep into this 1:19 architecture in this lecture. 1:20 We're focused on ORPC. But what this allows us to now do is 1:24 host our apps in this apps folder, and then ORPC types 1:29 can live in a shared package here, and then it can be 1:32 consumed by both of the apps, which is exactly what we want. 1:36 So Turborepo is a great choice for this architecture. 1:39 To start up, let's just clean up our generated 1:42 Turborepo and 1:43 delete all of these starting packages and apps. 1:47 We're gonna create our own from scratch.
The rest of the transcript is for members.
Sign in