GitHub Repo Part 1 Part 2 Part 3 Part 4 What we are building Introduction ExpressJS Web API with JWT full Auth System In this article, we will walk through the full process of building an ExpressJS API with JWT Authentication system, and E2E...
GitHub Repo Part 1 Part 2 Part 3 Part 4 JWT Middleware Let's create the middleware to handle the authentications. Create this file src/middlewares/jwt.middleware.ts. This middleware takes the Authorization header (Bearer [token]) and get the t...
GitHub Repo Part 1 Part 2 Part 3 Part 4 Auth Repository Finally, we arrived to the core logic of our project. Create now src/repositories/auth.repo.ts. In this file we gonna create a static methods class for our repo. Before that, Let's add some ot...
GitHub Repo Part 1 Part 2 Part 3 Part 4 Testing We will implement End-to-End testing with Jest to test our API. We will test the email tokens as well, we will need those tokens to be able to test the API completely. For the testing we will use...
Efficient API Design in NodeJS/ExpressJS with TypeScript Decorators - Introduction Abstraction is a core objective of programming language frameworks, including LaravelPHP, NestJS, and ASP.NET. These frameworks implement the MVC (Model-View-Controller) pattern, effectively abstracting HTTP handling, routing, and databa...
Understand High-Level Design to create the suitable infrastructure for your solution. - Introduction Architectural patterns provide structured ways to design software systems, especially when dealing with complex applications. Each pattern addresses specific challenges related to scalability, maintainability, and flexibility, making the...