NestJS Mastery: Build & Deploy a Production-Ready API

Go from zero to a deployed & tested NestJS API with TypeScript, TypeORM, PostgreSQL & Docker.

  • 0.0 (0 Reviews)
  • 0 Students
  • 243 Lessons
  • Piotr Jura | 73,000+ Students

Course Overview

Stop building CRUD demos. Start building real APIs that get you hired.

This course takes you from NestJS beginner to production-ready backend developer by building and deploying a complete Task Management API — the kind of portfolio project that stands out to employers.

What you’ll build:

  • Secure JWT Authentication & Role-Based Access Control

  • Advanced Filtering, Sorting & Pagination for real-world data handling

  • Complex Relationships between Tasks, Users & Labels

  • Comprehensive Unit & End-to-End Testing for reliable deployments

  • Dockerized Deployment to get your API live and running anywhere

Skills you’ll master:

  • Clean API Architecture – scalable, maintainable, and easy to extend

  • Authentication & Security – passwords, JWT, and role-based permissions

  • Advanced Database Operations – TypeORM + PostgreSQL beyond basic queries

  • Automated Testing – unit & E2E tests for full confidence in your code

  • Modern DevOps Workflow – containerization & production deployment

Who this course is for:
→ Node.js developers ready to move beyond basic Express apps
→ Backend devs preparing for technical interviews or senior roles
→ Anyone wanting to learn NestJS with real-world architecture & testing
→ Developers who need to confidently deploy production APIs

Tech stack:
NestJS • TypeScript • PostgreSQL • TypeORM • JWT • Docker

This isn’t just about NestJS syntax — it’s about thinking like a senior backend engineer. By the end, you’ll know exactly how to design, build, test, and deploy APIs that are clean, secure, and ready for real users.

See more

FAQ

FAQ area empty

Course curriculum

28 chương 243 bài học 25 giờ 16 phút 7 bài học thử miễn phí
Chương 1 Course Strategy & Pro Developer Setup
Chương 2 NestJS Fundamentals: Thinking in Modules & Services
Chương 3 Building a Production-Grade REST API
  • The Blueprint: Designing Our Task Management API 3:57
  • A Quick Refresher: Core REST API Concepts 10:49
  • API Architecture: The Power of NestJS Modules 2:27
  • Creating Your First Module 1:15
  • Controllers: Your API's Front Door for Incoming Requests 3:49
  • Your First Endpoint: Handling GET Requests 5:06
  • Working with Dynamic Data in URLs (Route Parameters) 7:31
  • Services: Where Your Business Logic Lives 4:54
  • Data Transfer Objects (DTOs): Structuring Your API Data 3:46
  • Implementing the Logic: Fetching Data in a Service 5:16
  • Error Handling Like a Pro: Handling 404s and Other Errors 3:58
  • Creating Resources: Handling POST Requests 7:48
  • Pro Tools: Using Postman & VSCode for Efficient Testing 7:59
  • Bulletproof Validation: Setting Up Automatic Data Validation with Pipes 8:52
  • Testing Your API's Validation Logic 5:40
  • Validating and Transforming Data from the URL 5:13
  • Updating Resources: Implementing PATCH Requests 9:56
  • Stateful Operations: Deleting Resources 5:28
  • Industry Deep Dive: The Difference Between PUT vs. PATCH 2:57
  • Advanced TypeScript: Mastering Mapped Types for Smarter DTOs 5:57
  • Implementing a Complete PATCH Update Flow 7:59
  • Advanced Request Testing: Chaining Requests for Complex Scenarios 8:35
  • Beyond Code: Understanding Domain vs. HTTP Errors 14:24
  • Turning Business Logic Errors into Clean HTTP Responses 5:05
Chương 4 Databases & Professional Configuration
  • From Memory to Database: Section Overview 3:02
  • Environment Configuration Best Practices 6:38
  • Installing and Setting Up NestJS Config 7:20
  • Using ConfigService in Your Services 5:41
  • When Do Modules Need Configuration? Static vs Dynamic Modules 3:14
  • Type-Safe Configuration in NestJS 4:49
  • Validating Configuration with Joi 7:21
  • Setting Up PostgreSQL with Docker Compose 7:38
  • Understanding Docker Basics 4:19
  • Database Configuration with TypeORM and Environment Variables 9:31
  • Connecting TypeORM: Static vs Dynamic Configuration 11:33
  • Creating Type-Safe Config Service in NestJS 5:24
  • Creating Your First Database Entity with TypeORM 11:06
  • TypeORM Synchronize: A Production Warning 4:04
  • Understanding Database Column Types & Primary Keys 5:40
  • What is Repository Pattern in NestJS 4:17
  • Understanding forFeature: Repository Creation & Module Boundaries 4:40
  • @InjectRepository Explained 3:39
  • Implementing Repository Methods & Async Operations 13:23
