NestJS
Curriculum
NestJS · TypeScript included

NestJS Tutorial

A complete NestJS path from beginner to pro - modules, DI, REST APIs, auth, databases, testing, and real backend projects. TypeScript included as you need it.

65 lessonsBeginner → ProBackend
Start from the beginning

Curriculum

Work through each section in order. Every lesson ends with practice and key points so the idea sticks.

Beginner

Getting Started

5 lessons · ~54 min
  1. 1
    What is NestJS?

    Learn what NestJS is, what problems it solves, and how it helps you build organized Node.js backends.

  2. 2
    NestJS vs Express (When to Choose)

    Compare NestJS and Express so you can choose the right tool for small scripts, APIs, teams, and long-term apps.

  3. 3
    Learn NestJS Without a Separate TypeScript Course

    See how this tutorial teaches TypeScript exactly when NestJS needs it, using realistic backend examples.

  4. 4
    Install Nest CLI & Create a Project

    Install the Nest CLI, create your first project, run it locally, and understand the starter commands.

  5. 5
    Project Structure Explained

    Understand the important files and folders in a new NestJS project before you start editing.

Beginner

Foundations

5 lessons · ~64 min
  1. 6
    TypeScript Basics Inside Nest (types, classes, decorators preview)

    Learn the TypeScript essentials you will use constantly in NestJS: types, arrays, classes, constructors, and decorators.

  2. 7
    Modules

    Learn how NestJS modules organize controllers, providers, imports, and exports.

  3. 8
    Controllers

    Learn how controllers define HTTP routes and call services to produce responses.

  4. 9
    Providers & Services

    Understand providers, services, @Injectable, and where application logic belongs.

  5. 10
    Dependency Injection

    Learn how NestJS gives classes the dependencies they need and why that makes code easier to test and maintain.

Beginner

Building APIs

7 lessons · ~89 min
  1. 11
    Routing & HTTP Methods

    Build routes with @Get, @Post, @Patch, @Delete, path prefixes, and REST-style naming.

  2. 12
    Params, Query & Headers

    Read route parameters, query strings, and request headers in NestJS controllers.

  3. 13
    Request Body & DTOs

    Use @Body and DTO classes to describe request data for create and update routes.

  4. 14
    Validation with class-validator

    Validate DTOs with class-validator decorators and NestJS ValidationPipe.

  5. 15
    Pipes

    Learn how pipes transform and validate incoming request values in NestJS.

  6. 16
    Status Codes & Responses

    Return useful HTTP status codes, response bodies, and headers in beginner-friendly NestJS controllers.

  7. 17
    Exception Filters Basics

    Use built-in HTTP exceptions and understand how exception filters shape error responses.

Beginner

App Basics

4 lessons · ~51 min
  1. 18
    Config & Environment Variables

    Load environment variables with @nestjs/config and use ConfigService safely in your app.

  2. 19
    Global Modules & Shared Modules

    Understand shared modules, global modules, exports, and when to make utilities available across a NestJS app.

  3. 20
    Lifecycle Events

    Learn the basic NestJS lifecycle hooks used during startup, shutdown, and module initialization.

  4. 21
    Debugging & Nest Dev Workflow

    Use watch mode, logs, curl, debugger habits, and common troubleshooting steps while building NestJS apps.

Beginner

Practice

3 lessons · ~41 min
  1. 22
    CRUD REST Pattern

    Learn the common create, read, update, delete pattern used by many NestJS REST APIs.

  2. 23
    Feature Modules in Practice

    Organize a real feature folder with module, controller, service, DTOs, and clean imports.

  3. 24
    Practical Error Patterns

    Handle common beginner API error cases with clear exceptions, validation, and consistent service logic.

Beginner

Putting It Together

1 lessons · ~15 min
  1. 25
    Mini Project: Tasks API

    Put beginner NestJS concepts together by building a small validated Tasks API.

Intermediate

Request Pipeline

4 lessons · ~45 min
  1. 26
    Guards

    Use NestJS guards to decide whether a request can reach a route handler, with authentication and authorization examples.

  2. 27
    Interceptors

    Wrap request handling with interceptors for response mapping, timing, caching hooks, and cross-cutting behavior.

  3. 28
    Middleware in Nest

    Use Nest middleware for request preprocessing, request IDs, raw logging, and compatibility with Express-style middleware.

  4. 29
    Custom Decorators

    Create custom parameter and metadata decorators to make controllers expressive without hiding business logic.

Intermediate

Auth

4 lessons · ~52 min
  1. 30
    Auth Strategies Overview

    Understand authentication and authorization choices in NestJS before implementing JWT, sessions, Passport, and role checks.

  2. 31
    JWT Authentication

    Implement environment-configured JWT authentication in NestJS with login, token signing, and a route guard.

  3. 32
    Passport Integration

    Integrate Passport strategies with NestJS for reusable local, JWT, and OAuth authentication flows.

  4. 33
    Roles & Permissions

    Build role and permission authorization in NestJS with metadata decorators, Reflector, and guards.

Intermediate

Data

