
Explore how to build and deploy a scalable NestJS microservices backend by composing four independent services into a production-grade architecture built with best practices.
Develop a scalable NestJS microservices backend with a common library and abstract MongoDB repository, implement jwt authentication, Stripe payments, Gmail email notifications, and deploy to Google Cloud Engine using Kubernetes.
Master intermediate to advanced NestJS concepts by building production-grade microservices that go beyond documentation, with prerequisites in controllers, guards, interceptors, and pipes, plus Docker and Kubernetes for deployment.
Explore the system architecture diagram for a NestJS microservices backend, detailing the gateway, reservations, auth, payments, and notification services, with JWT authentication, MongoDB storage, Stripe billing, and Gmail notifications.
Scaffold a NestJS microservices backend using the Nest CLI. Create a mono repo with a shared common library for database access, authentication, and logging.
Build a mongoose-based MongoDB persistence layer for NestJS microservices. Use an abstract database module with env config and Joy validation, enabling swap to sql via type orm.
Create an abstract Mongoose schema and a reusable abstract repository in NestJS to provide common CRUD operations, using lean queries and centralized logging, with not found handling.
Create a reservations microservice in a mono repo using the Nest CLI, generate a reservations resource with REST CRUD operations, and wire it to MongoDB via Mongoose.
Enforce input validation on the reservations API with class-validator and class-transformer via a global validation pipe and whitelist. Enable logging with NestJS Piano and Pinot for request and response data.
Master dockerizing a NestJS reservations app by building a two-stage Node Alpine Dockerfile, using Docker Compose to run development and production images with hot reload and a Mongo service.
Build a nestjs authentication microservice to create users, validate input, and issue JSON web tokens for login using a dedicated users module and repository.
Implement JWT authentication with passport in NestJS microservices, configure the JWT module with secret and expiration from per-service env files, and set up per-service config modules and docker compose.
Implement a local passport strategy in NestJS to authenticate users via email and password, hash passwords with bcrypt, issue a JWT, and store it in an http-only cookie.
Implement a JWT strategy in a NestJS microservice, extracting the token from cookies, validating the user via a JWT strategy and guard, and protecting routes with cookie-parsed authentication.
Wire a JWT-based auth guard across NestJS microservices using a TCP transport, connecting the auth service to the reservations controller, and expose a common guard with RPC calls.
Configure a stripe-enabled payments microservice in NestJS and deploy it as a tcp service. Sign up for Stripe, install the node client, and implement payment intents.
Inject the payments service into the reservations module, set payments host and port in env, and validate and transform a card DTO to bill the user via the payment service.
Integrate reservations with the payments service in a NestJS microservice, validate the create charge DTO, subscribe to the payment observable, and return the created reservation with a Stripe invoice.
Develop a NestJS notification service that emits a notify email event after a successful charge, using TCP microservices, docker-compose, and an email DTO extension.
Learn to implement email notifications in a NestJS microservices stack by configuring NodeMailer with Gmail SMTP, OAuth2 credentials, and a configurable transport, then test end-to-end.
Enable the Gmail API in the Google Cloud Console and update the OAuth consent screen. Add all Gmail scopes and save to configure your OAuth 2.0 client for node mailer.
Learn to deploy a Kubernetes cluster on Google Cloud, manage private Docker images with Artifact Registry, and push production images for four microservices using gcloud CLI and SDK.
Refactor dockerfiles to produce lean production images by copying only the relevant service folders and common libs, isolating dependencies with per-service package.jsons, and push to google cloud.
Automate building and pushing NestJS microservice images with cloudbuild.yaml and gcr.io/cloud-builders/docker, using npm workspace install -r, and a GitHub trigger connected to artifact registry.
Deploy a microservices backend on a local Kubernetes cluster with Helm, create deployments from production images, and configure private artifact registry access via secrets.
Connect your NestJS microservices to a MongoDB Atlas cluster by creating a secure secret for the MongoDB URI and injecting it into Kubernetes deployments with kubectl, helm, and environment variables.
Configure deployment manifests by adding container ports and environment variables, and create google oauth, stripe, and jwt secrets. Expose services for notifications, payments, and auth on ports 3000–3004.
Set up a reservations service as the api gateway, expose it via a Google Cloud load balancer and node port, and configure http/tcp and env vars for auth and notifications.
Create a health check endpoint for ingress using a NestJS health controller and module in libs common, expose a route at /health returning true for reservations and auth services.
Learn to set up a Google Kubernetes Engine autopilot cluster, enable autoscaling, deploy with helm, create and manage secrets, and verify pods and nodes before configuring load balancers.
Create an ingress on Google Kubernetes Engine to provision a single external load balancer, route /reservations and /auth to services, and test.
Learn to deploy NestJS microservices on AWS using ECS with an external load balancer, and automate image builds and deployments via CodePipeline, CodeBuild, and ECR triggered by GitHub commits.
Create an eks cluster with eksctl using a cluster.yaml to set Sleeper in us east 1 with ng1 AT2 micro nodes, deploy with helm and expose via load balancer.
Learn to write end-to-end tests against a running NestJS microservices backend using jest and TypeScript, Docker, and docker-compose to verify health checks across http and tcp services.
Authenticate with the auth service to obtain a JWT, then run end-to-end tests that create and fetch reservations in a NestJS microservice.
Add optional roles to the user DTO and schema, validate each role as a string, and enforce route access with a roles decorator and a guard.
Connect a debugger to running NestJS microservices in Docker, attach on port 9229, and inspect variables and control flow as requests enter the http server using a VS Code launch.json.
NestJS is an incredible backend framework that allows us to build scaleable Node.js backends with very little complexity. A microservice architecture is a popular architecture that allows us to build & deploy several independent applications that communicate with each other via a chosen transport layer.
This course is designed to bridge the gap between NestJS & this microservice architecture. It goes beyond the NestJS documentation to show you how to build a real reservation booking system that accepts payments, sends email notifications, and persists data to a MongoDB, Postgres & MySQL database.
Here are just some of the few additional things you can expect to learn in this course:
Develop a productionized Dockerfile for NestJS microservices
Create a monorepo & shared library for common code
Learn how to create a custom package.json & Dockerfile for each microservice
Automate the build & deployment of Dockerfiles with a custom CI/CD process
Connect microservices together using a TCP transport layer
This course also includes full access to the GitHub repository so you have access to the completed project at all times & can reference this completed code. Additionally, you can post any issues or questions to the QA section & I will be happy to assist you.
By the end of this course, you will know how to build, deploy & test Nestjs Microservices so you can create any scaleable application that you can think of.