Chương 5 Mastering Complex Data: TypeORM Relationships
  • Adding User Entity & One-to-Many Explained 6:18
  • Adding Task-User Relationship with TypeORM 9:24
  • Quick Fix: Adding User ID to Our API 5:37
  • Adding Labels to Our Tasks 6:58
  • Ensuring Unique Labels Per Task 6:40
  • Implementing Label Cascading in Tasks 4:39
  • Validating Nested Object Arrays in DTOs 5:54
  • Using Cascading to Auto-Create Labels 4:51
  • Using Cascading to Auto-Update Labels 7:06
  • Adding Related Records to Existing Entities 7:49
  • Implementing a Nested Resource Endpoint 7:46
  • Ensuring Unique Labels with a Helper Method 4:56
  • Avoiding Duplicate Labels on Add 6:24
  • Fixing Entity Delete Error with Relations 3:12
  • Removing Labels from Tasks 11:32
Chương 6 Advanced Queries: Search, Pagination & Filtering
  • Filtering Tasks by Status 7:04
  • Implementing Pagination Parameters and Response Types 6:52
  • Adding Pagination to Tasks List 8:00
  • Simple Text Search With LIKE Operator 9:36
  • Using Query Builder for Advanced Filtering 9:08
  • Filtering Tasks by Labels with IN Clause 10:34
  • Using SQL Subquery for Label Filtering 7:08
  • Adding Custom Sorting to Task List 6:24
Chương 7 Bulletproof Security: JWT Authentication & TDD
  • Installing Authentication Dependencies 5:26
  • Adding Authentication Config 8:07
  • Setting up Users (Authentication) Module 5:17
  • User Registration DTO and Importance of Unit Testing 9:41
  • Preparing Unit Tests Structure 7:11
  • Writing First Unit Test for DTO 5:39
  • Adding Detailed Unit Test Cases 9:37
  • Test-Driven Development for Password Validation 13:36
  • Wrapping Up TDD for Password Validation Testing 8:35
  • Implementing Password Security Service 7:03
  • Testing PasswordService - Mock & Spy 10:37
  • Exercise - Remaining PasswordService Tests 4:06
  • Solution - Remaining PasswordService Tests 2:25
Chương 8 Full-Stack Testing & Authorization
  • Adding User Service with Repository Pattern 6:08
  • Creating Authentication Service Layer 10:00
  • JWT Tokens Explained with Metro Tickets 8:40
  • Building JWT Token Payload 2:14
  • Implementing Secure Login Authentication 4:40
  • Creating Authentication API Endpoints 7:48
  • Introducing End-to-End Tests 3:53
  • Setting Up Test Configuration 6:37
  • Building a Reusable E2E Test Environment 6:21
  • Running the E2E Test 7:06
  • Writing Our First Authentication Test 5:13
  • Securing Sensitive Data in API Responses (Serialization) 6:27
  • Testing Duplicate Registration Handling 2:50
  • Converting Login Response to a Class 5:13
  • Adding JWT Authentication Guard 8:36
  • Adding Protected Profile Endpoint 6:12
  • Testing Protected Routes with JWT 5:10
Chương 9 Advanced Security: Authorization, Roles & Data Ownership
  • The "Secure by Default" Principle: Applying a Global Auth Guard 5:17
  • Creating Escape Hatches: A Custom @Public() Decorator for Public Routes 7:34
  • Beyond Login: Embedding User Roles into Your JWTs (RBAC) 9:47
  • Building an "Admin-Only" Area with a Role-Based Guard 9:35
  • E2E Testing: Verifying Your Role-Based Access Control 7:05
  • The Most Important Security Rule: Data Ownership (Preventing Cross-User Access) 2:21
  • Security Hardening: Protecting the Registration Endpoint & Refining Tests 6:03
  • Preparing the Battlefield: E2E Test Setup for the Tasks API 8:37
  • Test-Driven Security: Writing a Failing Test for Cross-User Data Access 8:52
  • A Developer's Best Friend: Creating a Custom @CurrentUser Decorator 4:23
  • The Fix: Implementing Record-Level Security 3:59
  • Final Verification (Test): Ensuring the Task List is Correctly Scoped 3:50
  • Applying the Fix: Scoping the Main Task List to the Current User 2:43