5 lessons · ~65 min
  1. 34
    TypeORM with Nest

    Connect NestJS to relational databases with TypeORM entities, repositories, configuration, and service patterns.

  2. 35
    Prisma with Nest

    Use Prisma as a type-safe database client in NestJS with a PrismaService, schema models, and clean service methods.

  3. 36
    MongoDB / Mongoose with Nest

    Connect NestJS to MongoDB with Mongoose schemas, models, DTOs, and service methods.

  4. 37
    Migrations Mindset

    Treat database schema changes as versioned, reviewed, reversible operations instead of one-off edits.

  5. 38
    Relations & Nested Resources

    Model relational data and nested API routes in NestJS without mixing routing concerns into persistence code.

Intermediate

App Features

4 lessons · ~46 min
  1. 39
    File Uploads

    Handle file uploads in NestJS with Multer interceptors, validation, storage decisions, and safe response design.

  2. 40
    Caching Module

    Use caching in NestJS to reduce repeated work while keeping correctness, invalidation, and TTLs in mind.

  3. 41
    Queues (Bull) Intro

    Move slow or retryable work out of request handlers with Bull queues, processors, and background jobs.

  4. 42
    Task Scheduling

    Run recurring or delayed application tasks with Nest schedule decorators and safe operational patterns.

Intermediate

Quality

4 lessons · ~52 min
  1. 43
    Unit Testing

    Test Nest services, guards, and controllers in isolation with TestingModule, mocks, and focused assertions.

  2. 44
    E2E Testing

    Test complete Nest HTTP flows with a real application instance, Supertest, validation, guards, and database setup.

  3. 45
    OpenAPI / Swagger Docs

    Generate useful OpenAPI documentation for NestJS APIs with SwaggerModule, DTO decorators, tags, and auth metadata.

  4. 46
    Logging

    Add useful NestJS logs with Logger, request context, error details, and production-friendly practices.

Intermediate

Delivery

2 lessons · ~26 min
  1. 47
    API Versioning

    Version NestJS APIs with URI, header, or media-type strategies while keeping compatibility promises clear.

  2. 48
    Deploying NestJS Apps

    Prepare NestJS applications for production with builds, environment variables, health checks, migrations, and process management.

Advanced

Pro Architecture

4 lessons · ~71 min
  1. 49
    Structuring Larger Nest Apps

    Learn how to organize a NestJS codebase so features, modules, providers, and shared utilities stay understandable as the app grows.

  2. 50
    Clean Architecture Patterns in Nest

    Apply clean architecture ideas in NestJS with use cases, ports, adapters, and dependency injection tokens.

  3. 51
    CQRS Intro

    Understand commands, queries, handlers, events, and when the NestJS CQRS module is worth using.

  4. 52
    Event-driven Patterns

    Use events inside NestJS apps and understand the difference between local events, domain events, integration events, and reliable delivery.

Advanced

Distributed Nest

4 lessons · ~70 min
  1. 53
    Microservices Intro

    Learn the NestJS microservices model, transports, message patterns, clients, contracts, and deployment tradeoffs.

  2. 54
    Hybrid HTTP + Microservice Apps

    Run HTTP routes and microservice listeners in one NestJS process while keeping lifecycle, health, and boundaries clear.

  3. 55
    WebSockets / Gateways

    Build realtime features with NestJS gateways, Socket.IO events, rooms, authentication, and scaling considerations.

  4. 56
    GraphQL with Nest (Intro)

    Learn the NestJS GraphQL basics: code-first schemas, resolvers, object types, inputs, auth, and avoiding N+1 queries.

Advanced

Production

4 lessons · ~69 min
  1. 57
    Performance & Scalability Mindset

    Build a practical performance mindset for NestJS apps: measure first, optimize bottlenecks, and scale safely.

  2. 58
    Nest Security Essentials

    Harden a NestJS app with validation, authentication, authorization, secure headers, rate limits, password handling, and secret management.

  3. 59
    Dockerizing NestJS

    Package a NestJS application for production with a multi-stage Dockerfile, .dockerignore, environment variables, and Docker Compose.

  4. 60
    Health Checks, Metrics & Tracing Mindset

    Understand production observability for NestJS: health checks, structured logs, metrics, traces, dashboards, and alerts.

Advanced

Capstone Projects

3 lessons · ~60 min
  1. 61
    Mini Project: Production-style REST API

    Build a small but production-minded Tasks REST API with modules, DTOs, validation, service boundaries, and a clear folder structure.

  2. 62
    Mini Project: Auth Module (JWT + roles)

    Build a focused NestJS auth module with password hashing, JWT login, current user decorators, and role-based guards.

  3. 63
    Mini Project: Realtime Notifications Shell

    Build a realtime notifications foundation with an HTTP endpoint, a service, a WebSocket gateway, rooms, and a simple browser client.

Advanced

Polish & Next Steps

2 lessons · ~29 min
  1. 64
    Common NestJS Mistakes (and Fixes)

    Review common mistakes in advanced NestJS applications and learn practical fixes that improve maintainability and production safety.

  2. 65
    Ecosystem & What to Learn After NestJS

    Plan your next learning path after advanced NestJS: databases, testing, queues, GraphQL, DevOps, observability, and system design.