microservices-suite / node-microservices-suite

This repository is a nodejs based microservices built with the monorepo strategy
MIT License
7 stars 2 forks source link
automation chaos-engineering containerization docker-compose dry horizontal-scaling kubernetes microservices monorepo orchestration saas

Microservices Suite 🦧

Overview

Welcome to the πŸ“¦ Microservices Suite project! This suite is a collection of Node.js microservices built using the 🦧 [mono-repo]() strategy and leveraging the yarn workspaces concept. Each microservice runs in its isolated Docker container, and Kubernetes orchestrates the deployment, providing scalability and efficiency. To easily work with a @microservices-suite monorepo you need to install Suite CLI. With Suite you can easily scaffold,manage and automate your monorepo in development, CI as well as production. Check the installation guidelines in the README.md section of the .suite-cli root.

Project file structure

β”œβ”€ node-microservices-suite
β”‚  β”œβ”€ .suite-cli/
|  β”‚  β”œβ”€ cli/
|  β”‚  β”‚  β”œβ”€ scripts/
|  β”‚  β”‚  β”œβ”€ cli.js
|  β”‚  β”‚  β”œβ”€ package.json
|  β”‚  β”‚  β”œβ”€ README.md
β”‚  β”œβ”€ gateways/
|  β”‚  β”œβ”€ apps/
|  β”‚  |   β”œβ”€app-1/
|  β”‚  β”‚   | β”œβ”€ webserver/
|  β”‚  β”‚   | |  β”œβ”€Dockerfile
|  β”‚  β”‚   | |  β”œβ”€Dockerfile.dev
|  β”‚  β”‚   | |  β”œβ”€webserver.conf
|  β”‚  β”‚   | β”œβ”€ docker-compose.yml
|  β”‚  β”‚   | β”œβ”€ docker-compose.dev.yml
|  β”‚  β”‚   | β”œβ”€ README.md
β”‚  β”œβ”€ graphql/
|  β”‚  β”œβ”€ app-1/
|  β”‚  β”‚  β”œβ”€ apollo-server
|  β”‚  β”‚  β”œβ”€ README.md
β”‚  β”œβ”€ data-persistence/
|  β”‚  β”œβ”€ db-1/
|  β”‚  β”‚  β”œβ”€ Dockerfile
|  β”‚  β”‚  β”œβ”€ README.md
β”‚  β”œβ”€ k8s/
|  β”‚  β”œβ”€ service-1/
|  β”‚  β”‚  β”œβ”€ cluster-ip-service.yml
|  β”‚  β”‚  β”œβ”€ cluster-deployment.yml
|  β”‚  β”‚  β”œβ”€ ingress-service.yml
|  β”‚  β”‚  β”œβ”€ README.md
|  β”œβ”€ microservices/
|  β”‚  β”œβ”€ service-1/
|  β”‚  β”‚  β”œβ”€ src
|  β”‚  β”‚  β”œβ”€ .env
|  β”‚  β”‚  β”œβ”€ .env.dev
|  β”‚  β”‚  β”œβ”€ app.js
|  β”‚  β”‚  β”œβ”€ Dockerfile
β”œβ”€ β”‚  β”‚  β”œβ”€ Dockerfile.dev
|  β”‚  β”‚  β”œβ”€ ecosystem.config.js
|  β”‚  β”‚  β”œβ”€ index.js
|  β”‚  β”‚  β”œβ”€ package.json
|  β”‚  β”‚  β”œβ”€ task.json
|  β”œβ”€ shared/
|  β”‚  β”œβ”€ library-1/
|  β”‚  β”‚  β”œβ”€ APIError.js
|  β”‚  β”‚  β”œβ”€ catchAsync.js
|  β”‚  β”‚  β”œβ”€ index.js
|  β”‚  β”‚  β”œβ”€ package.json
|  β”‚  β”‚  β”œβ”€ pick.js
|  β”‚  β”‚  β”œβ”€ README.md
|  β”‚  β”‚  β”œβ”€ validate
β”‚  β”œβ”€ tests/
|  β”‚  β”œβ”€ service-1/
|  β”‚  β”‚  β”œβ”€ e2e/
|  β”‚  β”‚  β”œβ”€ integration/
|  β”‚  β”‚  β”œβ”€ snapshot/
|  β”‚  β”‚  β”œβ”€ unit/
|  β”‚  β”‚  β”œβ”€ README.md
|  β”œβ”€ .gitignore
|  β”œβ”€ .npmrc
|  β”œβ”€ .yarnrc.yml
|  β”œβ”€ docker-compose.yml
|  β”œβ”€ package.json
|  β”œβ”€ production.yml
|  β”œβ”€ README.md
|  β”œβ”€ yarn.lock

Monorepo strategy benefits for microservices:

Technologies Used

Alpine Images

Key Strategies:

Docker & Node Best Practices

Kubernetes (k8s)

Getting Started

Welcome to our project! To ensure a smooth setup and development experience, ensure you have the following tools installed on your machine:

Running Components

Running Services with -v --vanilla

Using Docker-Compose Directly

Contributing

Contributions are welcome! If you'd like to contribute to the Microservices Suite project, please follow these guidelines:

  1. Fork the repository and clone it to your local machine.

    git clone https://github.com/microservices-suite/node-microservices-suite.git
  2. Create a new branch for your feature or bug fix:

    git checkout -b feat/<my-feature>
  3. Make your changes and make sure that tests pass.

  4. Before committing your changes, make sure it follows the conventional commits specification:

    • We recommend you use the Better Commits CLI tool. It is a CLI for writing better commits, following the conventional commits specification.
  5. Push to the branch:

    git push origin feat/<my-feature>
  6. Submit a pull request detailing your changes.

  7. Please ensure that your pull request adheres to the project's code style and conventions.

License

Acknowledgements

We would like to thank the developers and contributors to the following technologies used in this project: