Welcome to my learning proccess with NestJS โ๏ธ
Hi there! I will update this repo with new information as soon as I build something cool ๐ Update: Course finished! ๐ฅฐ Now I just need to find a problem to be solved ๐ค
- Basic structure to perform CRUD (this tag)
- Basic usage of pipes and validation on DTOs (this tag)
- Using persistence and queryBuilder(this tag)
- Adding basic Jwt Authentication (this tag)
- Adding Authorization (this tag)
- Adding Tests with Jest (this tag)
- Adding secure responses (@Exclude instead of DTOs) (this tag)
- Adding role based authorization (ADMIN section)(this tag)
class-validator
Annotations can be found hereTypeORM
herequeryBuilder
byTypeORM
herequeryBuilder with find { }
here- Using a
ClassSerializerInterceptor
to hide sensitive data (instead of ResponseDTOs) here- How to add it globally here
- Using roles on handlers here
- More details can be found here.
I chose the.getAndOverride
approach, where aController
level has a defaultRole
, and someactions (methods)
inside it can have more specific/restricted roles.
- More details can be found here.
- Author - Vinicius Kammradt
- Twitter - @kammzinho