While you are doing online shopping, you don't even think how this entire system works! We've developed Backend technology for people got interested in it after reading the first sentence😊.
Let's explore online shopping with the help of books together! Here you will find API for managing possible activity on online bookstore website.
- Backend: Java, Spring Boot, Hibernate, Maven
- Database: MySQL
- Migrations: Liquibase
- Security: JWT
- Deployment: AWS
- ACID, CRUD and SOLID adherence
- Role allocation (ADMIN as manager & USER as a shopper) 🔐
- Soft deletion in almost all entities for data consistency
- Docker and Swagger usage
- Testing
- CI/CD checkstyle pipeline
- Join and sign in:
- join the store
- sign in to look at books and buy them
- Look at and search for books:
- look at all the books
- look closely at one book
- find a book by typing its name
- Look at bookshelf sections:
- see all bookshelf sections
- see all books in one section
- Use the basket:
- put a book in the basket
- look inside the basket
- take a book out of the basket
- Buying books:
- buy all the books in the basket
- look at past receipts
- Look at receipts:
- see all books on one receipt
- look closely at one book on a receipt
- Arrange books:
- add a new book to the store
- change details of a book
- remove a book from the store
- Organize bookshelf sections:
- make a new bookshelf section
- change details of a section
- remove a section
- Look at and change receipts:
- change the status of a receipt
POST/api/auth/register — User registrationPOST/api/auth/login — User authentication
POST/api/books — Create a new book (for ADMIN only)GET/api/books/{id} — Retrieve book information (for USER only)GET/api/books — Retrieve books (for USER only)GET/api/books/search — Search books (for USER only)PUT/api/books/{id} — Update book (for ADMIN only)DELETE/api/books/{id} — Delete book (for ADMIN only)
POST/api/categories — Create a new category (for ADMIN only)GET/api/categories/{id} — Retrieve category information (for USER only)GET/api/categories — Retrieve categories (for USER only)GET/api/categories/{id}/books — Retrieve books in category (for USER only)PUT/api/categories/{id} — Update category (for ADMIN only)DELETE/api/categories/{id} — Delete category (for ADMIN only)
POST/api/cart — Add book to shopping cartGET/api/cart — Retrieve my shopping cart informationPUT/api/cart/items/{cartItemId} — Update book quantity in shopping cartDELETE/api/cart/items/{cartItemId} — Remove book from shopping cart
POST/api/orders — Create a new order (for USER only)GET/api/orders — Retrieve orders (for USER only)GET/api/orders/{id}/items — Retrieve items in order (for USER only)GET/api/orders/{id}/items/{itemId} — Retrieve orders (for USER only)PATCH/api/orders/{id} — Update order status (for ADMIN only)
- Copy
.env.samplefile to new.envfile - Fill your
.envfile with required environment variables - Run Docker application
- Security setup: do not forget to use your
.envvariables appropriately in order to avoid critical situations and information leakage - Migrations: do not change root files while working on code, the best practice is to add new files with changing migration rules such as
ALTER table - Tests integration: it requires you to be attentive while changing something in code since you can ruin both unit and integrative tests
- AWS deployment: consider your repository, IAM user, RDS database, ECR, EC2 instance and security variables are corresponding in order to publish and update project effectively
API endpoints collection is available at https://www.postman.com/astashenkova-katya-2138811/bookstore-app
Documentation is available at https://documenter.getpostman.com/view/51183420/2sBXqKqLVH
Steps to reproduce below.
- Authenticate — Run the authentication request first to obtain a token
- Connect Google Calendar — Run the authentication request first in order to get your connection link, past this link into your browser and select your email, after successfull message return back
- Explore available requests — Browse the collection folders to find grouped endpoints; each request includes a description of its purpose and expected parameters
- Send requests — Select any request, adjust path parameters or the request body as needed, click
Sendto interact with the API directly - Use it for testing — The collection can be run as a full test suite via the
Collection Runneror withNewmanfor automated testing
Documentation API is available at http://3.82.41.71/api/swagger-ui/index.html
Steps to reproduce below.
- Authenticate — Run the authentication request first to obtain a token
- Connect Google Calendar — Run the authentication request first in order to get your connection link, past this link into your browser and select your email, after successfull message return back
- Explore available requests — Each controller includes a short description of its purpose
- Send requests — Select any request, click
Try it out, adjust path parameters or the request body as needed, clickExecuteto interact with the API directly