InteractiveFrameworks

NestJS

Build a real backend for NestJS in your browser: modules, controllers, providers, dependency injection, pipes, guards and interceptors, graded by calling your endpoints.

courses
10
lessons
92
Start with Basics: First Steps

Courses

Basics

beginner10 lessons · 4 hours

The mental model of every Nest application: modules, controllers, providers and dependency injection, then each stage of the pipeline Nest runs around a request handler. One lesson per page of the official docs' Overview chapter, on one growing cats API.

Fundamentals

intermediate10 lessons · 5 hours

The dependency injection container underneath every Nest application: what a provider token really is, factories, async and dynamic modules, scopes, cycles, the module reference, lazy loading, lifecycle hooks and metadata. One lesson per page of the official docs' Fundamentals chapter, on the same cats API.

Testing

intermediate6 lessons · 3 hours

Tests that run in your browser against real Nest classes: unit tests with the testing module, mocks and spies, controllers and guards in isolation, end-to-end tests over HTTP, and writing the code to make a given test pass. Every test you write is checked by bugs it has to catch.

The whole application

  1. 5End-to-end Tests
  2. 6Test First

Techniques

intermediate18 lessons · 9 hours

The docs' Techniques chapter on the same cats API: configuration from .env, validation and serialization, a real database with TypeORM, then the HTTP toolbox (versioning, cookies, sessions, uploads, streamed files, server-sent events, calling other services) and what runs behind a request (caching, logging, events, scheduled tasks).

Behind the request

  1. 15Caching
  2. 16Logging
  3. 17Events
  4. 18Task Scheduling

Security

intermediate10 lessons · 5 hours

The docs' Security chapter on the same cats API: sign visitors in with JWTs and hash their passwords, decide what each of them may do with roles and policies, do the same the Passport way, then harden the service with helmet, CORS, CSRF protection and rate limiting, and finish with the whole API locked down.

The whole API

  1. 10Securing the API

OpenAPI

intermediate5 lessons · 2.5 hours

Describe the cats API so that people and tools can read it: generate an OpenAPI document from the code you already have, shape every schema, parameter and response with the @nestjs/swagger decorators, declare how callers authenticate, reuse DTOs through mapped types, and serve more than one specification from the same app.

Microservices

advanced9 lessons · 4.5 hours

Split the cats API into a service and a gateway that talk over TCP: request-response messages and events, replies that stream or time out, errors that cross the wire, the pipeline on a message, apps that both serve HTTP and listen for messages, a transport of your own, CQRS, and the health checks an orchestrator reads.

GraphQL

advanced9 lessons · 4.5 hours

Serve the cats API as a GraphQL schema, code first: object types and resolvers, arguments and field resolvers, mutations with validated inputs, enums, scalars, interfaces and unions, guards on the GraphQL context, field middleware and Apollo plugins, subscriptions, and tests that query the schema.

WebSockets

advanced9 lessons · 4.5 hours

Make the cats API live: gateways on socket.io, acknowledgements and events, broadcasts, rooms and namespaces, the request pipeline (filters, pipes, guards and interceptors) around a message instead of a request, connections refused at the handshake, and tests that talk to a gateway like a client.

Capstone: the shelter service

advanced6 lessons · 6 hours

Build one complete NestJS service from a specification, using everything the other courses taught: configuration and validation, a database with transactions, accounts and roles, the hardening a public API needs, an OpenAPI document and live updates over WebSockets, and finally the end-to-end tests that prove it all.