A simple bookshop API.
A simple bookshop implemented to practice and aid understanding of concepts learnt in building Microservice Architecture.
The features are summarized below:
- Create/Read staff
- Create/Read books
- Sell books
- View sales
The Microservices Architecture for this project is illustrated in the diagram below:
These instructions will get you a copy of the project up and running on your local machine for testing purposes.
System requirements for this project to work includes:
- Java Development Kit (JDK) (v8 or higher)
- Maven
- MySQL(v5 or higher)
To install the dependencies in the pom.xml, click on the "import changes" prompt after each service folder contained in the project folder has been opened.
To run the project on your local machine, run the following files concurrently in the following service directories:
-
BookshopEurekaServerApplication.java
bookshop-microservices/bookshop_eureka_server/src/main/java/com/emeka/bookshop_eureka_server/
-
BookshopInventoryApplication.java
bookshop-microservices/bookshop_inventory/src/main/java/com/emeka/bookshop_inventory/
-
BookshopSalesApplication.java
bookshop-microservices/bookshop_sales/src/main/java/com/emeka/bookshop_sales/
-
BookshopStaffManagementApplication.java
bookshop-microservices/bookshop_staff_management/src/main/java/com/emeka/bookshop_staff_management/
-
ZuulServiceApplication.java
bookshop-microservices/zuul_service/src/main/java/com/emeka/zuul_service/
The various services can be tested via Postman with the following URLs:
- Inventory - http://localhost:8075/inventory/
- Sales - http://localhost:8075/sales/
- Staff Management - http://localhost:8075/staff_manager/
In addition, the Eureka Server UI can be visualized in the web browser via the URL: http://localhost:8761
- Spring Boot - The Java web framework used
- MySQL - SQL Database
- Spring Data JPA - The Object Relational Mapping (ORM) dependency for Spring Boot
- Eureka Server - Service Registry
- Hystrix - Fault tolerance & resilience
- Maven - Dependency Manager for Java
- Zuul - API Gateway