Ưu đãi trong tuần: Nhập mã UD50 giảm 50k cho đơn từ 300k!
Trang chủ
Menu

NestJS Masterclass - NodeJS Framework Backend Development

NestJS Masterclass - Phát triển Backend với Framework NodeJS

NestJS Masterclass - Phát triển Backend với Framework NodeJS

Sử dụng NestJS cùng Node và TypeScript để xây dựng REST API Backend với TypeORM, PostgreSQL, MongoDB, kiểm thử và triển khai lên AWS.

4.7
(864 đánh giá)
4,845 học viên
Giảng viên
Manik (Cloudaffle)
Phụ đề Việt chất lượng cao Phụ đề tiếng Anh Bán chạy Đánh giá cao
50.000đ 349.000đ -86%
✓ Xem giỏ hàng và thanh toán
Bao gồm phụ đề tiếng Việt, tiếng Anh
24.0 giờ video
244 bài giảng
Truy cập vĩnh viễn
Học trên mọi thiết bị
Cập nhật: 01/06/2026

Bạn sẽ học được gì

Hiểu rõ toàn bộ cấu trúc của một ứng dụng NestJS. Làm quen với Framework NestJS và tất cả các thành phần của nó.
Xác thực người dùng bằng JSON Web Tokens và Xác thực Google. Bao gồm refresh token và các phương pháp bảo mật tốt nhất.
Triển khai ứng dụng lên môi trường production trên AWS cloud với Cloudfront và S3 để lưu trữ file media.
Tìm hiểu chi tiết về dependency injection trong NestJS và hiểu cơ chế hoạt động đằng sau nó.
Làm việc với TypeORM và PostgreSQL. Đi sâu vào các quan hệ cơ sở dữ liệu, transactions, migrations và truy vấn bằng TypeORM.
Xác thực dữ liệu request bằng pipes trong NestJS và Serialization dữ liệu response bằng Interceptors.
Tìm hiểu sâu về NestJS Guards để lọc request và custom Decorators để thêm metadata, chỉnh sửa request payload.
Hướng dẫn chi tiết và chuyên sâu về Môi trường và Cấu hình trong ứng dụng NestJS, bao gồm xác thực các Biến môi trường.
Tạo tài liệu cho các endpoint REST API bằng Open API Specifications và Swagger.
Sử dụng Compodoc để tạo tài liệu code và tổ chức codebase cho các nhóm phát triển lớn.
Tận dụng kiểm thử trong NestJS bằng cách viết Unit Test cũng như End-to-End test cho ứng dụng của bạn.
Sử dụng MongoDB cùng Mongoose để tạo data schema và lưu dữ liệu trong MongoDB bằng NestJS.
Học cách upload file bằng NestJS và lưu file media trên Amazon S3 để phục vụ qua Cloudfront CDN.
Hiểu toàn bộ vòng đời request và response trong NestJS cùng vai trò của từng thành phần cấu trúc.
Học cách thiết kế và phát triển REST API theo các tiêu chuẩn và phương pháp tốt nhất trong ngành.

Yêu cầu

Có hiểu biết cơ bản về TypeScript và/hoặc JavaScript.

Đối tượng phù hợp

Dành cho Node hoặc JavaScript Developers cần một framework mạnh mẽ để phát triển backend.
TypeScript developers muốn chuyển sang phát triển backend.
Node developers muốn học cách xây dựng REST API backend hiệu suất cao.
Các nhóm phát triển lớn đang tìm kiếm một framework cho phát triển backend Node JS.
Developers muốn học cách sử dụng NestJS với TypeORM và Mongoose cùng PostgreSQL và MongoDB.
Bất kỳ ai muốn học framework NestJS và cần có kiến thức chuyên sâu về framework này.

Nội dung khóa học

