This project is an application that exemplifies the microservice architecture. In the project, there is a scenario about the user and the awards received by the user.
Node.js + GraphQL + RabbitMQ + PostgreSQL + Apollo + Sequelize
- Fully isolated GraphQL microservices are served to the outside world with the GraphQL Api Gateway.
- Schema reading was done directly from microservices using Apollo/Gateway and Apollo/Federation. In this way, Open/Closed Principle is provided for Api Gateway.
- ORM (Sequelize) and GraphQL were combined with the "graphql-sequelize" package in the microservice. In this way, automatic resolver operation is performed according to model types.
- Communication between RabbitMQ and microservices has been provided.
- PostgreSQL is used as database. There is a separate database for each microservice.
- Every service that has a Many-To-Many relationship has tables that store this relationship. The relationship between discrete microservices is provided in this way. (For User-Reward, each microservice has a common UserReward table.)
- Prepared for installation using Docker.
// cd nodejs-microservices-master/src
docker-compose up
- GraphQL Api Gateway -> http://localhost:3000
- User Service GraphQL -> http://localhost:3001
- Reward Service GraphQL -> http://localhost:3002