
Nestjs is a NodeJS framework built on NodeJS and TypeScript that enables scalable, modular server-side applications and CLI tools by providing structure, consistency, and a rich set of built-in features.
Code along with me to maximize learning value; treat this course as incremental practice with modules, dependency injection, and validation pipes, reinforced by practice and solution videos.
Learn how built-in pipes validate params and queries with defaults and optional fields, and validate large request bodies using data transfer objects with class-validator.
Create your first dto in NestJS, import class-validator decorators to enforce string types, validate required email and password, allow optional last name, and apply min/max length and regex checks.
create a posts module in NestJS using the command line interface, build a post controller and a post service, and inject the post service into the controller as a dependency.
Use the NestJS CLI to generate a posts module, controller, and a dedicated providers directory for post services. Wire the service into the controller via dependency injection.
Build post creation endpoint in posts controller with create post DTO, a post decorator, and body decorator, and enums for post type and status, outlining fields like title and content.
Discover how to install and configure compo doc to document your entire NestJS codebase—providers, controllers, and DTOs—alongside automatic updates as you code and serve docs on port 3001.
Convert the NestJS Postgres connection to an asynchronous setup using forRootAsync with a useFactory, enabling configuration object injection from env files and future configuration service integration.
Inject a user repository into the service with the inject repository decorator and TypeORM, register it via for feature in the user module, and save a new user to PostgreSQL.
Generate the meta options module and controller, then define the meta option entity with an id, a json meta value, and created and updated dates using a json column.
Learn how bidirectional relationships link post and meta option, with foreign keys in the owning table via the join column decorator, and optional cascade delete to keep data clean.
Create a bidirectional one-to-many relationship between user and post using many-to-one and one-to-many decorators, with author as the user. Upcoming videos cover creating posts and assigning authors.
Learn to fetch posts with their author using a relations object and optional eager loading in a NestJS backend, covering 1-to-1 and one-to-many relationships.
Explore many to many relationships in TypeORM, linking posts and tags via a junction table with foreign keys. Learn to define unidirectional and bidirectional relations with decorators.
Learn how to implement soft delete for tags in a NestJS app using a delete date column, create a dedicated soft delete endpoint, and understand its impact on tag-post relationships.
Inject the NestJS config service to safely access environment variables from a dot env file, using get to retrieve S3 bucket and typecast values as needed.
Configure environment-specific files in a NestJS app by loading env files based on NODE_ENV. Load variables like the S3 bucket via config, with single or array-based env paths.
Learn to load database details from environment variables using the NestJS config service and inject them into the TypeORM factory, with env files and proper port conversion.
Create custom configuration files with NestJS by using a global config directory and app.config.ts that reads environment variables and exposes database and environment settings via the config module.
Explore module configuration and partial registration in NestJS, enabling module-specific configurations with config module, environment keys, and inject techniques for type-safe access.
Explore database transactions in Typeorm within NestJS, illustrating atomic CRUD operations that roll back on failure. Apply these patterns to multi-entity tasks like bulk user creation to ensure data integrity.
Demonstrates adding robust exception handling to create-many-users with a database transaction, using try/catch blocks, timeout and conflict exceptions, and safe connection release.
NestJS is a Node.js framework for building efficient, reliable, scalable server-side applications. Its structure is opinionated and draws inspiration from Angular. Nest has gained popularity; more than 3 million downloads on NPM weekly.
While I was learning NestJS, the learning curve was very steep. I wished there was a detailed and well-structured course that would make my learning path easy. That's why I came up with this course: so that other developers who are trying to learn NestJS do not have to go through such a steep learning curve.
I can assure you that the "NestJS Masterclass" is the most detailed, extensive, well-structured, and in-depth course in the marketplace—period! - There is no other course like NestJS Masterclass, Guaranteed!
NestJS Masterclass is a Practical Course! We work together to build a REST API server-side application for a blog. We learn while we code this application, so all the examples in this course are real-world use cases. While programming this application, we will learn various NestJS features and dive deeper into the internal mechanics of NestJS.
Well-designed and Structured Curriculum
While designing the curriculum of the NestJS masterclass, I have spent a lot of time and effort thinking and ensuring that this makes learning NestJS easy for my students. Here is a partial list of topics covered in the NestJS Masterclass and what you can expect to learn from each section. Refer to the curriculum section for a detailed list of all topics covered.
Understanding Modules: I introduce you to NestJS modules, how they work, the internal mechanics of how they are linked to each other, and various schematics that are used with modules, including services and providers.
Validation And Pipes: This is a crucial section that explains how you can leverage packages like class validator and Pipes in NestJS to validate the incoming data to your application.
Dependency Injection: Dependency injection is the backbone of the NestJS framework. We dive deeper into how it works and how to leverage it to ensure that your application remains modular. We work on all possible dependencies, including circular ones between modules.
Documenting Code: We learn about NestJS's features, which let you document the API endpoints using Open API Specification and your application's source code using Compodoc.
TypeORM and Relational Databases: TypeORM has a close integration with NestJS. We use PostgreSQL in the REST API application we build and learn how to leverage all features of TypeORM while building a real-world application.
Database Relations: This section teaches you about relationships in SQL databases and how to use TypeORM to set them. This includes one-to-one, one-to-many, and many-to-many relationships. It is a detailed and well-designed section that eliminates all misconceptions about database connections.
Configuration Environments In NestJS: Applications often run in different environments. Depending on the environment, different configuration settings should be used. NestJS has a well-designed system for managing configurations.
Exception Handling: Elegantly handling exceptions within an application is crucial, as it improves the experience of developers and application users. We look at features NestJS provides that help us handle exceptions within an application.
Database Transactions: Database transactions are important when you want to perform CRUD operations, which impact multiple entities simultaneously and are interdependent. We dive deeper into TypeORM transactions to see how they can be used with NestJS.
User Authentication with JSON Web Tokens: We work on building a user authentication system using JWTs and learn the mechanics behind a secure and well-designed System.
Guards and Decorators: Guards and Decorators are a few of the important schematics offered by NestJS. We use Guards to filter out unauthorized requests and decorators to set meta-data and attach payloads to incoming requests.
Google Authentication: Modern applications are interconnected and usually offer an easy signup process using services like Google OAuth. We use Google Authentication along with the JWTs Authentication service we create for the NestJS application we build.
File Uploads: Most applications need a file upload mechanism for users to upload files to the server and use them later. We learn about NestJS Interceptors and how they can be used to upload files to NestJS.
Unit and End-to-End Testing: NestJS has been developed to keep the code you write modular so you can test it quickly. To live up to this practice, I have created dedicated modules for unit testing and end-to-end testing in NestJS for this course.
Mongoose and MongoDB: Many times, you need to use NoSQL databases like MongoDB with the NestJS application. We do exactly that in this section. So, no matter which database you want to use, NestJS Masterclass is a perfect fit.
Deployment to AWS: We examine all the intrinsic details of deploying a production application to AWS. We also explore using CloudFront CDN and S3 buckets to upload and serve media files for our application.
And lots more ...
Who am I?
I will give a quick introduction about myself I am Manik and I am a full stack developer and working as one since last fifteen years of my life.
Why did I choose to teach NestJS?
NestJS is a robust framework that is very close to my heart. For the last four years, I have been working on It. I have developed and maintained an application using NestJS, which has more than One Million Hits daily. I had a tough time learning NestJS due to the lack of tutorials, and that's why I decided to make this course so that I can teach what I have learned throughout all my years working with NestJS.