Chương 10 Go Live! Deployment & Production Best Practices
  • Adding TypeORM Migrations and Database Configuration Scripts 11:21
  • Git and GitHub (Required) 8:30
  • Initializing App Platform 5:50
  • Final Touches and Deploying on DO App Platform 14:25
  • Successful Deployment, Analytics and Logs 3:27
Chương 11 (OLDER CONTENT) Introduction to the Course
  • Welcome!
Chương 12 (OLDER CONTENT) Introduction to NestJS
  • Introduction to NestJS - Section Intro 0:39
  • Installing and Using Nest CLI 2:29
  • NestJS Project Structure 4:56
  • Understanding the Core Concepts
Chương 13 (OLDER CONTENT) Controllers, Routing, Requests
  • Controllers, Routing, Requests - Section Intro 2:28
  • Controllers 5:14
  • Resource Controller 6:34
  • Controllers, Routing, and HTTP Methods
  • Route Parameters 3:13
  • Request Body 2:06
  • Responses and Status Codes 5:19
  • Mastering Routes and Responses
  • Request Payload - Data Transfer Objects 3:05
  • The Update Payload 4:22
  • A Working API Example 12:21
  • Data Handling and Object Management
Chương 14 (OLDER CONTENT) Database Basics
  • Database Basics - Section Introduction 3:05
  • Adding Docker to the Stack 3:12
  • Running the Database with Docker Compose 6:56
  • Introduction to ORMs 2:16
  • Issue and Solution With Connecting to MySQL Database
  • Connecting to the Database 3:58
  • Prefer Postgres over MySQL? Here's your guide!
  • The Entity (Primary Key & Columns) 7:50
  • Repository Pattern 2:32
  • TypeORM 3 UPGRADE GUIDE! 3:05
  • Repository in Practice 6:34
  • Repository Querying Criteria and Options 8:40
Chương 15 (OLDER CONTENT) Data Validation
  • Data Validation - Section Introduction 3:28
  • Introduction to Pipes 2:32
  • Input Validation 6:05
  • Validation Groups and Options 5:32
Chương 16 (OLDER CONTENT) Modules, Providers, Dependency Injection
  • Modules, Providers, Dependency Injection - Section Introduction 7:24
  • Introduction to Modules, Providers and Dependency Injection 3:36
  • Creating a Custom Module 2:46
  • Static Modules and Dynamic Modules 4:31
  • Standard & Custom Providers 7:26
Chương 17 (OLDER CONTENT) Configuration, Logging, and Errors
  • Application Config and Environments 5:20
  • Custom Configuration Files and Options 6:16
  • Logging 3:27
  • Exception Filters 2:15
Chương 18 (OLDER CONTENT) Intermediate Database Concepts
  • Understanding Relations 1:41
  • One To Many Relation 5:40
  • Loading Related Entities 3:17
  • Associating Related Entities 6:10
  • Many To Many Relation 6:47
  • Query Builder Introduction 7:41
  • Joins And Aggregation with Query Builder 8:50
  • Filtering Data Using Query Builder 8:56
  • Pagination Using Query Builder 8:45
  • Updating, Deleting, Modifying Relations using QB 12:28
  • One to One Relation 4:13
Chương 19 (OLDER CONTENT) Authentication, JWT, Authorization
  • Introduction to Authentication 3:38
  • Local Passport Strategy 7:32
  • Logging In - Passport Strategy with a Nest Guard 6:28
  • JWT - JSON Web Tokens Introduction 4:21
  • JWT - Generating Token 7:14
  • JWT - Strategy & Guard - Authenticating with JWT Token 5:59
  • Hashing Passwords with Bcrypt 2:26
  • Custom CurrentUser Decorator 3:50
  • User Registration 11:16
  • Only Authenticated Users Can Create Events 8:48
  • Only The Owners Can Edit or Delete Events 6:21
Chương 20 (OLDER CONTENT) Data Serialization
  • Interceptors and Serialization 1:50
  • Serializing Data 5:31
  • Serializing Nested Objects 3:37
