An online book store that provides services like user registration, book inventory, order handling, and reviewing/rating books.
-
Backend: Node.js with gRPC
- Why? Node.js is heavily used in the industry and it's JavaScript-based.
-
Microservices Communication: gRPC
- Why? gRPC is a high-performance, open-source universal RPC framework which is gaining popularity in microservices communication.
-
Database: MongoDB and PostgreSQL
- Why? MongoDB, a NoSQL database, is good for unstructured data. It can be used for user data and reviews. PostgreSQL, a relational database, can be used for structured data like book inventory and orders.
-
Frontend: React.js with Redux, MUI, and TypeScript
- Why? React is widely used and very popular in the industry, good for creating dynamic UIs. Redux will helps manage our application's state.
-
Containerization: Docker
- Why? Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Each of our microservices can be a separate container.
-
Orchestration: Kubernetes
- Why? Kubernetes is an open-source container-orchestration system for automating application deployment, scaling, and management.
-
API Gateway: Kong
- Why? Kong is a widely used, scalable, open-source Microservice & API Gateway.
-
Authentication: JSON Web Tokens (JWT)
- Why? JWT is a compact, URL-safe means of representing claims to be transferred between two parties.
-
CI/CD: Jenkins
- Why? Jenkins is a free and open-source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery.
- User service: This microservice will handle all the user-related operations like user registration, user login, user profile details, etc.
- Book service: This microservice will handle all the operations related to books. For example, adding new books, updating the details of the books, deleting the books, etc.
- Order service: This microservice will handle the operations related to the orders. For example, placing a new order, canceling an order, updating the order details, etc.
- Review service: This microservice will handle operations related to book reviews and ratings.
All these microservices are developed and deployed separately. They will communicate with each other using gRPC. For example, when a user places an order, the order service needs to communicate with the book service to update the inventory.
For the frontend, we create a nice interface using React.js. It will communicate with the backend services through an API Gateway (Kong), which will route requests to the appropriate services.
- React.js:
- Pages:
- Registration/Login Page
- User Profile Page
- Books Listing Page
- Single Book Page with Reviews
- Order Page
- Redux for state management
- Axios for handling HTTP requests to the backend
- Pages:
- Kong:
- Route incoming requests to the appropriate microservice
- Docker:
- Dockerfiles for each microservice
- Build and runs the containers
- Kubernetes:
- YAML configuration files for each service
- Set up for deployment and services
- JWT:
- Generates and verifies JWT tokens with our User service
- Protect routes in Book, Order, and Review service by verifying the JWT token with each request
- Jenkins:
- Jenkins pipeline for CI/CD
- Performs testing and building Docker images
- Pushes Docker images to DockerHub or any other Docker Registry we have
- Deploy's the app to Kubernetes