A microservices-based Online Bookstore System built with Spring Boot, Spring Cloud, Spring Security, Netflix Eureka, and MySQL. This project demonstrates a distributed system with service discovery, API Gateway, and inter-service communication, featuring book management, order processing, and inventory tracking.
- Microservices Architecture: Separate services for books, orders, and inventory.
- Service Discovery: Netflix Eureka for dynamic service registration and discovery.
- API Gateway: Centralized routing with Spring Cloud Gateway.
- Database: MySQL for persistent storage with JPA/Hibernate.
- API Documentation: Swagger UI for API exploration.
- Testing: Comprehensive API tests with Postman.
A static version of the API documentation is hosted on GitHub Pages: Online Bookstore API Docs
The system consists of the following microservices:
- Eureka Server: Service registry for discovery.
- API Gateway: Entry point for all client requests.
- Book Service: Manages book CRUD operations.
- Order Service: Handles order creation and management.
- Inventory Service: Tracks book stock levels.
- Java 17
- Maven
- MySQL
- Postman (for API testing)
- Clone the Repository:
git clone https://github.com/lakshay1341/online-bookstore.git cd online-bookstore
- Set Up the Database:
- Create a MySQL database named
bookstoredb
.
- Access the Application:
- Eureka Dashboard: http://localhost:8761
- API Gateway: http://localhost:8080
- Swagger UI for each service:
- Book Service: http://localhost:8081/swagger-ui.html
- Order Service: http://localhost:8082/swagger-ui.html
- Inventory Service: http://localhost:8083/swagger-ui.html
Explore the API endpoints using Swagger UI:
Screenshots of Swagger UI:
Login:
baseUrl
:http://localhost:8080
username
:admin
password
:password
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or feedback, reach out to me at [email protected].