/learning-nestjs

๐Ÿ”บWe are on quarentine, so lets study another JS framework ๐Ÿคท๐Ÿปโ€โ™‚๏ธ ๐Ÿ”บ

Primary LanguageTypeScript

Nest Logo

Welcome to my learning proccess with NestJS โœ๏ธ

Description ๐Ÿ“

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 ๐Ÿค”

Sections ๐Ÿคน๐Ÿปโ€โ™‚๏ธ

  • 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)

Useful links ๐Ÿ”—

  • class-validator Annotations can be found here
  • TypeORM here
  • queryBuilder by TypeORM here
  • queryBuilder 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 a Controller level has a default Role, and some actions (methods) inside it can have more specific/restricted roles.

Stay in touch ๐Ÿค— ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป