Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Bookstore Microservices

A scalable Bookstore Management System built using Spring Boot Microservices Architecture. The project demonstrates service decomposition, API Gateway, Service Discovery, JWT Authentication, and inter-service communication following modern backend development practices.


🌐 Architecture

                   Client
                      │
                      ▼
                API Gateway
                      │
        ┌─────────────┴─────────────┐
        │                           │
        ▼                           ▼
   User Service               Book Service
        │                           │
        └─────────────┬─────────────┘
                      │
              Eureka Discovery Server
                      │
                   MySQL Database

🚀 Microservices

🔹 API Gateway

  • Single entry point for all client requests
  • Routes requests to appropriate microservices
  • Centralized request handling

🔹 Discovery Server

  • Eureka Service Registry
  • Service registration
  • Dynamic service discovery

🔹 User Service

Responsible for:

  • User Registration
  • User Login
  • JWT Authentication
  • Password Encryption
  • User Management

🔹 Book Service

Responsible for:

  • Add Book
  • Update Book
  • Delete Book
  • Search Books
  • Pagination
  • Category Management

✨ Features

  • Spring Boot Microservices
  • Spring Cloud Gateway
  • Eureka Discovery Server
  • JWT Authentication
  • RESTful APIs
  • Layered Architecture
  • Spring Data JPA
  • MySQL Integration
  • Exception Handling
  • Validation
  • Lombok
  • Maven Build
  • Docker Ready

🛠 Tech Stack

Backend

  • Java 21
  • Spring Boot
  • Spring Cloud
  • Spring Security
  • Spring Data JPA
  • Maven

Database

  • MySQL

Security

  • JWT Authentication
  • BCrypt Password Encoder

Tools

  • IntelliJ IDEA
  • Postman
  • Git
  • GitHub
  • Docker

📁 Project Structure

bookstore-microservices
│
├── api-gateway
│
├── discovery-server
│
├── user-service
│
├── book-service
│
├── docker-compose.yml
│
└── README.md

📦 APIs

User Service

Method Endpoint Description
POST /auth/register Register User
POST /auth/login Login User

Book Service

Method Endpoint Description
POST /books Add Book
GET /books Get All Books
GET /books/{id} Get Book
PUT /books/{id} Update Book
DELETE /books/{id} Delete Book

🔐 Security

  • JWT Authentication
  • Password Encryption
  • Protected APIs
  • Role-Based Authorization
  • Secure REST APIs

▶️ Running the Project

Clone Repository

git clone https://github.com/Luffy992/bookstore-microservices.git

Start Eureka Server

Run discovery-server

Start User Service

Run user-service

Start Book Service

Run book-service

Start API Gateway

Run api-gateway

🧪 API Testing

All APIs were tested using Postman.

Modules Tested:

  • Authentication
  • User Management
  • Book Management

📚 Learning Outcomes

This project helped me understand:

  • Microservices Architecture
  • API Gateway
  • Service Discovery
  • REST API Design
  • Spring Security
  • JWT Authentication
  • Inter-Service Communication
  • Spring Cloud
  • Docker Basics

🚀 Future Improvements

  • Config Server
  • Order Service
  • Notification Service
  • Docker Compose Deployment
  • Kubernetes
  • Redis Cache
  • Kafka Messaging
  • CI/CD Pipeline

👨‍💻 Author

Somesh Ramola

GitHub: https://github.com/Luffy992

LinkedIn: www.linkedin.com/in/somesh-ramola


📄 License

This project is licensed under the MIT License.

About

Bookstore Microservices application built with Spring Boot, Spring Cloud, Eureka, API Gateway, JWT Authentication, and MySQL.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages