Skip to content

nest boilerplate for development app in nestjs including cached and observability

Notifications You must be signed in to change notification settings

zulfikar4568/nest-boilerplate

Repository files navigation

Boilerplate of Nest Framework

concept

Architecture

  • This is used Domain Driven Design
  • Local Jwt Authentication (Passport JS)
  • Authentication can be via cookie or headers
  • Simple Role Based Enumeration
  • Custom (Decorators, Exceptions, Guards, Middlewares, Responses, Filters, Interceptors)
  • Authentication using HTTP Only, Secure, Same site
  • OpenAPI using swagger
  • Health Check
  • Git Hooks (Husky) configured check commit formar, linter & formatter
  • Redis cached

Observability

  • Trace is send to Grafana Tempo
  • Metrics is send to Prometheus
  • Log is send to Grafana Loki
  • Monitoring Dashboard used Grafana

Storage

  • Used PostgreSQL
  • ORM Prisma
  • Redis

Running dependencies using docker-compose

docker-compose up -d --build

Database Migration

yarn && yarn db:migrate
yarn prisma:sync
yarn db:seed

Running the app for development

yarn dev
# or
yarn watch

Running the app for production

yarn build && yarn start:prod

Test API

http://localhost:<your env port>/openapi

About

nest boilerplate for development app in nestjs including cached and observability

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages