Ticketing Software – React/NextJS/TypeScript on Microservices Architecture

Ticketing software is a full stack application. On the frontend, it use React and Next JS to present content to users. Each service is created using Node and Express. Data for each service is held in either a Mongo database. The entire app is deployed and runs in Docker containers executed in a Kubernetes cluster. Finally, almost all of the code is written with Typescript.

Benefits of microservice architecture

Since microservices are loosely coupled and have a clearly defined purpose, the application is easier to manage and understand. Here are a few key benefits of using a microservice-based architecture:

  • Scalability is easy, as you can think of the whole system as a collection of services, each interfacing with other microservices. This allows you to scale up, down, or out based on the resources needed by individual microservices instead of the entire application (i.e., monolithic architecture).
  • Simplified developer experience so that a new developer joining the team does not have to understand the entire system but only the context of the service they are working on. This improves productivity as they can focus on a single code base and its functionality.
  • Platform independence and flexibility so that developers can choose the best tools for the job when building services for the system.

Tech Stack

  • TypeScript
  • NodeJS
  • Ingress NGINX
  • Docker
  • Kubernetes
  • Skaffold
  • Macos Docker Desktop

Running Application

Configure hostname to your prefer.

https://github.com/openmymai/nodemicroservice.git
cd nodemicroservice
skaffold dev

Browse to http://[hostname]/api/users/signup

Some fixes

From first running, it does not work because it cannot pull ingress-controller image.

Screenshot 2023-01-06 at 12 22 08 AM

Then using following command to find the error.

kubectl describe <error pod>

Screenshot 2023-01-06 at 12 33 21 AM

It display error message.

Screenshot 2023-01-06 at 12 22 36 AM

Then try to pull image using

docker pull <image>

Screenshot 2023-01-06 at 12 22 53 AM

Finally, it’s work and get “Running”.

Screenshot 2023-01-06 at 12 23 06 AM

GitHub

View Github