22 phần • 244 bài giảng
1 Giới thiệu khóa học NestJS Masterclass
2 Chúng ta sẽ xây dựng gì trong khóa học này
3 NestJS là gì
4 Thiết lập Môi trường Phát triển
5 Cài đặt NestJS CLI
6 Tạo Ứng dụng NestJS Đầu tiên
7 Boilerplate Code trong NestJS
8 Lộ trình Học tập Tối ưu cho Khóa học
1 Modules là gì?
2 Cách NestJS Khởi động (main.ts)
3 Hiểu về app Module
4 Tạo một users Module mới
5 REST API là gì
6 Thiết lập Postman và httpYac
7 Tạo Controllers
8 Làm việc với Routing Decorators
9 Params, Query và Body
10 Cập nhật sang Optional Parameters
11 Các Thành phần Request Bổ sung
12 Providers trong NestJS
1 Pipes là gì?
2 Nhu cầu Xác thực và Chuyển đổi
3 Xác thực Params với Built-in Pipes
4 Xác thực Query Params
5 Giới thiệu về DTO
6 Tạo DTO Đầu tiên của chúng ta
7 Kết nối DTO với Route Method
8 Global Pipes và Tránh Request Độc hại
9 Chuyển đổi thành một Instance của DTO
10 Sử dụng DTOs với Params
11 Sử dụng Mapped Types để Tránh Trùng lặp Code
1 Giới thiệu về Inversion Of Control
2 Dependency Injection trong NestJS
3 Tạo một users Service
4 Phương thức findall Users
5 Phương thức findOneById Users
6 Thực hành: Tạo một Posts Module
7 Lời giải: Tạo một Posts Module
8 Các Loại Dependencies
9 Tạo Route GET Posts với DTO
10 Trả về Posts từ Posts Service
11 Sử dụng Users Service bên trong Posts Service
12 Thực hành: Tạo một Auth Module
13 Lời giải: Tạo một Auth Module
14 Circular Dependency
1 Tạo tài liệu với NestJS
2 Open API Specification
3 Kích hoạt Swagger trong NestJS
4 Thêm các Phương thức Cấu hình vào Swagger
5 Tạo tài liệu cho GET users
6 Thực hành: POST Endpoint và DTO cho Posts Controller
7 Lời giải: POST Endpoint và DTO cho Posts Controller
8 Thêm Xác thực vào CreatePostDto
9 Làm việc với Nested DTOs
10 Kiểm thử Xác thực
11 Sử dụng Swagger để Tạo tài liệu cho CreatePostDto
12 Mapped Types sử dụng Swagger
13 Bắt đầu với Compodoc
14 Phạm vi Compodoc và JSDocs
1 Làm việc với Cơ sở dữ liệu trong NestJS
2 ORM là gì?
3 Cài đặt PostgreSQL cục bộ
4 Thêm psql vào PATH
5 Kết nối NestJS với PostgreSQL
6 Sử dụng Async Configuration
7 Hiểu biết Lý thuyết về Repository Pattern
8 Tạo Entity Đầu tiên - user.entity
9 Mở rộng Định nghĩa Entity
10 Tạo Repository Đầu tiên
11 Thực hành: Tạo Post Entity
12 Lời giải: Tạo Post Entity
1 Quan hệ trong Cơ sở dữ liệu SQL
2 Tạo Tags Entity
3 Tạo Meta Options Entity
4 Cập nhật các File DTO
5 Tự động tải Entities
6 Quan hệ Một-Một
7 Quan hệ Một-Một Một chiều
8 Tạo MetaOptions Service
9 Tạo Post với Quan hệ
10 Tạo Cascade với Quan hệ
11 Truy vấn với Eager Loading
12 Xóa các Entity Liên quan
13 Quan hệ Một-Một Hai chiều
14 Tạo một Quan hệ Hai chiều
15 Xóa Cascade với Quan hệ Hai chiều
16 Quan hệ Một-Nhiều
17 Tạo Quan hệ Một-Nhiều
18 Tạo Post với Tác giả
19 Eager Loading Tác giả
20 Quan hệ Nhiều-Nhiều
21 Thực hành: Service để Tạo Tags
22 Lời giải: TagsService
23 Kiểm thử Tags Service
24 Quan hệ Nhiều-Nhiều Một chiều
25 Truy vấn Quan hệ Nhiều-Nhiều
26 Cập nhật Post với Tags mới
27 Xóa Post và Quan hệ
28 Quan hệ Nhiều-Nhiều Hai chiều
29 Xóa Cascade với Quan hệ Nhiều-Nhiều
30 Xóa mềm Tags
1 Giới thiệu về Môi trường
2 Cài đặt Config Module
3 Sử dụng Config Service
4 Xác nhận NODE_ENV trong khi Kiểm thử
5 Tải Môi trường theo Điều kiện
6 Inject thông tin Cơ sở dữ liệu
7 File cấu hình Tùy chỉnh
8 File Config với Namespaces
9 Cấu hình Module và Đăng ký Một phần
10 Xác thực Biến môi trường
1 Giới thiệu về Xử lý Ngoại lệ
2 Built-in Http Exceptions
3 Xác định các Điểm có thể Xảy ra Lỗi
4 Mô hình Xử lý Ngoại lệ Ràng buộc
5 Xử lý Ngoại lệ Tạo User
6 Ném một Ngoại lệ Tùy chỉnh
7 Thực hành: Xử lý Ngoại lệ Cập nhật Post
8 Lời giải: Xử lý Ngoại lệ Cập nhật Post
1 Hiểu về Transactions
2 TypeORM QueryRunner
3 Tạo Transaction Đầu tiên
4 Tại sao Create Post không phải là một Transaction
5 Tạo nhiều Providers
6 Cập nhật DTO
7 Thực hành: Xử lý Ngoại lệ cho CreateManyUsers
8 Lời giải: Xử lý Ngoại lệ cho CreateManyUsers
1 Giới thiệu về Phân trang
2 Tạo Pagination Query DTO
3 Thêm Phân trang vào Truy vấn
4 Pagination Module và Interface
5 Sử dụng paginateQuery
6 Xây dựng Response Object
7 Phản hồi Phân trang Hoàn chỉnh
1 Giới thiệu về Xác thực
2 Mã hóa và Thêm muối vào Mật khẩu
3 Tạo Hashing Providers
4 Triển khai Hashing Provider
5 Đăng ký Người dùng
6 Controller Đăng nhập Người dùng
7 Hoàn thiện phương thức signIn
8 Mã Phản hồi Tùy chỉnh
9 Hiểu về JWTs
10 Thêm Cấu hình JWT
11 Tạo JWT
12 Chữ ký JWT Token
1 Giới thiệu về Guards
2 Tạo AccessTokenGuard
3 Hoàn thiện Triển khai AccessTokenGuard
4 Kiểm thử AccessTokenGuard
5 Áp dụng AccessTokenGuard Toàn cục
6 Thực hành: Xác thực cho JWT env Variables
7 Lời giải: Xác thực cho JWT env Variables
8 Decorators là gì
9 Decorator Đầu tiên của chúng ta
10 Chiến lược Authentication Guard
11 Tạo AuthenticationGuard
12 Triển khai AuthenticationGuard
13 Hiểu về User Payload
14 Tạo Active User Decorator
15 Thực hành: Tái cấu trúc createPostDto
16 Lời giải: Tái cấu trúc createPostDto
1 Giới Thiệu Về Refresh Tokens
2 Cấu Hình Refresh Token
3 Tạo Provider Sinh Tokens
4 Phương Thức Generate Tokens
5 Tạo Refresh Token Khi Đăng Nhập
6 Tạo Access Token Từ Refresh Token
7 Tạo Endpoint Cho Refresh Token
1 Chiến Lược Xác Thực Google
2 Tạo Dự Án Google
3 Thiết Lập Cấu Hình
4 Khởi Tạo Google Auth Client
5 Triển Khai Chiến Lược Xác Thực Google
6 Thực Hiện Xác Thực Với Google Token
7 Ứng Dụng React Ở Front-End
8 Phương Thức createGoogleUser
9 Hoàn Tất Xác Thực Google
10 Kiểm Thử Xác Thực Google
1 Giới Thiệu Interceptors và Serialization
2 Serializing User Entity
3 Global Data Interceptor
4 Thêm API Version
1 Giới Thiệu Về Tải Lên Tệp Tin
2 Thiết Lập S3 Và Cloudfront
3 Module Uploads Và Cấu Hình
4 Tạo Upload Entity
5 Upload File Service Và Controller
6 UploadToAwsProvider
7 Hoàn Tất Uploads Service
8 Kiểm Thử Tải Lên Tệp Tin
1 Giới Thiệu Về Email Thông Báo
2 Thiết Lập Tài Khoản Mailtrap
3 Cấu Hình Cho Email Thông Báo
4 Cấu Hình NestJS Mailer
5 Tạo MailService
6 Kiểm Thử Email Service
7 Bật Inline CSS
1 Giới Thiệu Về Kiểm Thử
2 Cài Đặt Kiểm Thử
3 Hiểu Về Unit Tests
4 Kiểm Thử UsersService
5 Mocking Providers
6 Kiểm Thử Phương Thức Service
7 Tạo Spec File Mới Cho CreateUserProvider
8 Mocking Repositories
9 Mocking Các Providers Khác
10 Dùng Mock Repository Để Kiểm Thử
11 Chạy Các Bài Kiểm Thử
1 Kiểm Thử End To End Là Gì
2 Cơ Sở Dữ Liệu Kiểm Thử Và Cấu Hình
3 Đóng Gói Logic Tạo Ứng Dụng
4 Tạo Bài Kiểm Thử E2E Đầu Tiên
5 Hoàn Tất Vòng Đời Tải Ứng Dụng
6 Đóng Gói Quá Trình Khởi Chạy Ứng Dụng
7 Giới Thiệu Về SuperTest
8 Giới Thiệu Về Faker
9 Kiểm Thử Các Xác Thực
10 Hoàn Tất Tất Cả Các Trường Hợp Kiểm Thử
1 Giới Thiệu MongoDB Với Mongoose
2 Tạo Tài Khoản MongoDB
3 Cấu Hình MongoDB
4 Schema Đầu Tiên - User
5 Post Schema
6 Tạo Bằng Model
7 Mongoose Sub Documents
8 Single Sub Document
9 Thực Hành: Module Tags
10 Giải Pháp: Module Tags
11 Thực Hành: Tags Service + Controller
12 Giải Pháp: Tags Service + Controller
13 Mảng Các Sub Documents
14 Truy Vấn Sub Documents
1 Chiến Lược Triển Khai
2 Tạo Một EC2 Instance
3 Cài Đặt Node, NPM và GIT
4 Cài Đặt PostgreSQL
5 Cài Đặt Và Cấu Hình NGINX
6 Git Clone Và Cài Đặt
7 Tạo File .env
8 Hiểu Về Migrations
9 Tạo Và Chạy Migrations
10 Kiểm Thử Migration Trên EC2
11 Chạy Ứng Dụng Với PM2

Giới thiệu khóa học

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.

 

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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. 

  10. 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.

  11. 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.

  12. 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.

  13. 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.

  14. 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.

  15. 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.

  16. 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.

  17. 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.

Khóa học liên quan

Khám phá thêm các khoá học cùng chủ đề

Hiển thị tất cả khoá học Backend Development
Hiển thị tất cả khoá học Nestjs
Hiển thị tất cả khoá học Node Js
Hiển thị tất cả khoá học Typescript
Zalo
Tôi có thể tư vấn khoá học cho bạn 😊