(WIP): This is an enterprise scale advanced microservice pattern with GraphQL, based on Domain (DDD) using the command query responsibility segregation (CQRS) design pattern.
This should be the go to backend base for your next scalable project. This is a proof of concept project designed to be extremely slim and scalable, with distributed data request and process handling, built from the ground up for production use. It comes with Multi-Tenancy SaaS support, following different multi-tenancy database strategy as well as different resolver patterns to identify your tenants. The goal is to give your next big project that extra leap to awesomeness. To get started read the Documentation
Software features
- ✅ CQRS
- ✅ Software as a Service
- ✅ Authentication by stateful session
- ✅ User
- ✅ Event Sourcing
- ✅ Federated GraphQL Microservice
- ✅ Emailing Queue
- ✅ (WiP) Role Based Access Control
- ✅ Multi Tenancy
- ✅ Payment (Stripe)
- ✅ SaaS Plans (Stripe)
- ✅ (WiP) Security
- ❌ (WiP) Documentation
- ❌ (WiP) Support for language translation
- ❌ Reactive health check for federated service and rebuilding gateway schema
- ✅ React SSR Starter Kit
Store and Cache | Stack and frameworks | Deployment |
---|---|---|
Event Store (Event Source Store) | NestJS (Server Framework) | Docker |
Redis (cache) | NodeJS (System runtime) | Kubernetes |
MongoDB (Database) | Typescript | Azure Pipeline |
ArangoDB (Database) | Apollo Server | |
Express JS | ||
Apollo Gateway | ||
Fastify | ||
GRPC |
$ yarn
You should start the microservices of type service before the gateways. Example
# Start with staging environment for auth service
$ NODE_ENV=staging npx nest start service-auth
# Start with staging environment for user service
$ NODE_ENV=staging npx nest start service-user
# Start with testing environment for tenant service
$ NODE_ENV=testing npx nest start service-tenant
# Start with testing environment for payment service
$ NODE_ENV=testing npx nest start service-payment
# Start with testing environment for notification service
$ NODE_ENV=testing npx nest start service-notification
# Start with testing environment for project service
$ NODE_ENV=testing npx nest start service-project
Once all services are up and running, you can start the gateways
# development for admin gateway
$ yarn run start gateway-admin
# watch mode for admin gateway
$ yarn run start:dev gateway-admin
# development for admin gateway
$ yarn run start gateway-client
# watch mode for admin gateway
$ yarn run start:dev gateway-client
# production mode for admin gateway
$ yarn run start:prod
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
This project is MIT licensed.