NestJS: The Complete Developer's Guide

Build full featured backend APIs incredibly quickly with Nest, TypeORM, and Typescript. Includes testing and deployment!

4.70 (6397 reviews)
Udemy
platform
English
language
Web Development
category
instructor
37,528
students
20 hours
content
Mar 2024
last update
$99.99
regular price

What you will learn

Deploy a feature-complete app to production

Build authentication and permissions systems from scratch

Write integration and unit tests to ensure your code is working

Automatically validate data included with incoming requests

Use an API client to manually test your app

Apply structure to your code with Typescript

Make your code more reusable and testable with dependency injection

Tie different types of data together with TypeORM relationships

Get a behind-the-scenes understanding of NestJS

Use Guards to prevent unauthorized users from gaining access to sensitive data

Understand Nest's special request-response cycle

Model your app's data using TypeORM entities

Use decorators to dramatically simplify your code

Description

Authentication/Authorization? Covered.  Automated Testing? Yep, it's here!  Production Deployment? Of course!

Congratulations! You've found the complete guide on how to build enterprise-ready apps with NestJS.

NestJS is a backend framework used to create scalable and reliable APIs.  It is a "battery-included" framework; it includes tools to handle just about every possible use case, from data persistence, to validation, to config management, to testing, and much, much more.  This course will help you master Nest. By the time you complete this course, you will have the confidence to build any app you can imagine.

Throughout this course you will build a series of apps with growing complexity.  We use as few libraries and tools as possible.  Instead, you will write many custom systems to better understand how every piece of Nest works together.  Each application you build includes discussion on data modeling and persistence. We will first save records in a simple file-based data store (built from scratch) and eventually work our way up to saving data in a production-grade Postgres instance.

Testing is a fundamental topic in Nest. A tremendous amount of functionality in Nest is dedicated to making sure your project is easy to test. This course follows Nest's testing recommendations, and you will write both integration and unit tests to ensure your project is working as expected. Although testing can sometimes be confusing and boring, I have put special care into making sure the tests we write are expressive, fast, and effective.  You will be able to use this knowledge on your own projects, even those that don't use Nest!

Typescript is used throughout this course to make sure we are writing clean and correct code. Don't know Typescript? Not a problem! A free appendix is included at the end of the course to get you up to speed on Typescript.  Once you're familiar with it, Typescript will help you catch errors and bugs in your code before you even run it.  If you've never used Typescript before you are in for a treat :)

--------------------------------------

Everything in this course is designed to make your learning process as easy as possible.

  • At every step, I will teach you what Nest is doing internally, and help you understand how to twist and bend Nest to better suit your application's needs. 

  • Every single video in the course has an attached ZIP file containing up-to-date code, just in case you ever get stuck.

  • Full-time teaching assistants are standing by to help answer your questions

  • Access private live chat server is included. Live help whenever you need it!

--------------------------------------

Here's a partial list of the topics included in this course:

  • Securely deploy your app to production

  • Write automated integration and unit tests to make sure your code is working

  • Build an authentication system from scratch to log users in

  • Allow users to perform certain actions with a permissions system

  • Store and retrieve data with complex queries using TypeORM

  • Understand how TypeORM handles data relationships

  • Write declarative code using property, method, and parameter decorators

  • Master the concept of dependency injection to write reusable code

  • Implement automatic validation of incoming requests

  • Format outgoing response data with a custom DTO system

  • Handle incoming requests and outgoing responses using Guards and Interceptors

  • Segment your code into reusable Nest Modules

  • Add structure to your database using migrations


I had a tough time learning NestJS.  There are a tremendous number of outdated tutorials around it, the documentation is sometimes unclear, and Nest itself is just plain hard to understand.  I made this course to save you time and money - a course to show you exactly what you need to know about every topic in Nest.  You will find learning Nest to be a delightful experience and pick up a tremendous amount of knowledge along the way.

Sign up today and join me in mastering NestJS!

Content

Get Started Here!

How to Get Help
Join Our Community!

The Basics of Nest

Project Setup
TypeScript Configuration
Creating a Controller
Starting Up a Nest App
File Naming Conventions
Routing Decorators

Generating Projects with the Nest CLI

App Setup
Using the Nest CLI to Generate Files
More on Generating Files
Adding Routing Logic
[Optional] Postman Setup
[Optional] VSCode REST Client Extension

Validating Request Data with Pipes

Accessing Request Data with Decorators
Using Pipes for Validation
Adding Validation Rules
Behind the Scenes of Validation
How Type Info is Preserved

Nest Architecture: Services and Repositories

Services and Repositories
Implementing a Repository
Reading and Writing to a Storage File
Implementing a Service
Manual Testing of the Controller
Reporting Errors with Exceptions
Understanding Inversion of Control
Introduction to Dependency Injection
Refactoring to Use Dependency Injection
Few More Notes on DI

Nest Architecture: Organizing Code with Modules

Project Overview
Generating a Few Files
Setting Up DI Between Modules
More on DI Between Modules
Consuming Multiple Modules
Modules Wrapup

Big Project Time!

App Overview
API Design
Module Design!
Generating Modules, Controllers, and Services

Persisting Data with TypeORM

Persistent Data with Nest
Setting Up a Database Connection
Creating an Entity and Repository
Viewing a DB's Contents
Understanding TypeORM Decorators
One Quick Note on Repositories
A Few Extra Routes
Setting Up Body Validation
Manual Route Testing

Creating and Saving User Data

Creating and Saving a User
Quick Breather and Review
More on Create vs Save
Querying for Data
Updating Data
Removing Records
Finding and Filtering Records
Removing Records
Updating Records
A Few Notes on Exceptions

Custom Data Serialization

Excluding Response Properties
Solution to Serialization
How to Build Interceptors
Serialization in the Interceptor
Customizing the Interceptor's DTO
Wrapping the Interceptor in a Decorator
Controller-Wide Serialization
A Bit of Type Safety Around Serialize

Authentication From Scratch

Authentication Overview
Reminder on Service Setup
Implementing Signup Functionality
[Optional] Understanding Password Hashing
Salting and Hashing the Password
Creating a User
Handling User Sign In
Setting up Sessions
Changing and Fetching Session Data
Signing in a User
Getting the Current User
Signing Out a User
Two Automation Tools
Custom Param Decorators
Why a Decorator and Interceptor
Communicating from Interceptor to Decorator
Small Fix for CurrentUserInterceptor
Connecting an Interceptor to Dependency Injection
Globally Scoped Interceptors
Preventing Access with Authentication Guards

Getting Started with Unit Testing

Testing Overview
Testing Setup
Yes, Testing is Confusing
Getting TypeScript to Help With Mocks
Quick Note to Help Speed Up Your Tests
Improving File Layout
Ensuring Password Gets Hashed
Changing Mock Implementations
Testing the Signin Flow
Checking Password Comparison
More Intelligent Mocks
Refactoring to Use Intelligent Mocks
Unit Testing a Controller
More Mock Implementations
Not Super Effective Tests
Testing the Signin Method

Integration Testing

Getting Started with End to End Testing
Creating an End to End Test
App Setup Issues in Spec Files
Applying a Globally Scoped Pipe
Applying a Globally Scoped Middleware
Solving Failures Around Repeat Test Runs
Creating Separate Test and Dev Databases

Managing App Configuration

Understanding Dotenv
Applying Dotenv for Config
Specifying the Runtime Environment
Solving a SQLite Error
It Works!
A Followup Test

Relations with TypeORM

Back to Reports
Adding Properties to Reports
A DTO for Report Creation
Receiving Report Creation Requests
Saving a Report with the Reports Service
Testing Report Creation
Building Associations
Types of Associations
The ManyToOne and ManytoMany Decorators
Important Note About Deleting Database - Do Not Skip
More on Decorators
Setting up the Association
Formatting the Report Response
Transforming Properties with a DTO

A Basic Permissions System

Adding in Report Approval
Testing Report Approval
Authorization vs Authentication
Adding an Authorization Guard
The Guard Doesn't Work?!
Middlewares, Guards, and Interceptors
Assigning CurrentUser with a Middleware
Fixing a Type Definition Error
Validating Query String Values
Transforming Query String Data
How Will We Generate an Estimate

Query Builders with TypeORM

Creating a Query Builder
Writing a Query to Produce the Estimate
Testing the Estimate Logic

Production Deployment

The Path to Production
Providing the Cookie Key
Understanding the Synchronize Flag
The Dangers of Synchronize
The Theory Behind Migrations
Headaches with Config Management
TypeORM and Nest Config is Great

[Bonus] Appendix: TypeScript

How to Get Help
TypeScript Overview
Environment Setup
A First App
Executing TypeScript Code
One Quick Change
Catching Errors with TypeScript
Catching More Errors!
Course Overview
Types
More on Types
Examples of Types
Where Do We Use Types?
Type Annotations and Inference
Annotations with Variables
Object Literal Annotations
Annotations Around Functions
Understanding Inference
The Any Type
Fixing the "Any" Type
Delayed Initialization
When Inference Doesn't Work
Annotations Around Functions
Inference Around Functions
Annotations for Anonymous Functions
Void and Never
Destructuring with Annotations
Annotations Around Objects
Arrays in TypeScript
Why Typed Arrays?
Multiple Types in Arrays
When to Use Typed Arrays
Tuples in TypeScript
Tuples in Action
Why Tuples?
Interfaces
Long Type Annotations
Fixing Annotations with Interfaces
Syntax Around Interfaces
Functions In Interfaces
Code Reuse with Interfaces
General Plan with Interfaces
Classes
Basic Inheritance
Class Method Modifiers
Fields in Classes
Fields with Inheritance
Where to Use Classes
App Overview
Parcel in Action
Project Structure
Generating Random Data
Type Definition Files
Using Type Definition Files
Export Statements in TypeScript
Defining a Company
Adding Google Maps Support
Google Maps Integration with TypeScript
Exploring Type Definition Files
Hiding Functionality
Why Use Private Modifiers? Here's Why
Adding Markers
Duplicate Code
One Possible Solution
Restricting Access with Interfaces
Implicit Type Checks
Showing Popup Windows
Updating Interface Definitions
Optional Implements Clauses
App Wrapup

Screenshots

NestJS: The Complete Developer's Guide - Screenshot_01NestJS: The Complete Developer's Guide - Screenshot_02NestJS: The Complete Developer's Guide - Screenshot_03NestJS: The Complete Developer's Guide - Screenshot_04

Reviews

Antonio
July 23, 2023
I like the course content and his teaching is fine too. My problem is with audio, it is so low that I need to shut all appliances off to hear him talk.
Mārtiņš
July 8, 2023
Course was really interesting for me, but there was one thing, that did not met expectations (at least until section15). The use of sqlite was a mistake IMO. I just finished Your postgres course and worked on this one with a postgres database. Everything went well until e2e tests, where clearing database did not transfer at all. It would have been much more valuable to show how to connect to database from global.beforeAll(), how to automatically set up test database (or test schema) if it does not exist and clean up after the tests finish. In short I enjoyed e2e tests in postgres course much more than this one, hopefully You will integrate the ideas from that course into this one.
Katika
July 8, 2023
good!! this is essential to new nestjs starter but i'm last some part cann't follow because npm package olded.
Sarang
July 5, 2023
That was really amazing But there are many steps in nest that you mentioned them perfectly which i sometimes needs to go back to remind myself what that code is created for. it was better if each section had a summery or wrap-up also it would be better that it has another app besides mycv, in order to review everything quickly.
Vaibhav
June 29, 2023
It is a good course. But it is lacking behind the new updates and changes the course instructor should review it and make necessary changes. It is a good one for beginners.
Khalil
June 28, 2023
There is a problem with almost every instructor. Stephen Grider over explains every topic and that makes the course very long and boring. Explain one time and write the code, really, explaining one thing in two video doesn't improve the quality... :)
Haseeb
June 28, 2023
Teaches all major concepts pretty good. TIP: If you are new to typescript. Start with the typescript appendix section first.
Leonardo
June 27, 2023
This course is excellent for those who want to learn NestJS from the basics. I learned a lot of concepts and techniques that I never imagined. Thanks
Rivael
June 24, 2023
Instead of just teach how to use NestJS it is also explained the fundamentals surrounding the framework.
Ataline
June 22, 2023
Cette partie est très claire. C'est tellement simplifié et permet de comprendre les différentes briques de nestjs
Nikhil
June 19, 2023
Great delivery. Very clear explanation of each topic. Very rarely would you find an instructor that can create a course that's suitable for beginners, intermediates, and advanced audience at the same time. Stephen is one of them. It shows in all of his courses.
Matt
June 15, 2023
Stephen is very thorough in how/what he is teaching. He also has a very welcoming and friendly tone towards his students. You can tell that he teaches because he genuinely loves doing it. Here is my favorite part of this course: In the beginning of the course, Stephen outlines what tools will be needed, and what proficiencies are expected prior to starting the class work. I was discouraged to hear that you should have SOME experience in typescript, as I have very little. Then he tells you that there is an appendix section at the end of the course you can jump to 'as a refresher', or to just learn typescript. This appendix IS HUGE! It has 5+ hours of material on typescript ALONE.. I was blown away that I received a full-blown typescript course as an addition to the core NestJS material! What a great experience so far!
Jose
June 13, 2023
I am always grateful for the exceptional courses on Udemy taught by Stephen. His thorough preparation for each class and his expertise ensure that you quickly grasp the content and stay on the right track.
Radhe_patel
June 9, 2023
this was very nice course . I am very beginner for learn nest and believe me this was very easy to learn nest with this course.
David
June 1, 2023
Very good course! I worked in the past the whole microservice course too. Very well explained. Some improvements: I would use more jest.fn() mockReturnValue() and so on in tests, instead of making dummy objects. Would be also nice to see some kind of small api working in micro service architecture (Kubernetes/Kafka/RabbitMQ/or some kind of Messengers). Also Many to Many, One to One and so on on TypeORM would be helpful. More QueryBuilder Examples with Joins. But its a GOOD Course ! Keep going !

Coupons

DateDiscountStatus
7/22/202195% OFF
expired
7/29/202195% OFF
expired
3/13/202294% OFF
expired
12/17/202285% OFF
expired

Charts

Price

NestJS: The Complete Developer's Guide - Price chart

Rating

NestJS: The Complete Developer's Guide - Ratings chart

Enrollment distribution

NestJS: The Complete Developer's Guide - Distribution chart
4174580
udemy ID
7/9/2021
course created date
7/22/2021
course indexed date
Bot
course submited by