Skip to content

πŸ“š OnlineBookStore is a Spring Boot REST API for managing books with JWT authentication, CRUD operations, MySQL integration, and Swagger documentation. It supports searching, updating, and deleting books while ensuring security using Spring Security. The project is Dockerized for easy deployment. πŸš€

Notifications You must be signed in to change notification settings

madhav-7781/OnlineBookStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Online Book Store - REST API

πŸ”Ή Overview

OnlineBookStore is a Spring Boot-based REST API that provides CRUD operations for managing books in an online bookstore. It includes JWT authentication, MySQL database integration, and Swagger API documentation.


πŸš€ Features

βœ… JWT Authentication (Secure API access)
βœ… CRUD operations (Add, Get, Update, Delete books)
βœ… Search books by title, author, category, or rating
βœ… MySQL Database integration with JPA/Hibernate
βœ… API documentation with Swagger UI πŸ”— Swagger UI
βœ… Dockerized for easy deployment


πŸ—οΈ Tech Stack

  • Backend: Java, Spring Boot, Spring Security, Hibernate, JWT
  • Database: MySQL
  • Tools: Maven, Swagger, GitHub

πŸ“¦ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/YOUR-GITHUB-USERNAME/OnlineBookStore.git
cd OnlineBookStore

2️⃣ Configure MySQL Database

Update application.properties with your MySQL credentials:

spring.datasource.url=jdbc:mysql://localhost:3306/zynetic_db?useSSL=false
spring.datasource.username=root
spring.datasource.password=yourpassword

3️⃣ Build & Run the Application

mvn clean install
mvn spring-boot:run

The server will start at: http://localhost:8087

4️⃣ Access API Documentation (Swagger UI)

πŸ”— Open Swagger UI in your browser


πŸ“Œ API Endpoints

πŸ”‘ Authentication

  • POST /auth/signUp β†’ Register a new user
  • POST /auth/login β†’ Login and get JWT token

πŸ“– Book Management

  • POST /books β†’ Add a new book
  • GET /books β†’ Get all books
  • GET /books/{id} β†’ Get a book by ID
  • PUT /books/{id} β†’ Update a book by ID
  • DELETE /books/{id} β†’ Delete a book by ID

πŸ” Search Books

  • GET /books/search?title=BookTitle β†’ Search by title
  • GET /books/search?author=AuthorName β†’ Search by author
  • GET /books/search?category=Category β†’ Search by category
  • GET /books/search?rating=4.5 β†’ Search by rating

πŸ“œ License

This project is open-source and available under the MIT License.


About

πŸ“š OnlineBookStore is a Spring Boot REST API for managing books with JWT authentication, CRUD operations, MySQL integration, and Swagger documentation. It supports searching, updating, and deleting books while ensuring security using Spring Security. The project is Dockerized for easy deployment. πŸš€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages