Advanced NestJS is a course that takes NestJS and TypeScript skills on to production-ready APIs, covering TypeORM with MySQL, migrations and transactions, validation, OpenAPI documentation, JWT login with role-based access and automated testing. It suits developers who already know the NestJS basics and teams that run backend systems in TypeScript.
NestJS is a server-side Node.js framework that teams use to build enterprise APIs because of its clear module structure, dependency injection and TypeScript. Once past the basics, though, developers often get stuck on what makes real systems hard: poorly designed database relations that cause slow queries, synchronize left on in production, missing transactions, unsafe login flows and no tests to rely on when code changes. NestJS 12 and TypeORM 1.x have also changed many practices compared with the versions most tutorials use.
This course takes learners from NestJS basics to production-ready APIs with NestJS 12 on Node.js 24 LTS. It starts by connecting MySQL 8.4 with TypeORM 1.x, designing entities and relations, writing advanced queries with QueryBuilder, and handling migrations and transactions. Learners then design RESTful APIs with DTOs and validation using both class-validator and Standard Schema, use interceptors, exception filters and OpenAPI documentation, and build JWT login with guards and roles. They add security, caching and rate limiting, write unit and end-to-end tests with Vitest, and finish by running the application in Docker and building a complete online store API as a capstone. (3 days, 6 hours per day, 18 hours in total, Intermediate level.)
What you’ll gain
Set up a NestJS 12 project the current way, with configuration and testing tools
Connect MySQL with TypeORM 1.x and design entities and relations correctly
Write advanced queries and handle migrations and transactions safely
Design RESTful APIs with DTOs, validation, interceptors and exception filters
Produce OpenAPI documentation that the whole team can use
Build JWT login and control access with guards and roles
Write unit tests and end-to-end tests for an API with Vitest
Run a NestJS application in Docker with health checks
Who this course is for
Developers who know the NestJS basics and want to build APIs for real projects
Node.js and Express developers who want a more structured approach
Full-stack developers who look after both the frontend and the API in TypeScript
Teams that want to update existing NestJS projects to version 12
Teachers, lecturers and computing students who want current backend development practice
Prerequisites
Experience creating a NestJS project and understanding modules, controllers and providers
TypeScript skills such as classes, interfaces, decorators and async/await
Understanding of HTTP, RESTful APIs and JSON
Familiarity with relational databases and basic SQL
A laptop that can run Node.js, Docker Desktop and VS Code, with permission to install software
Curriculum
Course Details
This course is the 2026 edition that replaces the previous Advanced NestJS course. It has been rewritten for NestJS 12, Node.js 24 LTS, TypeORM 1.x and MySQL 8.4. It runs for 3 days, 6 hours per day (18 hours in total, 09:00-16:00), as lectures with labs built on a single online store API that grows throughout the course. Intermediate level. It follows on from Basic NestJS, keeps the original core of TypeORM with MySQL, web APIs and JWT, and adds migrations, transactions, Standard Schema validation, OpenAPI, roles and refresh tokens, caching, rate limiting, testing with Vitest and Docker. Microservices are not covered here; they are taught in Building Microservices with NestJS. Learners take home a lab guide, source code for every lab and docker-compose files.
Day 1TypeORM and MySQL
Section 1: Lab: Setting Up a NestJS 12 Project
What is new in NestJS 12: ESM packages, Standard Schema and Vitest
Create a project with the Nest CLI on Node.js 24 LTS and choose ESM or CommonJS
Manage configuration with @nestjs/config and validate environment values
Run MySQL 8.4 with Docker Compose and connect with DBeaver
Lab: the online store project used throughout the course
Section 2: TypeORM 1.x with NestJS
ORM concepts, DataSource and the data mapper pattern
What changed from TypeORM 0.3 to 1.x, such as Node.js 20 or later and the mysql2 driver
Configure TypeOrmModule.forRootAsync with ConfigService
Create entities and inject repositories into services
Why synchronize should not be enabled in production
Section 3: Lab: Entities and Relations
Column types, numeric or UUID primary keys and indexes
One to one, many to one and one to many
Many to many with a join table that carries extra data
Cascade, eager and lazy relations, and their effect on performance
Lab: design product, category, customer and order entities
Section 4: Advanced Queries
Find options: where, relations, order and select
QueryBuilder for joins, GROUP BY and summary reports
Pagination and multi-condition search
Detect and fix N+1 queries from the SQL log
Run parameterised raw SQL safely
Section 5: Lab: Migrations, Seeding and Transactions
Generate and run migrations with the TypeORM CLI
Write repeatable seed scripts for sample data
Transactions with DataSource.transaction and QueryRunner
Optimistic locking with a version column
Lab: save an order and reduce stock inside a transaction
Day 2Advanced RESTful API Design
Section 6: Advanced Controllers and Routing
Design resources, status codes and headers that follow REST
Route parameters, query strings and pipes that convert types
The newer route syntax that uses named parameters for wildcards
API versioning by URI or header
Custom decorators for extracting data from the request
Section 7: Lab: DTOs and Validation
ValidationPipe with class-validator and class-transformer
whitelist, transform and mapped types such as PartialType
StandardSchemaValidationPipe with Zod, new in NestJS 12
Choosing a validation approach that fits the project and the team
Lab: validate product and order data on every endpoint
Section 8: Interceptors, Exception Filters and Serialisation
Interceptors for logging, timing and shaping responses
A central exception filter that translates database errors
Hide fields that should not be returned with serialisation
The order in which middleware, guards, interceptors and pipes run
Section 9: API Documentation with OpenAPI
Install @nestjs/swagger and serve the Swagger UI documentation page
Use the CLI plugin to cut down on repeated decorators
Describe DTOs, responses and bearer authentication in the documentation
Export the OpenAPI file so the frontend team can generate a client
Section 10: Workshop: Online Store RESTful API
Product and category APIs with pagination, filtering and sorting
An order API that runs inside a transaction
Upload product images, checking size and file type with ParseFilePipe
Test every endpoint through Swagger UI, Postman or Bruno
Day 3Authentication, Testing and Deployment
Section 11: Lab: JWT Login
Hashing passwords with bcrypt or Argon2, compared with encrypting data
Issue access tokens with @nestjs/jwt and verify them with an AuthGuard
A global guard with a @Public() decorator for public routes
Passport strategies as an option when several login methods are needed
Lab: sign-up, sign-in and view-my-profile APIs
Section 12: Authorisation and Refresh Tokens
A roles decorator and RolesGuard for Admin, Staff and Customer
Ownership checks, such as customers seeing only their own orders
Rotating refresh tokens and revoking tokens
Lab: apply permissions to every endpoint of the store API
Section 13: Security and Performance
Configure CORS and Helmet for real-world use
Rate limiting with @nestjs/throttler
Cache frequently requested results with CacheModule
Common weaknesses from the OWASP API Security Top 10
Logging and health checks with @nestjs/terminus
Section 14: Lab: Unit Tests and End-to-End Tests
Write unit tests with Vitest and Test.createTestingModule
Mock the repositories and services a class depends on
End-to-end tests with Supertest against a test database in Docker
Measure test coverage and run tests automatically before merging
Section 15: Workshop: Docker and Capstone
Write a multi-stage Dockerfile for a NestJS application
Docker Compose for the API and MySQL, running migrations automatically
Capstone: add product reviews or discount coupons with permissions and tests
Present the work, review the code together and wrap up with a pre-production checklist
Schedule & training options
For individuals — public rounds
22–24December
Classroom22–24 Dec 26
20 seats left
16–18February
Classroom16–18 Feb 27
20 seats left
2–4March
Classroom2–4 Mar 27
20 seats left
5–7May
Classroom5–7 May 27
20 seats left
21–23July
Classroom21–23 Jul 27
20 seats left
28–30September
Classroom28–30 Sep 27
20 seats left
9–11November
Classroom9–11 Nov 27
20 seats left
For organisations — in-house / private
Tailor the content to your team’s tools and projects
TypeORM is an ORM for TypeScript that lets you define tables as entity classes and read and write data through repositories instead of writing SQL every time. In NestJS, install @nestjs/typeorm with the mysql2 driver, which is the only MySQL driver TypeORM 1.x supports. Configure the connection with TypeOrmModule.forRootAsync and ConfigService, register entities in each module with TypeOrmModule.forFeature and inject repositories into services. Schema changes in production should use migrations rather than synchronize.
How do one-to-one, one-to-many and many-to-one relations differ in TypeORM?
One-to-one means a row links to exactly one row in another table, such as a user and a profile, using @OneToOne with @JoinColumn on the side that holds the foreign key. One-to-many and many-to-one are the same relation seen from each side: a category has many products, so the category uses @OneToMany and the product uses @ManyToOne, and the foreign key always sits on the many side. When querying, load only the relations you need to avoid N+1 queries.
What are the steps to build JWT login in NestJS?
Store passwords hashed with bcrypt or Argon2, and write an AuthService that checks the email and password and, if they match, issues an access token with JwtService from @nestjs/jwt. Write an AuthGuard that reads the bearer token from the Authorization header, register it globally and use a @Public() decorator to open only public routes. Then add a RolesGuard for role-based permissions and rotating refresh tokens. If you need several login methods, Passport strategies are an option.
Who is the Advanced NestJS course for, and what should I know beforehand?
It suits developers who have used NestJS and want to move on to databases, web APIs, login systems and testing as done in real projects, teams updating existing projects to NestJS 12, and teachers, lecturers and computing students. You should be able to create a NestJS project and write modules, controllers and services, write TypeScript and know basic SQL, because the course starts with the database straight away.
What will I be able to do after the Advanced NestJS course?
You will be able to connect NestJS to MySQL through TypeORM 1.x, design entities and relations, write advanced queries, handle migrations and transactions, design RESTful APIs with DTOs, validation and OpenAPI documentation, build JWT login with guards, roles and refresh tokens, add caching and rate limiting, write unit and end-to-end tests with Vitest and run the application in Docker. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.
Can the Advanced NestJS course be run in-house for our team?
Yes. It can be run in-house for your team, with examples adapted to your work, such as using the database structure or API your team is building as the exercise, or focusing on upgrading existing projects to NestJS 12. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.
Node.js lets the JavaScript that developers know from web pages run on the server and on their own machines, from file-handling scripts and command-line tools to web APIs and real-time systems. Current versions include more built-in tools, such as fetch, a…
Microservices split a large system into small services that can be developed, deployed and scaled independently, so teams ship faster and scale only the parts under heavy load. Node.js suits this well because it is lightweight, starts quickly and handles…
The MEVN stack is a set of technologies for full-stack web development in a single language, JavaScript. It brings together MongoDB, a NoSQL database that stores data as documents, Express, a framework for building REST APIs on Node.js, and Vue.js, a popular…