This monorepo contains code of the backend of the sleepr-api. This application implements microservice architecture using Nest.js and utilizes the transports provided by it. Authentication, reservations, payments and notifications services are used to facilitate the overall application.
In this application, Reservations microservice connects to Authentication, and transmits events or rpc calls to payments and notifications services. TCP transport is used in most of the cases, which can be easily switched to other transports like Rabbit MQ.
The application is dockerized and so, to learn the application, we need docker engine installed in the system.
To start all the services in the detached
mode, use the following command. The environment variables will be initialized by the docker compose file.
docker compose up -d
to follow the logs of a single services use the following command
docker logs -f application_name
To stop all the services, use the following command
docker compose down
The codebase is mostly inspired by the Udemy course on NestJS Microservices: Build & Deploy a Scaleable Backend by Michael Guay