Products | Cart | Orders |
---|---|---|
Simplified cloud-native ecommerce application hosted on Kubernetes, allowing users to browse products and submit orders through an iOS frontend. The goal of the project is to experiment with languages, frameworks and architectures
Table of Contents
Service | Language | Description |
---|---|---|
frontend-ios | Swift | Mobile UI |
gateway | Helm / Yaml | API Gateway that forwards clients to the micro-services, handles JWT validation, terminates tls and transforms url paths |
identity-service | Typescript | Manages customer accounts and signs JWTs (symmetric HMAC), while hosting a JSON Web Key set (JWK) to offload authorization |
catalog-service | Java | Manages a catalog of products and categories |
cart-service | Go | Manages shopping carts for registered customers |
order-service | Typescript | Manages complete orders for registered customers based on shopping carts |
payment-service | Go | Manages payments based on orders from registered customers, offloading payment processing to the Stripe payment gateway |
load-generator | Python | Generates artificial load using Python config files |
Ops
- Docker
- Kubernetes
- Helm
- Skaffold
- Prometheus
- Grafana
- Locust
Dev
- iOS (with RxSwift)
- Nodejs Express
- Go net/http (vanilla Go)
- Java Springboot
- Postgresql (relational database)
- Redis (cache)
- Minio (S3)
Ensure Docker and Skaffold are installed
- Enable Kubernetes on Docker Desktop
- Clone this repository
git clone git@github.com:Bajocode/polyglot-microservices-webshop.git
cd polyglot-microservices-webshop
- Deploy
# The user value forwards skaffold.yaml defined services (the gateway :8080)
skaffold run --port-forward=user --tail
wait and verify all helmcharts have been deployed
kubectl get pods
NAME READY STATUS RESTARTS AGE
cart-service-7b9695d479-s2r4t 1/1 Running 0 8m1s
cart-service-redis-master-0 1/1 Running 0 8m1s
catalog-service-58dbd85c8b-pftj5 1/1 Running 0 8m12s
catalog-service-postgresql-0 1/1 Running 0 8m12s
gateway-87cf57767-47qnc 1/1 Running 0 7m34s
identity-service-567685c7b6-mcx68 1/1 Running 0 7m52s
identity-service-postgresql-0 1/1 Running 0 7m51s
loadgenerator-58c8d474f8-zxctx 1/1 Running 0 7m32s
order-service-5df4f68cb9-vtkvv 1/1 Running 0 7m38s
order-service-postgresql-0 1/1 Running 0 7m38s
payment-service-5bdf497d8b-6nxt2 1/1 Running 0 7m36s
- The gateway is exposed by skaffold. To do it manually:
kubectl port-forward deployment/gateway 8080
- Destroy (optional)
skaffold delete
Ensure Docker and Docker Compose are installed
- Clone this repository
git clone git@github.com:Bajocode/polyglot-microservices-webshop.git
cd polyglot-microservices-webshop
- Deploy
docker compose up
- Destroy (optional)
docker compose down --rmi all
Verify the backend and infrastructure
e2e_test.sh: (simplified test framework I've written in bash)
./e2e_test.sh
- async message passing
- images and object-store (minio)
- service bus architecture with RabbitMQ
- end to end testing
- payment with tokens
- react front-end
Fabijan Bajo - linkedIN - email
Project link: https://github.com/Bajocode/polyglot-microservices-webshop