/zen-dapr

Demonstrates NestJS monorepo with Dapr and app specific schemas on Prisma. Container driven approach with Docker Compose.

Primary LanguageTypeScriptMIT LicenseMIT

Zen

Nest Logo

Description

NestJS Monorepo powered by Dapr, Prisma and Docker (and K8S for deployments).

Features

  • Unified Configurator (Configurator from @zen/config)
  • DaprModule with a Service for simplified communication with the dapr sidecars for simple secrets, state and publishing feature.
  • Easy topic subscriptions intermediated by dapr via the DaprModule.subscribe dynamic module.
  • Prisma using secrets from Dapr (collected asynchronously during startup)
  • Prisma schema segregated per APP in the monorepo (prisma files are inside the applications corresponding directory)
  • Automatic migrations runner from compose file.

Comming Soon

  • Authorizer application for distributed Auth Guard with multiple authorities
  • Blog scope application with Users, Posts, Commets
  • Mailer app for sending transactional emails with tokens and others
  • Notificator app sending notifications via webhooks (slack, discord, teams)

Getting Started

We are using Docker 🐋 for running the environments properly with the segregated applications environments.

# Map secrets and variables from .env.template and secrets.template.json

# install the dependencies
$ npm install

# start postgres
$ docker compose up -d pgsql

# navigate through the app folds and run the required migrations with prisma
$ npx prisma migrate deploy

# start the rest of the applications
$ docker compose up -d

License

Nest is MIT licensed.