This project is example of building application using principles of microservices and microfrontend architecture. Also we used monorepository technique to combine all codebase inside one git repository.
In src directory contains 3 directories for 3 different purposes:
- src/backend-services - directory consist of services which built upon microservices approach.
- src/client-services - directory with services to handle microfrontends architecture (built using single-spa)
- src/packages - directory with common use packages which can be used in backend services or client services or both
In every service and package we have more detailed description of its functionality and structure.
For this project we have used monorepository approach. This has been implemented using yarn 2 workspaces. Therefore now we are able to use our custom packages from the directory src/packages like ordinary npm packages.
To write commands like installing npm dependencies we use make
to write appropriate scripts. For example, to install npm dependencies for all workspaces to have to use command make deps
in the root of the repository, or to build all packages from the directory src/packages you have to use command make build
. Full list of available commands you can find in the Makefile.
We use projects lint-staged
and husky
to start tests on changed files. For example if you have changed files in authorization backend service we will start unit tests and lint tests for this service before commit.
Microservices starter is released under the MIT License.