Tom Ray/[Basic Plan]: Learn NestJS By Building Projects

  • $419

[Basic Plan]: Learn NestJS By Building Projects

  • Course
  • 40 Lessons

An immersive, hands-on course where you'll learn NestJS by building real-world projects from scratch, covering NestJS concepts and best practices.

Contents

👋 Welcome!

Get ready to start your NestJS mastery journey.

Through various projects, you'll learn the following techniques and concepts:

  • Building a REST API with full CRUD functionality using NestJS Controllers, Middleware & Pipes

  • Authentication, Authorization, Guards & Sessions

  • Persisting data to a database and cache

  • Processing jobs in a queue

  • Unit testing, integration testing and end-to-end testing

  • Realtime app using Websockets

  • Fullstack monorepo

  • All projects will include deployment

👋 Read me!
Preview

Project 1: Random Emoji Generator API

There are many NestJS tools at your disposal when building an application, specifically:

  • Middleware

  • Guards

  • Interceptors

  • Pipes

  • Exception Filters

  • Decorators

In this project, we’re going to explore the purpose of these tools, how they fit together and the order of their execution in the NestJS lifecycle by building a random emoji generator API.

With this understanding, you’ll have an excellent foundation for building NestJS applications for the projects ahead.

Introduction & project preview
Preview
Project pre-requisites & set up
The NestJS lifecycle
Middleware
Guards
Interceptors (before handlers)
Pipes
Route handlers
Interceptors (after handlers)
Exception filters
Dependency Injection
E2e testing
CI/CD set up with Github Actions
Deployment with Railway

Project 2: The Ultimate NestJS Starter

The starter repos will also serve as excellent NestJS starter repos for any future projects you start outside of the course!

Here’s what’s included in the starter repos:

  • Adding to the tsconfig.json file

  • Setting up the ConfigModule and environment variables for Jest

  • Enforcing consistent HTTP response structure

  • Configuring some basic HTTP security

  • Adding whitelisted validation to the NestJS server

  • Setting up NestJS logging

  • Docker compose set up for a Postgres database & Redis

  • Prisma setup (the ORM we’ll be using in each project to interact with the database)

  • Redis and CacheService setup

  • Jest config (including env variables)

  • Setting up a CI Pipeline using Github Actions

Introduction & project preview
Preview
Project set up
Adding a Core module with ConfigModule set up
Using an interceptor to enforce a consistent HTTP response structure
Security considerations (Helmet & validation pipes)
Setting up a custom Logger
Docker Compose set up for Postgres & Redis
Interacting with the database (using Prisma)
Interacting with the cache (using Redis)
Unit testing
Integration & e2e testing
Setting up the CI/CD pipeline
Deployment (with Railway)

Project 3: URL Shortener API

We’re going to build a URL shortening API that’s meant to be used as an internal tool for the company you work for.

E.g. Imagine you work for a startup and you need a URL shortening tool, and you decide to build one instead of paying for an existing solution.

Topics covered:

  • REST endpoints with CRUD functionality

  • Paginating and filtering a GET request that returns a list

  • Validation with DTOs and pipes

  • Persisting data to a database

  • Basic API key authentication using guards

  • Using the config module

  • Unit testing, integration testing and end-to-end testing

Introduction & project preview
Preview
Project set up
Adding the CRUD endpoints
Business logic: creating a shortened URL
Business logic: redirecting a short URL
Business logic: Updating and deleting a short URL
Business logic: return list of saved short URLs
API key authentication
Unit testing
Integration testing
E2e testing
Deployment (with Railway)