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.
β
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
- Backend: Java, Spring Boot, Spring Security, Hibernate, JWT
- Database: MySQL
- Tools: Maven, Swagger, GitHub
git clone https://github.com/YOUR-GITHUB-USERNAME/OnlineBookStore.git
cd OnlineBookStore
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
mvn clean install
mvn spring-boot:run
The server will start at: http://localhost:8087
π Open Swagger UI in your browser
POST /auth/signUp
β Register a new userPOST /auth/login
β Login and get JWT token
POST /books
β Add a new bookGET /books
β Get all booksGET /books/{id}
β Get a book by IDPUT /books/{id}
β Update a book by IDDELETE /books/{id}
β Delete a book by ID
GET /books/search?title=BookTitle
β Search by titleGET /books/search?author=AuthorName
β Search by authorGET /books/search?category=Category
β Search by categoryGET /books/search?rating=4.5
β Search by rating
This project is open-source and available under the MIT License.