This application provides functionalities for managing users, books, categories, orders, and shopping carts. The system ensures secure access with role-based authorization (USER and ADMIN). The app is designed for book sales, allowing users to:
Create accounts and log in. Purchase books conveniently and quickly from home. Track the status of orders and know when they arrive at the post office. This is my first large-scale application, and I faced numerous challenges during its development. Each part was difficult but immensely educational, and I gained a lot of knowledge that will be invaluable for my future projects.
- Spring Boot
- Spring Security
- Spring Data JPA
- JWT (JSON Web Token)
- Swagger
- Liquibase
- MapStruct
- Lombok
- Hibernate Validator
- MySQL
- AuthenticationController
POST /auth/registrationβ Register a new user.POST /auth/loginβ User authentication (login).
- BookController
GET /booksβ Retrieve all books with pagination (ADMIN access only).GET /books/{id}β Retrieve a book by its ID.POST /booksβ Create a new book (ADMIN access only).PUT /books/{id}β Update a book by its ID (ADMIN access only).DELETE /books/{id}β Delete a book by its ID (ADMIN access only).GET /books/searchβ Search books by parameters.
- CategoryController
POST /categoriesβ Create a new category (ADMIN access only).GET /categoriesβ Retrieve all categories.GET /categories/{id}β Retrieve a category by its ID.PUT /categories/{id}β Update a category by its ID (ADMIN access only).DELETE /categories/{id}β Delete a category by its ID (ADMIN access only).GET /categories/{id}/booksβ Retrieve all books in a category by its ID.
- OrderController
POST /ordersβ Create a new order (USER access only).GET /ordersβ Retrieve all orders of the logged-in user (USER access only).PATCH /orders/{id}β Update the status of an order (ADMIN access only).GET /orders/{orderId}/itemsβ Retrieve all items from a specific order (USER access only).GET /orders/{orderId}/items/{itemId}β Retrieve a specific item from an order (USER access only).
- ShoppingCartController
GET /cartβ Retrieve the current user's shopping cart.POST /cartβ Add a book to the shopping cart.PUT /cart/items/{cartItemId}β Update the quantity of items in the cart.DELETE /cart/items/{cartItemId}β Remove an item from the cart.
I have always loved books, especially those that help understand the meaning of human existence and provide fuel for thought. Inspired by this passion, I decided to create my own application, where users can purchase books from the comfort of their homes.
You can also find a video of the program at this link: https://www.loom.com/share/0c519d24efc04b64acf9a3e9096b40cb?sid=e3750a8b-c044-4b13-b382-535497228e21
- Email: greqit.work@gmail.com
