Part 3

The second part of the project is security.

In back-end Spring Security is used. Users are able to register and login, there are front-end forms and back-end logic for it. Front-end keeps JWT in local storage. When user is logged in, it is possible to logout using button provided on header or in account information page. Upon logout the token is cleared from front-end. Also session gets invalidated, that means old tokens cannot be reused to perform requests.

There are three different user roles: GUEST, USER and ADMIN.

Guests can see all books and their detailed descriptions. In addition to that, guests are able to sort books by price, search for books by ISBN, title, author and keyword. Guests can create an account for themselves to become a user or log in to an existing one.

Users can do all the things that a guest can, but they have additional possible activities. Each user has their own personal shopping cart in which they can add products. Users can see their shopping carts contents and remove items from there. Users can finalize their order by submitting it.

Admin role is the most powerful one. Admins can add, see, edit and remove books.

Front-end works in mobile. For that BootstrapVue was used.

User stories done in Part 3

  • As a guest I can create an account.
  • As a guest I can login to an existing account.
  • As a user I can add products to the shopping cart and see confirmation that it was successful.
  • As a user I can see the content of my cart and remove unwanted items from there.
  • As a user I can place the order and see a confirmation that my purchase was successful.
  • As an admin I can see, add, remove and edit books.
  • As an admin and user I can log out from my account.