https://github.com/lakshay1341/online-bookstore
A microservices-based Online Bookstore System built with Spring Boot, Spring Cloud, 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.
https://github.com/lakshay1341/online-bookstore
api-gateway lombok microservice mysql netflix-eureka spring-boot spring-cloud
Last synced: 7 months ago
JSON representation
A microservices-based Online Bookstore System built with Spring Boot, Spring Cloud, 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.
- Host: GitHub
- URL: https://github.com/lakshay1341/online-bookstore
- Owner: lakshay1341
- License: mit
- Created: 2025-03-05T17:42:57.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-05T19:24:26.000Z (7 months ago)
- Last Synced: 2025-03-05T19:31:17.376Z (7 months ago)
- Topics: api-gateway, lombok, microservice, mysql, netflix-eureka, spring-boot, spring-cloud
- Homepage:
- Size: 579 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Online Bookstore System

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.
  
## ๐ Features
- **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.## ๐ Hosted Documentation
A static version of the API documentation is hosted on GitHub Pages: [Online Bookstore API Docs](https://lakshay1341.github.io/online-bookstore/)## ๐๏ธ Architecture
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.## ๐ ๏ธ Setup Instructions
### Prerequisites
- Java 17
- Maven
- MySQL
- Postman (for API testing)### Steps
1. **Clone the Repository**:
```bash
git clone https://github.com/lakshay1341/online-bookstore.git
cd online-bookstore
2. **Set Up the Database**:
- Create a MySQL database named `bookstoredb`.3. **Access the Application**:
- Eureka Dashboard: [http://localhost:8761](http://localhost:8761)
- API Gateway: [http://localhost:8080](http://localhost:8080)
- Swagger UI for each service:
- Book Service: [http://localhost:8081/swagger-ui.html](http://localhost:8081/swagger-ui.html)
- Order Service: [http://localhost:8082/swagger-ui.html](http://localhost:8082/swagger-ui.html)
- Inventory Service: [http://localhost:8083/swagger-ui.html](http://localhost:8083/swagger-ui.html)## ๐ API Documentation
### Swagger UI
Explore the API endpoints using Swagger UI:
- [Book Service Swagger](http://localhost:8081/swagger-ui.html)
- [Order Service Swagger](http://localhost:8082/swagger-ui.html)
- [Inventory Service Swagger](http://localhost:8083/swagger-ui.html)Screenshots of Swagger UI:
- Book Service: 
- Order Service: 
- Inventory Service: ## ๐ธ Screenshots
### Eureka Dashboard
### Postman Tests
## ๐งช Running API
Login:
- `baseUrl`: `http://localhost:8080`
- `username`: `admin`
- `password`: `password`## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.## ๐ง Contact
For questions or feedback, reach out to me at [lakshaychaudhary2003@gmail.com](mailto:lakshaychaudhary2003@gmail.com).