Microservice architecture demonstration with Node.js (TypeScript) and Kafka
UNLICENSE License
Microservice architecture demonstration with Node.js (TypeScript) and Kafka.
This is a personal research project used for learning more about microservice architectures, structuring and good practices related to development on Docker and deployment onto a Kubernetes Cluster.
Kafka is used to connect all services using event streams.
Provides a basic dashboard interface in React and REST API that interacts with a runner service that handles processes to demonstrate event streams, etc. Keycloak handles for authentication and authorization.
Uses Github Actions for CI and CD, Pulumi for deployments. Tilt & minikube for local development and Husky for git hooks.
ESLint, Prettier and Jest for code style guidelines and testing.
An alternative docker compose setup is provided that mirrors the k8s cluster, albeit without the scaling.
Please note that the out-of-the-box configurations are not safe for a production environment.
One of the following configurations:
Note that the docker compose environment does not scale and is mainly for development purposes, while the kubernetes cluster is configured for scaling.
docker
minikube
tilt
pulumi
(optional)docker
compose
docker pluginRuns on https://rnd.lvh.me (and
<admin-service>.rnd.lvh.me
)
See docs/k8s.md
for more information about setting up a local Kubernetes cluster.
tilt up
Runs on http://localhost:8080 (and
/<admin-service>/
)
docker compose run --rm cli sh scripts/migrations.sh
docker compose up
When you open the app you will be redirected to the authentication client.
The default username is admin
and password admin
.
You can access the following administration interfaces with the URL patterns noted above:
kowl
- Kafka inspectionmailhog
- Mail previewadminer
- Database administrationauth
- Keycloak administrationSee docs/development.md
for more information.
If you want to deploy this into the cloud, see docs/deploy.md
.
It's also possible to do a deployment with git and docker compose by simply cloning this repository,
then use deploy/compose/docker-compose.yaml
directly or as a template and run it from the root directory.