Express JWT Boilerplate

screenshot of Express JWT Boilerplate
express

A stateless and scalable RESTful Api utilizing JWT authorization, MongoDB, Docker deployment, HaProxy loadbalancing, and more.

Overview

LicenseExpress-JWT-API is a beautifully crafted stateless and scalable RESTful API that makes use of JWT (JSON Web Tokens) for authentication. Initially designed as a learning tool, it has transformed into an invaluable example for those interested in JWT and stateless authentication in a practical setting. This API promotes efficient coding practices and employs several modern technologies for deployment and operation, making it quite suitable for those looking to grasp the essentials of authentication in Express applications.

However, while it's an excellent educational resource and boilerplate, it’s important to remember that it is not intended for production use. It currently lacks TLS support and has other limitations; hence it serves best as a foundational learning tool or prototype.

Features

  • Stateless Authentication: Utilizes JWT to allow for seamless stateless authentication, which facilitates horizontal scaling without session dependency.
  • Docker Containerization: Easily deploy the entire system using Docker, enhancing portability and consistency in various environments.
  • HaProxy Load Balancing: Incorporates HaProxy as a straightforward load balancer to efficiently distribute traffic across your API cluster.
  • Clean Code Practices: Follows StandardJS coding conventions, ensuring that the code is not only functional but also elegant and maintainable.
  • MongoDB Integration: Leverages MongoDB for data storage, providing a flexible, document-oriented database that can scale with your needs.
  • Comprehensive Endpoints: Offers a variety of useful API endpoints such as health checks and authentication, enabling easy integration and testing.
  • Customizable Configuration: Stores settings in a JSON file, which can be customized as needed; although storing sensitive info in a .env file is recommended for production scenarios.
express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.