This is an notification microservice based Microservice Architecture with NestJS. It uses NodeJS, so you need to have NodeJS installed on your machine. Also used and recommend Insomnia to test the API endpoints.
- Project uses NestJS as framework
- Project uses NodeJS as runtime environment
- Project uses TypeScript as language
- Project uses Prisma as ORM
- Project uses KafkaJS as consumer and producer
- Create a notification
- Read a notification
- Unread a notification
- Cancel a notification
- Get all notifications from recipient
- Count all notifications from recipient
OBS: The project was for knowledge consolidation, so some features may not be available. Also, some features may be changed in the future. Feel free to contribute to the project or use it as a base for your own project.
- Clone this repository
- Run
npm install
to install all dependencies - Run
npm run start:dev
to start the server in development mode - Run
npm run test
to run the tests /npm run test:watch
to run the tests in watch mode - If you want to run the project in production mode, run
npm run build
and thennpm run start:prod
- Use Insomnia or another one that you usually do, to test the API endpoints
- Use KafkaJS to test the message broker
- I created a new folder just typed
npm init
and thennpm install kafkajs
and then I created a file calledproducer.js
. In this file I created a producer following the documentation of KafkaJS. Then just runnode producer.js
and you can see the messages in the terminal where the project is running like an Consumer.