
Learn the core NestJS concepts—dependency injection, inversion of control, single responsibility principles, modules, middleware, and dto usage—and apply them to an ecommerce API with JWT authentication, authorization, and Swagger UI.
Learn NestJS to build backend applications with TypeScript, using object-oriented programming and dependency injection in a modular architecture featuring modules. Explore microservice support, testing options, and documentation for maintainable projects.
Explore NestJS setup and project structure, from installing the CLI and creating a new project to running in dev mode, and understand the src folder, controllers, and hello world.
Create a NestJS controller with a class and @Controller decorator to handle requests, route URLs, and return responses, such as a get endpoint for /products.
Learn the single responsibility principle by separating concerns into controller, service, and repository, where the controller handles requests, the service manages business logic, and the repository handles database operations.
Explore the Nest.js provider concept, where a class can be treated as a provider and injected as a dependency, using inversion of control to achieve loosely coupled architecture.
demonstrates inversion of control to replace tightly coupled dependencies with constructor injection, achieving a loosely coupled design by wiring a car into a person and swapping vehicles in nest.js backends.
Discover how inversion of control and dependency injection refactor a tightly coupled app.controller.ts by using a constructor-injected private testService with read only access, illustrating dependency injection in NestJS.
discover how dependency injection in NestJS delegates object creation to an inversion of control container. use @Injectable providers registered in a module to inject services and repositories into a controller.
Explore how dependency injection works in NestJS by examining the inversion of control container, injectable providers, and automatic injection of services into controllers.
Explore how Nest.js uses modules to organize an app, with root app module, feature modules like user, order, and chat, and manage providers, controllers, imports, and exports through dependency injection.
Build a post module in NestJS by creating the post controller, service, and module, export the module, and import it into the app module to connect backend components.
Learn how middleware works in NestJS, inspired by express middleware, using a logger that logs requests and is applied in the app module via configure and forRoutes as global middleware.
Learn to apply middleware globally in the app module or selectively in the post module, using a logger for all routes and a post middleware for /posts.
Explore how NestJS handles errors using exception filters, throwing built-in http exceptions (BadRequestException, ForbiddenException, UnauthorizedException) and custom exceptions, and how to test responses for correct status codes.
Explore how NestJS pipes are injectable classes that implement PipeTransform to transform inputs, like strings to numbers, and validate parameters with ParseIntPipe.
Learn how NestJS guards, a dependency injection class implementing CanActive, protect route handlers and enforce authorization with a single responsibility.
Explore NestJS interceptors as dependency injection components and aspect oriented programming, see how they run before and after method execution, and compare them with middleware using UseInterceptor at controller level.
Discover how to create and use custom decorators in NestJS, including @Request, @Param, @Body, and @Query, plus a mock @User decorator.
Review the core NestJS concepts—controller, provider, module, middleware, exception filter, pipe, guard, and interceptor—and read the official documentation to apply them in a future project.
Learn to create a NestJS project with a simple blog post API using MongoDB in the first of two course projects, and preview a SQL-based second project.
Discover how to use the Nest CLI to scaffold modules, controllers, and services with Nest generate (g) and schematics, and see automatic app module updates.
Install Mongoose to enable NestJS to work with MongoDB, create a project and cluster, and configure a database user with credentials and access from anywhere.
Connect NestJS to MongoDB Atlas by configuring the Mongo module in app.module.ts, using the Node.js driver URL, and replacing credentials; then start the app to verify the database connection.
Define a post schema in NestJS using Mongoose, mapping a post document with title and description, and register PostSchema via MongooseModule.forFeature in the post module.
Inject the repository into the service using dependency injection, then create and save a post via the repository and Mongoose ORM in a NestJS setup.
Learn to handle post requests in NestJS using the @Body decorator to pass a request body with title and description, inspect it with console.log, and map to a post document.
Learn how a data transfer object (dto) reduces data by omitting id on create and password on responses, and how to validate and use create-post and response dtos in NestJS.
Explore using DTOs to shape request and response data, remove unnecessary fields like __v, map _id to a string id, and prepare a response post DTO for clean, typed output.
Master NestJS data validation with the class-validator library and DTOs, using IsNotEmpty and a global validation pipe in main.ts. Explore built-in validators like min, max, and email.
Explore dto pattern: send a create post dto from the client to the server via postman, which creates an entity and returns a dto response with validation inside the dto.
Continue with crud for post controller by implementing getAll, fetch all posts with postModel.find(), map to ResponsePostDTO returning _id, title, and description, converting _id to string.
Explore options to reduce response data in NestJS by using DTOs to customize responses and by serialization with class-transformer, which can exclude properties like password via an interceptor.
Implement an after-controller interceptor to transform responses into a DTO using class-transformer's plainToInstance and @Expose, demonstrating post response customization.
Learn to implement a transform dto interceptor in NestJS by wiring a dtoClass into the interceptor and passing a dto like ResponsePostDTO. Explore custom decorator usage and class transformer basics.
Create a getOne endpoint in NestJS using @Param to pass the id, query MongoDB with findOne({_id: id}), and handle not found with NotFoundException.
Demonstrates implementing the update action in NestJS by exposing a @Put endpoint with id and body, using UpdatePostDTO, and updating a post via service methods, contrasting with patch.
Implement a patch endpoint to update post fields by extending CreatePostDTO with PartialType for UpdatePostPatchDTO, handling id and request body, and merging changes with Object.assign to update title or description.
Execute a delete operation by id using the service's deleteOne method and postModel.deleteOne, with an existence check to throw an error if not found, and a corresponding controller endpoint.
Learn how to inject a service from another module in NestJS by importing the PostModule into the UserModule and exporting the PostService.
Install and configure Swagger UI in a NestJS project, customize the API description and tags, expose docs at a flexible URL, and document endpoints via basic controllers.
Learn to configure Swagger UI for a NestJS API by enriching DTOs with ApiProperty, using ApiTags and PartialType, and exploring get, put, patch, delete endpoints plus file upload with multipart/form-data.
Learn to implement health checks in a NestJS app using Terminus, create a health module and controller, install an http health indicator, and expose /health with database checks.
Learn how to generate and view NestJS app documentation using compodoc, install the tool, generate docs, and explore modules, controllers, and injectable code on localhost.
Understand the NestJS request lifecycle, from middleware through guards, pipes, and interceptors to the final response, including global, controller, and method level scopes.
Discover how to enable uri versioning in NestJS by configuring main.ts. Apply version annotations on controllers and methods, set a global default, and use the api/v1 prefix to test versions.
Identify circular dependencies in NestJS by showing two services referencing each other and how to avoid them with forwardRef and inject.
Wrap up this section by summarizing CRUD operations, using and customizing DTOs for responses, and introducing Mongo in a simple NestJS project.
Create a new next.js project to build an e-commerce website, using the terminal to initialize and set up the project within this section of the course.
Configure NestJS with TypeORM for PostgreSQL, install the PostgreSQL driver, set host, port, user, password, and database, then create the equal ledger database and run npm start.
Configure environment variables with a .env file, install and use the NestJS config package, inject ConfigService via modules, and access database settings for local development and production.
Create a user entity in NestJS app using an ORM, defining a primary key, first name, last name, password, and an isActive flag with default true, integrated into the module.
Learn migrations and schema synchronization with TypeORM in NestJS, why enable in development vs production, and how to inject a user repository and create a user via api.
Create the auth module for the NestJS project by generating an auth resource, then set up sign-up and sign-in endpoints that require email and password, with signup including last name.
Explore sign up with JWT authentication in a NestJS app by implementing password hashing, user creation, and dependency injection across modules and services.
separate configuration into an env file and wire it through a config service in NestJS, register the scene, import the config service, and test the module to verify everything works.
Implement sign-in flow in a NestJS backend by locating users by email, comparing passwords with hashing, and issuing an access token, while handling credential errors to avoid exposing sensitive data.
Refactor the JWT generation logic by extracting a shared token utility to remove duplication and demonstrate generating an access token from a user and service.
Implement an authentication guard in NestJS to expose the current user via a get method, extracting a bearer token from the authorization header and validating it with a service.
Learn to get the current user in a NestJS backend by using a custom decorator with Express requests, return the user data, and handle authentication versus authorization errors.
Explore building a role module to enforce authorization in NestJS by modeling roles as a dedicated entity and linking them to users via a one-to-many relationship, with per-role permissions.
describe a one-to-many and many-to-one relationship between user and row, where a row has many users and each user belongs to a row, with bidirectional links and a foreign key.
Explore building role management in NestJS by creating a role via the controller, applying validation with class-validator and class-transformer, and wiring a repository-backed create flow.
Create a role in NestJS using a controller to handle create requests, validate name and description with class-validator and class-transformer, enforce min length five, and persist via the repository.
Assign the user role during sign-up by fetching the row by name and injecting the row service, resolving dependency issues in the user creation flow.
Master how to implement get all roles in nestjs by completing a row-based CRUD flow, using a response interceptor to customize and return rows from the controller.
Update a role in a NestJS backend by retrieving the row, updating its name and description in the repository, and validating the non-empty description with a length of five.
Learn to prevent removing roles by using a soft delete approach: add an is active boolean and update the role to deactivate it while preserving user permissions.
Learn how to prevent deleting a join table row when a user is assigned to a role, using TypeORM relations and query builders.
Explore how permissions work in a NestJS backend, linking roles, users, and endpoints with a many-to-many model, and grant specific endpoint access through a permission table.
Create an endpoint module for a board resource in NestJS, define an entity with id, url, and methods, and expose patch and list REST API operations.
Create a board resource in NestJS module, define an entity with primary key, url and methods, expose a rest api with patch and list, and wire it into app module.
Create endpoint by wiring inbox service and controller in a NestJS app, using dependency injection and a repository for insert and list operations, with basic validation.
Learn how to truncate a table at startup to reset the identity and avoid duplicate invoices across 1,000 endpoints, using a data source to execute the truncate command.
Explore how to retrieve all endpoints in a NestJS app by wiring a controller with an express request and router, referencing the inbox example to expose route information.
Insert all endpoints to the database by parsing the router, extracting the URL and HTTP methods, and storing them with a query builder from the data source.
Illustrates a transaction as a unit of work for a sequence of database steps, using a data source and query runner to start, commit, rollback, and finally release.
Learn the permission module by creating the permission intermediary table, establishing a many-to-many between row and invoice, and ensuring admin access to the endpoint via the rest api.
Design a permission entity in NestJS backend by modeling a many-to-many relation via an intermediary table with a boolean allowed flag, using many-to-one and one-to-many connections.
Design a foreign key as a primary key to form a composite primary key on an intermediary table by combining user id and achievement id with join columns.
Add all permissions to the database by iterating routes, retrieving rows, and inserting permission records within a transactional workflow using the repository pattern.
Implement the allow permission flow in the permissions service by validating inputs, updating permission state, and saving changes to grant access by row name.
Define the category entity in the NestJS project with id, name, description, and slot, and wire it into the module while avoiding messy naming that obscures the module.
Explore implementing custom http status codes in NestJS by integrating Swagger and open API, configuring authentication, user roles, and showcasing a 200 response with a live demo on port 3000.
Explore Swagger UI configuration by exposing API properties, importing the API property, and refreshing the setup to display email and password fields with a try it out option.
Learn how to create a category in a NestJS backend. Explore Swagger UI versus documentation, and configure modules, repositories, and guards for a secure, one-time setup before authorization.
Implement slug handling in TypeORM through a hook by creating categories, generating and persisting slugs, and ensuring repository updates trigger the hook execution.
Dive into building a get category endpoint in NestJS by creating a controller, handling category and subcategory data, and returning a structured response.
Upgrade your response dto by returning a structured object with message and category, exploring short form responses and file method variations in a NestJS backend workflow.
Update category with NestJS by editing category details through the controller, using object.assign to apply new values, and observing updates to name and description in real time.
implement soft delete for categories to prevent removing a category that would affect its product. use a boolean isDeleted column and update instead of hard delete.
Learn how to use TypeORM built-in soft remove to replace isActive with a release date, call softRemove, and understand how deletion affects filtering and data retrieval.
Explore how to model category hierarchies with a recursive foreign key, creating parent and child categories and establishing a many-to-one relationship in the database.
Explore parent-child relationships in NestJS backend development, organizing a top level technology category into software and hardware subcategories and using a parent array to connect child modules.
Learn how to create a child category in a NestJS backend by validating inputs, assigning a parent when present, and handling existing categories in the create flow.
Learn how to fetch a parent category with its child categories in NestJS by using a one-to-many relation and nested DTOs.
Learn to manage category data in a NestJS backend by creating categories, querying relations, and rendering only the first level of children to optimize performance.
Define a product entity with id, name, price, quantity, slot, and description. Establish one-to-many relation where category has many products and a product belongs to a category, via REST API.
Learn how to configure postgres data types, switch between postgres and mysql, and define fields like name and price using decimal with precision and scale, with basic validation.
Build and validate the product service in a NestJS backend, linking products to categories, applying validation rules, and preparing category data in responses.
Learn how to add a custom property to a response DTO in NestJS, transforming a product’s category name by accessing product.category.name, making fields optional, and debugging outputs with console logs.
Develop a get all products flow in NestJS backend, retrieving products via the product repository and controller, and integrating a category relationship within the product object.
Create a get-one product endpoint in NestJS using a where condition, validate the product exists, and throw an error if not. Avoid category relation for performance.
Learn how to update a product in a NestJS backend, including managing category relationships, validating inputs, and ensuring the repository saves updated product data.
Implement soft delete for products in a NestJS backend by marking records as removed rather than deleting them. This preserves order references while removing the product from the shopping list.
Learn to apply a pagination and filtering package in a NestJS project. Read the documentation, install the package, and implement repository, service, and controller changes to support filterable columns.
Learn to design a product response dto with pagination in NestJS, handling data with meta and links, conditionally returning data, and including total items, pages, and navigation links.
Learn to implement a file upload with a file block module, integrate rest api, read the documentation, and manage version upgrades for NestJS backend development.
Learn to upload files in a NestJS backend using form data, the upload file decorator, and image validations for size and type, including png and jpg formats.
Learn how to upload an image to disk in a NestJS backend, configuring disk storage for product images, handling file naming, and returning a success message.
Learn to implement type-based file upload in NestJS by validating request params (product or user) with middleware, handling bad requests, and wiring validation into the upload module.
Learn how to save an uploaded image URL to the database in a NestJS backend, including handling image fields, entity relationships, and product service integration.
Wrap up the blocks module by applying middleware to the project, tidying code, and refactoring the block controller while reviewing product, visualization, filtering, and customer detail work for marketing impact.
Build a product galleries module in NestJS backend, implementing a one-to-many relationship between product and gallery with a main image. Define product and gallery entities with image fields.
Learn how to implement a product gallery block and upload multiple images using read file and multiple file blocks. Wire file inputs and test multi-file uploads.
Implement uploading multiple images for a product gallery, configure disk storage and file filtering, and wire up gallery and product services to store images with products.
Learn to implement delete methods for galleries and images in a NestJS backend, removing database records and associated files, wiring controllers, and returning a success response.
NestJS is a powerful and rapidly growing framework that enables developers to build scalable and efficient applications with ease. In this course, you'll learn how to harness the full potential of NestJS to create robust backend systems.
In this course, you're not just going to learn NestJS; you'll also master the essential skills of learning new technologies. Forget fancy slideshows and fluff—this course is all about diving deep into the core material, directly from official resources. I believe in the power of real, hands-on learning, and instead of simply repeating what's already out there, we will focus on practical application.
Why do I say "you don’t just learn NestJS"? Because in this course, I’m going to show you how to research, troubleshoot, and read documentation effectively—skills every developer needs to thrive. These aren’t just technical abilities; they are life skills for problem-solving and continuous learning, which are crucial to keep up with ever-evolving technology.
Upon completing this course, you won’t just be proficient in NestJS. You’ll have developed the confidence and methodology to pick up any framework, language, or tool you wish to learn. This course will teach you how to avoid the trap of “tutorial hell”—that frustrating cycle where you rely too much on step-by-step guides without gaining true understanding. You’ll learn how to think independently, explore documentation, and solve problems—transforming you into a self-sufficient developer, ready to tackle any challenge that comes your way.
What will you learn in this course?
Core NestJS Concepts: We’ll start by building a solid foundation of NestJS, diving into the framework’s core features and best practices for building maintainable applications.
Building a Small Application with MongoDB: Once you're familiar with the basics, we'll work on a hands-on project using MongoDB to help reinforce your understanding of NestJS and how to apply it in real-world scenarios.
Developing a Large-Scale Application with SQL and TypeORM: Finally, we’ll scale things up by developing a large and complex application using SQL and TypeORM, integrating advanced concepts like authentication, real-time communication, and more.