This repository contains the question microservice portion of the Questr Q&A application.
- Frontend
- API Gateway
- User Microservice
- Auth Microservice
- Question Microservice
- GRPC Protos
- Deployment
The API Gateway operates as a GraphQL server, managing requests and effectively directing them to the Auth, User, and Question microservices. It acts as an intermediary, ensuring seamless communication between the frontend's GraphQL requests and the microservices through GRPC. Additionally, it efficiently delivers responses from the microservices to the frontend in the form of GraphQL responses.
For communication with the microservices, the API Gateway relies on the structures provided in the GRPC Proto Repository, ensuring standardized and efficient interactions.
Furthermore, it utilizes Socket.IO to enable real-time notifications for new questions, delivering instant notifications to users. Developed using Nest.js, the API Gateway orchestrates these operations, serving as a central point for managing and directing requests within the platform.
- Nest.js: Employed for developing the microservice architecture.
- MongoDB: Utilized for database storage.
- TypeORM: Used as an ORM for database interactions.
- gRPC: Used for communication between microservices.
- i18next: Used for internationalization (i18n) support.
- class-validator: Used for validation within Nest.js.
- class-transformer: Used for object transformation within Nest.js.
- JWT: Utilized for session authentication and token generation.
Note: Please don't forget to use this service with api-gateway and question and auth microservices.
First setup the env file, provide microservice urls.
NODE_ENV=production
AUTH_SERVICE=0.0.0.0:5001
USER_SERVICE=0.0.0.0:5002
QUESTION_SERVICE=0.0.0.0:5003And then, install the packages.
# Install required packages
npm installLastly start the service. Api-Gateway graphql server will run on port 5000 and websocket/socket.io will run on 1000.
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prodThis project is licensed under the Beerware License.
If you find this project useful and we ever meet, you might consider buying me a beer in return.
If you have any questions or feedback regarding the project, feel free to get in touch:
- Email: ilkerakyel97@gmail.com
- LinkedIn: İlker Akyel
- Website: ilkerakyel.com
