Skip to content

rajneshwarsingh/Microservices-Kafka

Repository files navigation

Microservices with Kafka

This project demonstrates a microservices-based architecture for User and Product management using Kafka for communication between services. It includes features like JWT-based authentication, data validation, and error logging. Feel free to use, modify, and expand upon this project for personal or professional use.

What will you need:

  • Clone this repository: Microservices-Kafka
  • An IDE or text editor like VS Code
  • Node version installed above 20.12.1
  • Run npm install to install the necessary node packages.
  • Install MySQL and phpMyAdmin
  • Create an .env file based on the .env.sample and update MongoDB credentials.
  • Run the following commands to start the full project
    • Make the bash script executable: chmod +x nodeServe.sh
    • Run the bash script: ./nodeServe.sh
  • Run the Docker commands for setup the Kafka docker-compose up -d
  • Import the MIcroservice-Kafka.postman_collection.json file in postman
  • Microservices APIs ready for the testing

Project Run Commands

  • Make the bash script executable: chmod +x nodeServe.sh
  • Run the bash script: ./nodeServe.sh

Key Topics

The following topics were covered in this unit:

  • User CRUD module with SignUp and Login
  • Product CRUD module
  • Express-Gateway
  • Microservices architecture
  • Kafka communication
  • Request method like Get, Post, Put, Delete
  • JWT authorization and authentication
  • Joi validation
  • Sequelize ORM
  • Winston error and info loggers
  • Bcrypt for password hashing and compare
  • Helmet
  • Eslint
  • Multi environment config
  • PM2 for alive forever
  • Prettier for code formatter
  • Postman collection
  • Bash script

Helpful Links

Node.js: Nodejs.org
Typescript: typescriptlang.org
Microservice: microservices.io
Kafka: kafka.apache.org

© 2024 Rajneshwar Singh

About

Microservice with Kafka

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published