Computerix
Computerix
  • 51
  • 407 042
NestJS Swagger Guide: OpenApi Documentation
We dive into using Swagger in a NestJS project to effortlessly generate API documentation that conforms to the OpenAPI specification.
You'll learn how to set up Swagger in your NestJS app, customize your API docs with various decorators, and ensure your backend is well-documented and easy to understand for other developers.
List of decorators: docs.nestjs.com/openapi/decorators
Buy me a coffee : buymeacoffee.com/computerix
Timestamps:
---------------------
0:00 - Introduction (Swagger + OpenApi )
1:03 - Setting up the Swagger Document
4:15 - Documentation Sections + @ApiTags()
6:04 - Documenting Requests
8:20 - Documenting Responses
13:03 - Protecting APIs with a Bearer Token
มุมมอง: 587

วีดีโอ

Authorization in NestJs : Roles & Permissions
มุมมอง 2.7K3 หลายเดือนก่อน
We implement Authorization using roles & permissions in NestJs. We create our own custom @Permissions decorator and apply it to our routes, and then use it inside of our Authorization Guard to compare it against our user's set of permissions. Github Repo: github.com/charbelh3/nestjs-auth-apis Donations Link: buymeacoffee.com/computerix Timestamps: 0:00 - Introduction Code explanation 1:45 - How...
The Key to Perfect API Responses in NestJS
มุมมอง 1.1K3 หลายเดือนก่อน
We learn how to build consistent API responses in NestJS to ensure a predictable and easy to maintain API, by leveraging interceptors. Interceptors Video : th-cam.com/video/LHp6Jm9coSI/w-d-xo.htmlsi=vOsM_8RplN9-T9Xs Timestamps: 0:00 - Predictable API Responses 0:58 - Leveraging NestJS interceptors 3:30 - Testing our API responses
Request-Scoped Providers in NestJS: A Must-Know for Developers
มุมมอง 6724 หลายเดือนก่อน
Everything You Need to Know About Request-Scoped Providers in NestJS will be taught in this video, on top of a comparison with the default singleton behavior. Buy me a coffee: buymeacoffee.com/computerix Timestamps: 0:00 - How NestJs Handles Provider Creations & Lifetime 1:15- The Singleton Scope (Default Behavior) 2:53 - Request Scoped Providers 4:30 - Real Use case for Request Scoped Provider...
Multitenancy Authentication in NestJs
มุมมอง 2.4K6 หลายเดือนก่อน
We learn how to authenticate users in a multitenant application, where each tenant has their own unique secret key for generating and verifying access tokens. Your donations are highly appreciated: buymeacoffee.com/computerix Timestamps: 0:00 - Multitenancy Implementation Recap 6:10 - Authentication: Single Tenant vs Multi-Tenant 9:40 - Overview of our tasks 11:24 - Create new tenant API 18:40 ...
NestJs Authentication: Change Password, Forgot Password, Reset Password
มุมมอง 5K6 หลายเดือนก่อน
In this video we learn how to handle a user changing their password, forgetting their password, receiving a reset password link and handling it properly in a Nestjs backend. Part 1 : th-cam.com/video/h-68sqxycJY/w-d-xo.htmlsi=p6S6f8nRpuXDyImw Feel free to donate: buymeacoffee.com/computerix Source Code: github.com/charbelh3/nestjs-auth-apis Timestamp: 0:00 - Part 1 Recap 1:30 - Overview and goa...
NestJs Authentication : Login, Signup, Refresh Tokens, JWT, Guards
มุมมอง 15K6 หลายเดือนก่อน
We implement : Login, Signup and Refresh Tokens APIs and learn the differences between an access and a refresh token, and how to handle them in our authentication flow. Configuration episode: th-cam.com/video/6MjjOsODYwU/w-d-xo.htmlsi=79fw-Iw_qPgurZyM MongoDB episode: th-cam.com/video/GV9quNoXRgg/w-d-xo.htmlsi=GQvEAaR0-N_o0Pib You can donate here: buymeacoffee.com/computerix Make sure to leave ...
Websockets in NestJs (Real-Time Chat App)
มุมมอง 10K7 หลายเดือนก่อน
We learn how to setup a websocket gateway in Nesjts, to subscribe to events, and emit messages. We learn different ways to broadcast messages, and consume them from a client, while building a simple chatting app Donations: buymeacoffee.com/computerix Timestamps: 0:00- Creating the Websocket Gateway 2:38- Listening to events 5:37- Emitting Messages to the client 7:55- Brodcasting messages Websoc...
NestJs Microservices with RabbitMQ
มุมมอง 18K9 หลายเดือนก่อน
We build a Producer and a Consumer that communicate through RabbitMQ in NestJs. We learn how to implement both event driven and RPC solutions. If this video was helpful, leave a like & subscribe! Github Repo: github.com/charbelh3/NestJs-Microservice-RabbitMQ Timestamps: 0:00 - Introduction 1:25 - Creating a RabbitMQ client instance 3:55 - Producing an event to RabbitMQ 6:40 - Connecting our Con...
NestJs - Best Practices + Implementations
มุมมอง 9K10 หลายเดือนก่อน
We discover different best practices and how to implement each with practical examples, to ensure a clean and maintenable nestjs project. Detailed Videos from my nestJs Course: Pipe & Validations: th-cam.com/video/-IJ2MynZqg8/w-d-xo.html Error Handling: th-cam.com/video/AWqqg9Dtnc4/w-d-xo.html Guards & Authorization: th-cam.com/video/w_ASqSZKhMQ/w-d-xo.html Donations Link : buymeacoffee.com/com...
NestJs caching with Redis
มุมมอง 9K11 หลายเดือนก่อน
We learn how to implement caching properly using the cache manager package in NestJs, and using the redis store to cache data in redis. Buy me a coffee at : buymeacoffee.com/computerix Timestamps: 0:00- Why use caching ? 1:02- Implementing caching in NestJs 6:28- Using the Cache Interceptor 9:19- Using the Redis Cache Store
Multitenancy in NestJS + Mongoose
มุมมอง 8K11 หลายเดือนก่อน
Learn how to handle multitenancy in NestJS with Mongoose in this easy-to-follow tutorial. Where we learn how to connect to the correct dedicated tenant database based on the tenant making the request. Github Repo: github.com/charbelh3/NestJs-Multi-Tenancy Buy me a coffee at : buymeacoffee.com/computerix Timestamps: 0:00- Single-Tenant vs Multi-Tenant 2:13- Our Multi-Tenant Application 4:45- Exp...
NestJs - MongoDB [11]
มุมมอง 1Kปีที่แล้ว
We learn how to connect to a mongoDb database using the NestJs mongoose package. We cover multiple concepts: 1- Different ways we can connect to a database 2- Creating a Schema 3- Registering a model 4- Injecting that model and using it as a dependency 5- Exporting models 6- Using multiple databases 7- Accessing the mongoose Connection object Timestamps: 0:00- Introduction 1:00- Connecting to o...
NestJs - Configuration [10]
มุมมอง 2.6Kปีที่แล้ว
We cover the importance of using .env files to ensure the security of our sensitive data, and we learn how we can use the nest ConfigModule to access our configuration variables. Timestamps: 0:00 - Avoid critical configuration mistakes 0:46- Using .env files to read variables 3:19- Registering and understanding ConfigModule 6:25- Loading custom configurations 8:18- Reading config variables with...
NestJs - Interceptors [09]
มุมมอง 2.3Kปีที่แล้ว
We learn how we can intercept a request, and add logic BEFORE and AFTER getting a response from the route handlers. We learn different use cases in which providers could be useful, and more... Please like & subscribe ! Timestamps: 0:00 - Interceptors and their purpose 1:03 - Creating our custom interceptor 4:50 - Different ways of registering our custom interceptors 8:43 - Intercepeting the rou...
NestJs - Guards & Authentication & Authorization [08]
มุมมอง 12Kปีที่แล้ว
NestJs - Guards & Authentication & Authorization [08]
NestJs - Pipes & Validation [07]
มุมมอง 3.4Kปีที่แล้ว
NestJs - Pipes & Validation [07]
NestJs - Exception Filters [06]
มุมมอง 5Kปีที่แล้ว
NestJs - Exception Filters [06]
Nestjs - Middlewares [05]
มุมมอง 1.8Kปีที่แล้ว
Nestjs - Middlewares [05]
NestJs - Modules [04]
มุมมอง 2.8Kปีที่แล้ว
NestJs - Modules [04]
NestJs - Service Providers & Dependency Injection [03]
มุมมอง 5Kปีที่แล้ว
NestJs - Service Providers & Dependency Injection [03]
NestJs - Controllers [02]
มุมมอง 2Kปีที่แล้ว
NestJs - Controllers [02]
NestJS - Introduction & Setup [01]
มุมมอง 4.6Kปีที่แล้ว
NestJS - Introduction & Setup [01]
RabbitMQ - RPC with NodeJs (request-reply pattern)
มุมมอง 9Kปีที่แล้ว
RabbitMQ - RPC with NodeJs (request-reply pattern)
Pagination in Nodejs using Mongoose (return totalPages, totalCount & More)
มุมมอง 1.6Kปีที่แล้ว
Pagination in Nodejs using Mongoose (return totalPages, totalCount & More)
What is an API ? (Only video you need)
มุมมอง 165ปีที่แล้ว
What is an API ? (Only video you need)
Best Global Error Handler Middleware in Nodejs !
มุมมอง 9942 ปีที่แล้ว
Best Global Error Handler Middleware in Nodejs !
Entity Framework Core Load FULL Related Entities (Lazy Loading and Eager Loading)
มุมมอง 1.8K2 ปีที่แล้ว
Entity Framework Core Load FULL Related Entities (Lazy Loading and Eager Loading)
Promise.race() to handle request timeouts in JS (explanation + examples)
มุมมอง 3142 ปีที่แล้ว
Promise.race() to handle request timeouts in JS (explanation examples)
ASP.NET Core 6.0 Code first approach using Entity Framework
มุมมอง 11K2 ปีที่แล้ว
ASP.NET Core 6.0 Code first approach using Entity Framework

ความคิดเห็น

  • @bbbb7071
    @bbbb7071 วันที่ผ่านมา

    thank you so much ><

  • @ayo-ju5sv
    @ayo-ju5sv 3 วันที่ผ่านมา

    Thank you for this master piece🙏

    • @Computerix
      @Computerix 2 วันที่ผ่านมา

      You're welcome 😁

  • @testuser-i9e
    @testuser-i9e 7 วันที่ผ่านมา

    Hi brother, do you use passport js or do it without it?

  • @robings6489
    @robings6489 13 วันที่ผ่านมา

    With this logic you can only be signed in on a single device with the same user right? So if I want users to be signed in on multiple devices I'd have to run some kind of cron job to delete every refresh token when it is expired?

  • @smohammadhn
    @smohammadhn 14 วันที่ผ่านมา

    That was actually a great start for a beginner like me

    • @Computerix
      @Computerix 13 วันที่ผ่านมา

      I'm glad!

  • @JOKENCANAL
    @JOKENCANAL 20 วันที่ผ่านมา

    such a legend!

  • @binhnguyenthanh5084
    @binhnguyenthanh5084 23 วันที่ผ่านมา

    Hi, Can I ask you a question @Computerix, Why Refresh token use uuidv4 but resetToken use nanoid?

  • @enjoywithcoinee1966
    @enjoywithcoinee1966 23 วันที่ผ่านมา

    your way is so great to approach and follow. many thanks

    • @enjoywithcoinee1966
      @enjoywithcoinee1966 23 วันที่ผ่านมา

      it could be better with sending messages to specific roomId/topicId

  • @hamzazahidulislam3490
    @hamzazahidulislam3490 24 วันที่ผ่านมา

    Thanks brother.

  • @hamzazahidulislam3490
    @hamzazahidulislam3490 24 วันที่ผ่านมา

    Thanks brother

  • @HellGuyRj
    @HellGuyRj 25 วันที่ผ่านมา

    I have a question, for now the connection string is having multiple dbs and useDb is being used to switch the dbs. But, what about the case in which the whole database instance is different, for example 5 dbs on 5 different EC2 machines. How to approach this situation?

  • @ashadulmridha6551
    @ashadulmridha6551 26 วันที่ผ่านมา

    weel explanation

  • @PrashantSingh-pw1ze
    @PrashantSingh-pw1ze 29 วันที่ผ่านมา

    his whole series is soooo fucking useful, I really started learning nestjs 15 days ago, without him, I can't even getting this far

    • @Computerix
      @Computerix 26 วันที่ผ่านมา

      ❤️❤️

  • @ZeinShaban-l3p
    @ZeinShaban-l3p หลายเดือนก่อน

    you are the best bro

  • @ВікаДеркач-ъ8э
    @ВікаДеркач-ъ8э หลายเดือนก่อน

    thanks!!

  • @Webtech-nu7hq
    @Webtech-nu7hq หลายเดือนก่อน

    I’ve done using postgres and microservices th-cam.com/video/qR05wWeQ2OI/w-d-xo.htmlsi=H40Y7u4bZ12ugdHr

  • @Naya-ss7vs
    @Naya-ss7vs หลายเดือนก่อน

    Very insightful as usual 🤝

  • @Naya-ss7vs
    @Naya-ss7vs หลายเดือนก่อน

    Thank you for the great content, keep going! 🩷

    • @Computerix
      @Computerix หลายเดือนก่อน

      @@Naya-ss7vs Thank you for the support!

  • @od1ez
    @od1ez หลายเดือนก่อน

    could you explain how to use server.of() syntax?

  • @ВікаДеркач-ъ8э
    @ВікаДеркач-ъ8э หลายเดือนก่อน

    thank you!

    • @Computerix
      @Computerix หลายเดือนก่อน

      No worries!

  • @fsassiv
    @fsassiv หลายเดือนก่อน

    Anything anyone needs to know to get started with NestJS is on your channel. Straightforward, simple and well explained content. Congrats man and Thank you.

    • @Computerix
      @Computerix หลายเดือนก่อน

      @fsassiv I'm glad you found my content helpful ! Thanks for your comment

    • @shrikantjha5630
      @shrikantjha5630 หลายเดือนก่อน

      @@Computerix good content.

    • @Computerix
      @Computerix หลายเดือนก่อน

      @@shrikantjha5630 Thanks :)

  • @aabhishakemishra
    @aabhishakemishra หลายเดือนก่อน

    U are the best , keep going bro 🙏🏻

    • @Computerix
      @Computerix หลายเดือนก่อน

      Thank you 🙌

  • @od1ez
    @od1ez หลายเดือนก่อน

    Thanks a lot man, your content is amazing!

    • @Computerix
      @Computerix หลายเดือนก่อน

      @@od1ez Appreciate it :)

  • @fsassiv
    @fsassiv หลายเดือนก่อน

    23:33 - Suggestion so you dont need the if/elseif: this.schema[metadata.type].validate(value)

  • @fsassiv
    @fsassiv หลายเดือนก่อน

    great work. Simple, straightforward

    • @Computerix
      @Computerix หลายเดือนก่อน

      Thanks!

  • @gonzalonozikovsky654
    @gonzalonozikovsky654 หลายเดือนก่อน

    hi! thanks for the video, i have a question at minute 5:40 you press something on the keyboard to see the available options that you can use according to the method typing, how do you do this? i press ctrl + space but i only see the version control menu like you see, i don't see the available options to use in the obje THANK YOU!

    • @Computerix
      @Computerix หลายเดือนก่อน

      You are welcome ! Are you on mac? If that's the case CMD + I , instead of ctrl + space

    • @gonzalonozikovsky654
      @gonzalonozikovsky654 หลายเดือนก่อน

      @@Computerix yOMG! thanks!!! now I can see the configuration keys that the object has, but when you go from one key to another you see the definition or a description of what each one does, but I don't see that :(

  • @Fullflexno
    @Fullflexno หลายเดือนก่อน

    Thank you for this. Cheers from norway!

    • @Computerix
      @Computerix หลายเดือนก่อน

      You're welcome !

  • @ankushmishra9449
    @ankushmishra9449 หลายเดือนก่อน

    Thank you so much ❤

    • @Computerix
      @Computerix หลายเดือนก่อน

      You're welcome!

  • @ismaelseck
    @ismaelseck หลายเดือนก่อน

    when i try to execute the localhost:3000 request with the get method in postman i face a 404 Cannot GET /. I'm not using mongoose but typeOrm

  • @ahsanahmedrakib6450
    @ahsanahmedrakib6450 หลายเดือนก่อน

    It''s really awesome. Thank you so much.

  • @avinashchirame1779
    @avinashchirame1779 หลายเดือนก่อน

    If i need different sub domains for different tenants and wanted to keep users details in tenants database instead of Master, so as to manage GDPR norms, what should i do? could you please help to fix this problem.

  • @GabrielSantos-nx3zq
    @GabrielSantos-nx3zq หลายเดือนก่อน

    thanks for the content! How would we registers the users for specific tenants ?

    • @Computerix
      @Computerix หลายเดือนก่อน

      This is up to you / the requirements of your system. You could allow a user to create a company / tenant, and as the owner, they could invite users / register users under their company

  • @thomasfichtner9738
    @thomasfichtner9738 หลายเดือนก่อน

    Best nestjs tutorial out here Thank you <3

    • @Computerix
      @Computerix หลายเดือนก่อน

      Thanks :)

    • @thomasfichtner9738
      @thomasfichtner9738 หลายเดือนก่อน

      @@Computerix Would it be possible for you to create a video explaining user authentification with sso (apple, google) ?

  • @tonyeneh8194
    @tonyeneh8194 หลายเดือนก่อน

    thank you very much. This is gold!

  • @ilmanmanarulqori5632
    @ilmanmanarulqori5632 หลายเดือนก่อน

    Amazing 🤩

  • @ChungLeeVN
    @ChungLeeVN 2 หลายเดือนก่อน

    Rất hay

  • @mAth4u657
    @mAth4u657 2 หลายเดือนก่อน

    Sir,Can I contact you, I need to ask and clarify my current ongoing prject related thing ,currenlty I am university students ,so I have question and blocker

  • @leson1601
    @leson1601 2 หลายเดือนก่อน

    Thank you for your tutorial. I still dont understand how to implement Authorization for user to update their own resources (posts, settings, etc)

    • @Computerix
      @Computerix 2 หลายเดือนก่อน

      You would need CRUD routes for roles, that only admins can access (So a user with let's say a resource of "roles" and available actions of "update" "create" etc..) can access, to modify the permissions on a certain role / create new roles, and so on. And your system would typically have a super admin role that can perform all the permissons

  • @es7729
    @es7729 2 หลายเดือนก่อน

    Thanks you very much! It was really good example to follow!

    • @Computerix
      @Computerix 2 หลายเดือนก่อน

      I'm glad! Thanks for the comment

  • @giftedbraintech5151
    @giftedbraintech5151 2 หลายเดือนก่อน

    Nice tutorial. Well done

    • @Computerix
      @Computerix 2 หลายเดือนก่อน

      Thanks !

  • @reconrecoil7617
    @reconrecoil7617 2 หลายเดือนก่อน

    Thanks you, you beautiful man

  • @kalinduabeysinghe8917
    @kalinduabeysinghe8917 2 หลายเดือนก่อน

    Great video, Thanks a lot!

  • @RmoviesTN
    @RmoviesTN 2 หลายเดือนก่อน

    thankyou good sir that was very helpfull

  • @waseemalhalabi5148
    @waseemalhalabi5148 2 หลายเดือนก่อน

    Isn't it a good approach to store the tenant_id inside the JWT token rather that create a separated secret for each tenant? so there is no need for the client to send his tenant_id in the header

    • @Computerix
      @Computerix 2 หลายเดือนก่อน

      Here there are 2 different points. I'm gonna reply to each separately : 1) "Isn't it a good approach to store the tenant_id inside the JWT token.. so there is no need for the client to send his tenant_id in the header" => It is a valid approach, and you can definitely do that. However, in our case, I believe sending the tenant_id in the request header is actually cleaner. By doing this, we can use a middleware to first ensure that the tenant_id is valid before even verifying the token. If we were to store the tenant_id inside the JWT token, we'd have to move the tenant validity check from the middleware to our Guard. This would require the following steps: 1- Decode the token to extract the tenant_id. 2- Check if this tenant_id is valid and fetch the correct secret key for that tenant (assuming each tenant has their own secret key, which is the recommended approach for security when using multiple DBs). 3- Use that tenant-specific secret key to verify the token. 2) "Rather that create a separated secret for each tenant?" => Using the same secret key for all tenants introduces a significant security risk. If that key is compromised, all tenants in your system are at risk. However, by giving each tenant their own secret key (stored in their own database), you minimize the impact of a breach. If one tenant's secret is compromised, it only affects that tenant, while the others remain secure. This adds an important layer of isolation and protection for tenant data. It's worth mentioning, that this reply is specific to our decision of using different DBs for each tenant

  • @duykhanhnguyen9274
    @duykhanhnguyen9274 2 หลายเดือนก่อน

    Why don't you use nestjs/passport for auth?

  • @mohamedmahdy6739
    @mohamedmahdy6739 2 หลายเดือนก่อน

    Thank you

  • @forwork7967
    @forwork7967 2 หลายเดือนก่อน

    wow, dude. it`s what i needed. i`ll try that

    • @Computerix
      @Computerix 2 หลายเดือนก่อน

      I'm glad :)