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
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.
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
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
We’re going to build a real-estate API that allows you to create real estate listings with photos. The photos are added to a queue for processing in the background (where we’ll upload the file to Google Cloud Storage and store the public image url in the database).
Here are the topics and features we’ll cover in this project:
Handling and validating file uploads
Sending files to a queue as jobs
Processing the jobs in the background
Viewing the queue jobs in a UI
Using Google Cloud Storage to store the files
Validation with DTOs and pipes
Unit testing, integration testing and end-to-end testing
In this project, we'll be building a basic Slack clone.
We'll use a monorepo setup, with NestJS powering the API and backend capabilities, and NextJS used as the frontend.
Specifically, this project will cover:
Setting up a monorepo with NestJS & NextJS
Implementing Google Authentication
Implementing browser sessions and refresh tokens
Setting up a Websocket server
⚠️ A few things worth noting:
As this course is NestJS focused, I'm not going to cover much on the frontend. If you get stuck on the frontend, you can check out the Github repo for this project.
Due to the size of this project (it's a big one) and the fact that testing has been covered extensively in other projects, testing is not covered in this project