Skip to content

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.

License

Notifications You must be signed in to change notification settings

lakshay1341/online-bookstore

Repository files navigation

📚 Online Bookstore System

Banner

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.

GitHub GitHub Pages Build Status

🚀 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

🏗️ 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:
    git clone https://github.com/lakshay1341/online-bookstore.git
    cd online-bookstore
    
  2. Set Up the Database:
  • Create a MySQL database named bookstoredb.
  1. Access the Application:

📖 API Documentation

Swagger UI

Explore the API endpoints using Swagger UI:

Screenshots of Swagger UI:

  • Book Service: Book Service Swagger
  • Order Service: Order Service Swagger
  • Inventory Service: Inventory Service Swagger

📸 Screenshots

Eureka Dashboard

Eureka Dashboard

Postman Tests

Postman Test - GET /books

🧪 Running API

Login:

  • baseUrl: http://localhost:8080
  • username: admin
  • password: password

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

📧 Contact

For questions or feedback, reach out to me at [email protected].

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Languages