Nestjs Microservice Boilerplate Api

screenshot of Nestjs Microservice Boilerplate Api
nestjs

Nestjs boilerplate microservice api | Mongodb CRUD - Postgres CRUD | Docker | Husky | Secrets service | HTTP service | Logs service | Authentication | Authorization | Error Handler | Swaggger Documentation | Mongo Generic Repository | Postgres Generic Repository

Overview:

The Nestjs Boilerplate Microservice API is a microservice built using the best architecture concepts such as onion architecture, DDD, and clean architecture. It has been tested on Linux and WSL2 and provides extensive features and functionalities for building scalable and modular microservices.

Features:

  • Onion architecture, DDD, and clean architecture concepts implemented
  • Support for Linux and WSL2
  • CRUD scaffolding for Postgres and Mongo databases
  • Entity validation for both Postgres and Mongo
  • Logical deletion for both Postgres and Mongo
  • Partial entity update for both Postgres and Mongo
  • Postgres migrations support
  • Microservice architecture with Docker
  • Observability with tracing, logs, and metrics
  • Git hooks and Husky integration
  • Semantic Release for automated versioning
  • Secrets Service for managing application secrets
  • HTTP Service for handling API requests
  • Logger Service for logging application events
  • Authentication, login, logout, and authorization support with role-based access control
  • Error Handler for centralized error handling
  • Libs Structure for modular code organization
  • Dependency Inversion Pattern for loose coupling
  • Usecase Pattern for separating business logic
  • Interface Adapter Pattern for separating interfaces from implementations
  • Generic Repository Pattern for database operations
  • Swagger Documentation for API documentation
  • Cache Service for caching data with Redis
  • Database seed support
  • Replica set for mongodb transport
  • Transaction session support for Postgres
  • Unit tests with 100% coverage

Summary:

The Nestjs Boilerplate Microservice API is a powerful and feature-rich microservice boilerplate that implements best-practice architecture concepts. It provides a solid foundation for building scalable and modular microservices with support for multiple databases, extensive validation and CRUD functionalities, observability, authentication, and much more. With its comprehensive documentation and easy installation process, it is a great starting point for developers looking to build microservices using the Nestjs framework.

nestjs
Nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript.

fullstack
Fullstack

A fullstack boilerplate provides a starter application that includes both frontend and backend. It should include database, auth, payments, user roles and other backend services to build a fully featured saas or webapps.

docker
Docker

A website that uses Docker for containerization to streamline development, testing, and deployment workflows. This includes features such as containerization of dependencies, automated builds and deployments, and container orchestration to ensure scalability and availability.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.

zod
Zod

Zod is a TypeScript-first schema declaration and validation library. It allows you to define schemas that can validate data at runtime while providing excellent TypeScript inference, making it perfect for API validation, form validation, and type-safe data handling.