nestjs-microservice-boilerplate-api

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

dockerredispostgresboilerplatetypescriptmongodbauthenticationmicroservicemigrationsmongooseclean-architectureauthorization
FreeRepo

Preview

nestjs-microservice-boilerplate-api preview

Overview

This is a NestJS microservice boilerplate built with Onion Architecture, Domain-Driven Design and Ports and Adapters patterns. It provides scaffolding for rapid CRUD generation across PostgreSQL and MongoDB databases, includes authentication and role-based authorization, supports caching with Redis or in-memory storage, offers comprehensive testing with 100% coverage and features observability through tracing, logging and metrics.

Features

crud-scaffoldingauthenticationauthorizationrole-based-access-controlpassword-resetrefresh-tokensmigrationserror-handlingswagger-documentationcachingloggingtracingmetricsemail-templatesgeneric-repositoriesdependency-injection

Feature Flags

userDashboardauthenticationblogemailspaymentsauthorizationi18nloggingErrorTrackingsearchapiDocscachingformsValidation

Recommended Use Cases

microservice-architecturemulti-database-applicationsenterprise-apisscalable-backend-systemsddd-implementations

Frontend

None

Backend

nestjstypescripttypeormmongoose

Auth Providers

None

Deployment Targets

docker

Payment Providers

None

Quick Facts

โญ Stars
369
๐Ÿด Forks
96
๐Ÿงพ License
mit
๐Ÿ”„ Active
Unknown
๐Ÿ•’ Last Commit
2025-04-24T01:47:01Z

Stack

Framework
nestjs
Language
typescript
Database
mongodb, postgresql
ORM
typeorm, mongoose
Testing
jest
i18n
i18n
CI
husky, commitlint, eslint, prettier

Data Layer

Databases
postgresql, mongodb, redis
ORM
typeorm, mongoose

UI Stack

Developer Experience

Docker
Yes
Tests
Yes
Quickstart
Yes
env.example
Yes
CI
husky, commitlint, eslint, prettier

Pricing

Classification
free
Selected
โ€”
Notes
MIT licensed open-source project
Get Started with this Boilerplate