Chương 21 (OLDER CONTENT) (Practical) Building Full Events API
  • (Practical) Building Full Events API 1:53
  • Relations Between Entities 5:43
  • Getting Event Attendees 6:33
  • Getting Events Organized by User 7:50
  • Current User Event Attendance - the Business Logic 7:36
  • Current User Event Attendance - the Controller 9:18
  • Events Refactoring 14:42
Chương 22 (OLDER CONTENT) Introduction to Testing (Manual/Automatic)
  • Manual Testing with Postman 6:47
  • Introduction to Automated Testing 1:59
  • Introduction to Jest 4:33
Chương 23 (OLDER CONTENT) Unit Testing (Testing Isolated Code)
  • Basic Unit Test and Code Coverage 6:38
  • Test Grouping, Spies, Mocks, Setup and Teardown 20:57
  • Nest Testing Utilities 4:56
  • Complex Unit Tests Part 1 6:14
  • Complex Unit Tests Part 2 9:42
  • Complex Unit Tests Part 3 6:06
Chương 24 (OLDER CONTENT) End to End Testing (Testing Entire Features)
  • Introduction to E2E Testing 7:32
  • E2E Tests with Data Fixtures 8:49
  • Exploring E2E Tests 9:02
  • Dealing with Big E2E Test Suites 9:22
Chương 25 (OLDER CONTENT) Upgrading Nest 7 to Nest 9
  • Upgrade Guide for Existing Students Nest 7 to Nest 9 6:49
Chương 26 (OLDER CONTENT) GraphQL APIs - Part 1 - Basics
  • What is GraphQL? 2:38
  • How Does GraphQL API Work? 4:48
  • REST vs GraphQL APIs! 3:48
  • Setting Up and Configuring a GraphQL Module 7:09
  • First Resolver, Query and Type! 14:05
  • Nullable Fields & Nested Objects on Types 8:29
  • Query Arguments 7:38
  • Handling Errors Using Exception Filter 7:48
  • Mutations & Input Types (How to Make Changes Using GQL) 10:03
  • Input Types & Data Validation 6:01
  • Resolving Nested Objects & Lazy Database Relations 8:34
  • Field Resolvers 7:04
  • Working with Enums in GraphQL 5:02
  • Editing Data in GraphQL (Edit Input Types) 8:22
  • Not All Fields Should Change - Using Partial/Omit 2:50
  • Deleting in GraphQL 8:55
  • Course, Subject and Teacher Resolvers 15:10
Chương 27 (OLDER CONTENT) GraphQL - Part 2 - Authentication & Authorization + Refactoring
  • Authorization in GraphQL 9:20
  • Authentication Refactoring Visualized 4:54
  • Extract Authentication Logic Into the AuthService (Reusability) 5:34
  • Authentication Resolver - Logging In using GraphQL 8:30
  • Getting Current User in GQL & Me Resolver 8:30
  • Refactoring User Registration Introduction 1:39
  • Moving of User Creation into the UserService 8:30
  • Creating an "Identical Password" Custom Validator 10:44
  • Checking if the User Already Exists Using a Validator 14:49
  • User Registration Mutation in GraphQL 6:38
  • Refactoring Pagination For GraphQL using Tests & Advanced TS Types 12:54
  • Paginated GraphQL Query Results 5:35
Chương 28 (OLDER CONTENT) Bonus
  • Course Roundup

Requirment

  • Solid JavaScript Fundamentals: You should be comfortable with modern JS features (ES6+), like async/await, classes, and modules.

  • Basic Node.js & npm Experience: You know how to initialize a project and install packages.

  • Don't worry about being a TypeScript or SQL expert. I will guide you through everything you need to know to be successful.

Outcomes

  • Go from NestJS basics to advanced, production-ready patterns.

  • Build and deploy powerful REST and GraphQL APIs from scratch.

  • Write unit & E2E tests that give you 100% confidence to ship your code.

  • Implement a complete authentication system with JWT and access roles.

  • Connect to a real database with TypeORM and master the Query Builder.

  • Containerize your application with Docker for a professional development workflow.

  • Automatically validate and protect your API from bad data.

  • Design and build a portfolio-ready project that will impress employers.

  • Pinpoint and fix performance issues like a senior developer.

  • Set up professional-grade logging to monitor your app in production.

Instructor

...
Piotr Jura | 73,000+ Students

0.0

  • ... 0 Student
  • ... 2 Courses
  • ... 0 review

View Details

Reviews

Rate this course :

Remove all