Nestjs Course Guide
Nestjs Course Guide
Topics: - NestJS Overview and Architecture - TypeScript and Express/Koa under the hood - Installing Nest CLI
- Creating a new project ( nest new ) - Folder structure and project layout - Running the development
server
Exercises: - Scaffold a new NestJS app - Add .env config and create a configuration service
Topics: - Controllers and Routing - Dependency Injection - Services and Providers - Nest Modules - Lifecycle
hooks
Exercises: - Create a UsersModule - Implement a UsersService with in-memory data - Inject service
into controller and expose routes
Topics: - Middleware configuration - Data validation using Pipes - Exception handling with Filters -
Interceptors for logging and transformation
Exercises: - Create a global validation pipe - Add a custom exception filter - Use interceptors to log request
time
1
Topics: - Setting up TypeORM/Prisma - Creating entities/models - Repositories and services - Relationships
and migrations
Exercises: - Connect PostgreSQL - Create entities: User , Post , Comment - Implement basic CRUD with
relations
Topics: - Unit Testing with Jest - Testing Controllers and Providers - End-to-End Testing with Supertest -
Feature module organization - CQRS and domain layering (optional)
Exercises: - Write unit tests for a service - Create e2e tests for a controller
Topics: - JWT Authentication with Passport - Role-Based Authorization Guards - Dockerization and
environment management - WebSockets with @nestjs/websockets - Microservices with @nestjs/
microservices - Redis, NATS, Kafka integrations
Exercises: - Implement Login/Register endpoints - Secure routes with AuthGuard - Dockerize your app
and run with docker-compose - Create and communicate with a basic microservice via Redis
• GraphQL integration
• Event-driven design
• Swagger/OpenAPI setup
• File uploads and multipart handling
• Bull for background jobs and queues
Blog Platform API: - Users, Posts, Comments - JWT Auth - Role-based Access Control - Notifications via
microservices - Redis caching layer
2
⚙️ Tooling Recommendations
• PostgreSQL / MySQL
• Redis
• Docker
• Postman / Insomnia
• VSCode + NestJS Snippets
This guide is designed for asynchronous, self-paced learning. Adjust durations as needed. Total Estimated Time:
~40–50 hours.