Server-side network for the E-commerce ticketing application. Cloud Services & Distributed Systems.
- Kubernetes, Docker, Typescript, Jest, Supertest, React, Next.js, Nats, Node.js, Express.js, MongoDB, Stripe API, GitHub, Redis, Bull.
-
Developed 5+ Node.js microservices hosted and containerized on Kubernetes using Typescript, Docker, GCP/GKE, MongoDB. Designed integrations with APIs like Stripe for payments ✅
-
Used Kubernetes-focused architecture. K8s Ingress Nginx for load balancing. NATS streaming service and queue groups for equal event distribution. Improved SEO by leveraging server side rendering using Next.js ✅
-
Implemented cross-service data replication to handle concurrency issues, making services easily discoverable,decentralized, with zero trust security ✅
-
Developed robust test suites leveraging: Jest for unit tests, Postman and Supertest for integration testing, mock callbacks for event publication reporting, and Github Pipelines for: build, test, deploy, and CI/CD DevOps procedures ✅
- Refer to this documentation for routing rules.
- Auth, client, expiration, payments, orders, tickets, client (frontend)
- Nats streaming service
- K8s Ingress Nginx
- infra/k8s
- ticketing-npm
walkthrough.mp4
- Install dependencies in each service by cding into each service and running: npm install
- Ex: cd tickets -> npm install Building the first docker image:
docker build -t yourDockerUsername/nameOfTheService .
Then push it to docker hub
docker push yourDockerUsername/nameOfTheService
To start all microservices, run the following command using Skaffold:
skaffold dev
This command will initiate the development environment and deploy the microservices using Kubernetes.
Make sure to provide the JWT key and Stripe secret key as an environment variable.
kubectl create secret generic your-secret --from-l
iteral NAME_OF_THE_KEY=VAL_OF_THE_KEY
To run tests ☝️ for the microservices, use the following npm script from the serice that hosts tests:
npm run tests
To test nats streaming service: first port forward nats using
kubectl port-forward <pod Name> <from matrching port>: <to forwarding port>
Ex: kubectl port-forward nats-depl-78874bcd8f-m6vxg 4222:4222
Make sure you are in the root directory wherere skaffold.yaml file is located
Encountering errors like "502 Bad Gateway" or connection refused (econnrefused 127.0.0.1)?
- Delete the ingress
kubectl delete namespace ingress-nginx
- Reinstall it from the official website
- Frontend (client)
- Add in HTTPS support
- Add in email support
- Add in 'build' steps for prod cluster (building Docker images in a prod style)
- Create a staging cluster
- Adding addtional services