This is a Node.js microservices e-commerce platform for buying and selling digital items. It uses the publish/subscribe (pub/sub) communication pattern with an asynchronous event bus. The system supports order reservation with automatic expiration to prevent double-spending.
Additional features:
- User authentication and authorization
- Stripe-powered payments
- Per-service automated tests with Jest
- CI/CD pipelines via GitHub Actions
- Typescript
- Node.js
- Express
- Next.js
- Docker
- Kubernetes
- Skaffold
- NATS Streaming Server
- Ingress Nginx
- Redis
- MongoDB + Mongoose
- Jest
- At a high level, the app is composed of six microservices that communicate using the pub/sub pattern over an asynchronous event bus.
- Each microservice runs inside its own Docker container.
- Containers are deployed into Kubernetes Pods.
- External traffic is routed into the correct Pod through Ingress Nginx.
- Everything runs inside a single Kubernetes cluster.
Services communicate through events using the publish/subscribe pattern, implemented with NATS Streaming.
- When something happens inside a service, it publishes an event describing that action.
- Other services subscribe to these events and react accordingly.
Key features of NATS Streaming in this system:
- Persistent append-only log for events, enabling replay
- Acknowledgement and retry mechanisms for reliable delivery
- Queue groups for round-robin load balancing across subscribers
To get started locally, first ensure that you have Docker, Kubernetes, and Skaffold installed. You can start the app by running:
skaffold dev
When running locally, you can’t simply visit localhost:1234 in the browser because Kubernetes does not expose services on localhost. Instead, you can map a custom domain to your local machine.
- Open your
/etc/hostsfile (it’s a file, not a folder). - Add an entry like:
127.0.0.1 mysite.com
- Update your
ingress-srv.yamlfile so the host matchesmysite.com. - Now, when you visit
http://mysite.comin your browser, traffic will be routed by Nginx to the correct service inside Kubernetes.


