evereq / ultimate-backend

Multi tenant SaaS starter kit with cqrs graphql microservice architecture, apollo federation, event source and authentication

Home Page:https://ultimate-backend.developerhub.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ULTIMATE BACKEND

(WIP): This is an enterprise scale advanced microservice pattern with GraphQL, based on Domain (DDD) using the command query responsibility segregation (CQRS) design pattern.

License Snyk Code Size Version Top Language Top Language

Description

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

Features

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
  • ❌ Reactive health check for federated service and rebuilding gateway schema
  • ❌ WiP: React Website

Requirements

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

Installation

$ yarn

Running the microservice

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

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

License

This project is MIT licensed.

About

Multi tenant SaaS starter kit with cqrs graphql microservice architecture, apollo federation, event source and authentication

https://ultimate-backend.developerhub.io/

License:MIT License


Languages

Language:TypeScript 93.4%Language:Dockerfile 5.7%Language:HCL 0.6%Language:Shell 0.3%