Skip to content

πŸ“š Web application to review, buy and sell your favourite books!

Notifications You must be signed in to change notification settings

CodeURJC-DAW-2022-23/webapp6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š ReadMe.com πŸ“š

πŸ€” Buy and sell web store with user book reviews.

Web application made for the Web Applications Developement course from Universidad Rey Juan Carlos.

Deployed in the university server at Readme Sook Store.

πŸ€·β€β™‚οΈ Team organization

Team members

Name Email
Gonzalo Ortega Carpintero g.ortega.2019@alumnos.urjc.es
Sergio HernΓ‘ndez Sandoval s.hernandezsa.2019@alumnos.urjc.es
Markos Aguirre Elorza m.aguirre.2016@alumnos.urjc.es
Manuel Martin Alaez m.martinal.2017@alumnos.urjc.es
Alberto JimΓ©nez GΓ³mez a.jimenezg.2017@alumnos.urjc.es

Trello board

To organice the team tasks we will be using the following Trello board.

🌟 Main web features

Features that our page will have once the develpoment is complete.

Entities:

  • Users.
  • Books.
  • Book reviews.
  • Book offers.
  • Buy and sell records.

Types of users:

  • Unregistered - Can see book ofers a read book reviews.
  • Registered - Can write reviews, publish book offers and buy books.
  • Administrator - Can add new books and manage offers and accounts.

User permits:

  • Unregistered - No data collection.
  • Registered - Writen and read reviews, seen and published offers, bought and sold items and user profile with profile image, email and username.
  • Administrator - Total access, no saved data.

Images:

  • User profile image.
  • Book image.
  • Ofers images.

Charts:

  • Published books and offers statistics.

Complementary technology:

  • Email delivery to new users.
  • Advance search and recomendations algorithim based on read reviews and seen offers.

πŸš€ PHASE 1

Front-end and structure design

πŸ—ΊοΈ Main Pages

Main pages of our application.
Home page

Application main page where recomended products are displayed in accordance with the user preferences.

Home page (index)

Books general page

Page to display the searched books and filter them by genre.

Books general page

Book particular page

Page to display the reviews and offers of a particular book.

Book particular page

Upload review page

Page to write a review of a book so everyone can read it.

Upload review page

Upload offer page

Page to publish an offer of a book you want to sell.

Upload offer page

Offer page

Page to buy a book offer fro an other user.

Offer page

Checkout page

Page to introduce shoping details and complete an order.

Checkout page

Contact page

Page with info about us.

Contact page

Statistics page

Page with stats about from the application and books.

Statistics page

Login page

Page to introduce your user credentials.

Login page

Register page

Page to make an account into aour application.

Register page

User page

Page to display the users information, including its account information, its uploaded offers, its shoping record and its favourites books.

User page

Admin page

Page to upload new books to the database and manage all the application data.

Pages diagram. Pages diagram:

Pages diagram drawio

πŸš€ PHASE 2

Backend developement with Spring, Java and MySQL

πŸ“± Screens

Updated screens. Screenshots of the updated interface:

inicio

libros

contacto

estadisticas

inicio_sesion

registro

user-page user-page2 user-page3

modificar_usuario

admin1 admin2 admin3 (2)

libro

publicar reseΓ±a

vender libro

reseΓ±a

comprar

Screen navigation diagram. Updated navegation diagram:

diagrama navegacion

πŸ›  Technology description and development run instructions

  • Java version: 17
  • SpringBoot version: 2.4.4
  • Database: MySQL
    • Scheme: readmewebstore
    • User: root
    • Password: password

To start the application run the ReadmeBookstoreApplication.java and go to https://localhost:8443/ on your browser.

πŸ“Š Diagrams

Database entity diagram.

Diagram in which the different entities in the database are related.

Database entities diagram

Java class diagram of the models.

Diagram in which the different java classes are related.

Java class diagram

Java class diagram of controllers.

Diagram in which all the java classes of the application and the templates are related.

Diagram of classes and templates

πŸ™‹β€β™‚οΈ Member participation

Gonzalo Ortega Carpintero.
  • πŸ“‚ Completed tasks:

    • Spring project initialization.
    • Admin page HTML and funcionalities, including visualizing, editing and deleting, all data from models.
    • Upload books and its images as an admin funcionality.
    • Upload and buy offers funtionalities.
    • Statistics page with dinamic bar diagram.
    • General style and dessign changes.
  • πŸ“€ Most significant commits:

  • πŸ“ Files with more participation:

Sergio HernΓ‘ndez Sandoval.
  • πŸ“‚ Completed tasks:

    • Header and footer unification for templates.
    • Model, Service and Repository of reviews, including improvements and changes in the rest of the models.
    • Review controller and high participation in user, book and offer controller.
    • Initialization of part of the data in the databaseInitializer.
    • Implemented the funcionality of show/modify/delete the offers not sold from a user in his profile.
    • Implemented the funcionality of show/modify/delete the reviews from a user in his profile.
    • Implemented the funcionality of show/delete the favorite books from a user in his profile.
    • Implemented the funcionality of show the buy and sell historial from a user in his profile.
    • Some searchs with querys in repositorys.
    • Show the books in book general page.
    • Show the offers and reviews in particular book page.
    • Participation in the pagination.
    • Upload offers and upload reviews in a book.
    • Delete or modify reviews in the profile.
    • Modify the image of an offer.
    • Pages of error, including the controller and the template.
    • Changes in the style of the screens.
    • Improvements and bug fixes.
    • Drawing diagrams for documentation.
  • πŸ“€ Most significant commits:

  • πŸ“ Files with more participation:

Markos Aguirre Elorza .
  • πŸ“‚ Completed tasks:

    • Elemental funtionalities of the User entityModel, Service and Repository
    • Login
    • Register (uploading/updating text and image for the first time to the server)
    • User information display in the user-page (in collaboration with Sergio)
    • Everything regarding to security
    • Email sending additional technology implementation
  • πŸ“€ Most significant commits:

  • πŸ“ Files with more participation:

Manuel Martin Alaez.
  • πŸ“‚ Completed tasks:

    • Load images from database
    • Load more button in books
    • Load more button for partial search
    • Load more buttons for admin page and user page
    • Load more buttons for offers and reviews
    • Bugs and improvements
    • Navegation diagram
  • πŸ“€ Most significant commits:

  • πŸ“ Files with more participation:

Alberto JimΓ©nez GΓ³mez.
  • πŸ“‚ Completed tasks:

    • Database initialization.
    • Data of books, categories, favorite books, and bought books.
    • Searchtool, it is possible to search a book looking for the title, or a list of books looking for author, genre or a partial part of those properties.
    • Dropdown categories by genre using search controller.
    • Add or remove a book to favorites from the particular book page.
    • Algorithm of recomendation made in static.
    • Categories entity used in the recommendation algorithm.
    • Update of algorithm to dynamic using the database data.
  • πŸ“€ Most significant commits:

  • πŸ“ Files with more participation:

πŸš€ PHASE 3

API rest integration and Docker deployment

βœ’ API Rest documentation

Open API specification.

βœ’ Docker instructions

Docker image creation

To create a Docker image of our proyect, download the complete proget and run:
docker build -t readmebookstore/webapp6 -f docker/Dockerfile .

Docker compose run structions

To run our application container directly form Docker Hub theΓ©only requirements are to have Docker installed and a copy of our Doker Compose file.

Then, just run the following command indicating the Docker Compose file location:
docker-compose -f docker/docker_compose.ymlΒ up

πŸ“Š Diagrams

Java class diagram of web and rest controllers.

Updated diagram in which the java classes of the application and the templates are related.

diagrama

πŸ™‹β€β™‚οΈ Member participation

Gonzalo Ortega Carpintero.
  • πŸ“‚ Completed tasks:

    • Web URLs reformat to facilizate the API implementation.
    • Book related APIs.
    • Doker files added (althogh not working).
  • πŸ“€ Most significant commits:

  • πŸ“ Files with more participation:

Sergio HernΓ‘ndez Sandoval.
  • πŸ“‚ Completed tasks:

    • APIs related to reviews by user.
    • APIs related to reviews by admin.
    • APIs related to user by session user.
    • APIs related to user by admin.
    • APIs related to show statistics.
    • Passing duplicate code used in web and rest from controllers to services.
    • Improvements and bug fixes.
    • Updated class diagram.
    • Readme structuring.
  • πŸ“€ Most significant commits:

    • Commit 1 ReviewRestController initialized.
    • Commit 2 UserRestController finished.
    • Commit 3 StatisticsRestController started and completed.
    • Commit 4 Added the postman petition collection.
    • Commit 5 Added documentation of APIs.
  • πŸ“ Files with more participation:

Markos Aguirre Elorza.
  • πŸ“‚ Completed tasks:

    • Login API
    • Register API (email sending)
    • Security
    • Access permissions
  • πŸ“€ Most significant commits:

  • πŸ“ Files with more participation:

Manuel Martin Alaez.
  • πŸ“‚ Completed tasks:

    • APIs related to offers.
    • APIs related to offers by admin.
    • OpenApi documentation.
    • Bugs fixes.
  • πŸ“€ Most significant commits:

  • πŸ“ Files with more participation:

Alberto JimΓ©nez GΓ³mez.
  • πŸ“‚ Completed tasks:

    • AlgorithmService.
    • Insert search functions in BookService.
    • Api for pageable searched books and find all books.
    • Api for Algorithm.
    • Api to add favorite books.
    • Modify api to remove favorite books.
    • Move principal algorithm function to AlgorithmService.
    • Removing Algorithm web and rest controller files.
    • Modify book web and rest controller to launch the algorithm directly.
    • Remove duplicated and unused code.
  • πŸ“€ Most significant commits:

    • Commit 1 Change Algorithm functions to a Service.
    • Commit 2 Change Searcg functions to a Service.
    • Commit 3 Api for pageable searched books and findall books.
    • Commit 4 Functional algorithm api.
    • Commit 5 Api for add favorites and remove duplicated code in algorithm api.
  • πŸ“ Files with more participation:

πŸš€ PHASE 4

Web application as SPA client with Angular and deployment

πŸ…°οΈ Angular production files

Compile and run SPA with Angular instructions To generate Angular production files run:
`ng build --configuration production --base-href="/new/"`

Then, move the files to a new folder in the backend resources so it can be served using:
mkdir ../backend/src/main/resources/static/new
cp dist/frontend/* ../backend/src/main/resources/static/new

πŸ“½οΈ Demostration video

YouTube video link showing the main functionalities of our web.

Video

πŸ“Š Diagrams

SPA diagram.

SPA class diagram and templates.

SPAdiagram

πŸ™‹β€β™‚οΈ Member participation

Gonzalo Ortega Carpintero.
  • πŸ“‚ Completed tasks:

    • Angular proyect and router maping file initializated.
    • Angular admin page and all its components.
    • Title components.
    • Docker image creation and deployment in the university server.
  • πŸ“€ Most significant commits:

    • Commit 1 Router initialization.
    • Commit 2 Data load to admin page.
    • Commit 3 Upload books from admin page.
    • Commit 4 Admin page modularized and completed.
    • Commit 5 Updated Dokerfile to deploy the frontend.
  • πŸ“ Files with more participation:

Sergio HernΓ‘ndez Sandoval.
  • πŸ“‚ Completed tasks:

    • Component of display everything related to a book, including show his reviews, his offers and add/remove favorites.
    • Component of upload a review.
    • Component of upload a offer.
    • Component of upload a review.
    • Component of edit a offer.
    • Component of edit a offer.
    • Component of checkout (buy a offer).
    • Common components such as review, offer and book formats.
    • Added Angular material.
    • Many code improvements and bug fixes.
  • πŸ“€ Most significant commits:

    • Commit 1 Created offer and review cards and show all data of a particular book.
    • Commit 2 Added loading more.
    • Commit 3 Users can update offers.
    • Commit 4 Book particular and offer components.
    • Commit 5 Logged users can upload offers and reviews.
  • πŸ“ Files with more participation:

    • File 1 Offer.service.ts
    • File 2 Book-particular.component.ts
    • File 3 Checkout.component.ts
    • File 4 Upload-offer.component.ts
    • File 5 Update-offer.component.ts
Markos Aguirre Elorza.
 - πŸ“‚ Completed tasks:

  - Everything regarding the user entity
  - Login and Register functionalities
  - Security (restrict access to pages)
  - Review update
  - Mailing service manteinance
Manuel Martin Alaez.
Alberto JimΓ©nez GΓ³mez.
  • πŸ“‚ Completed tasks:

    • Book general page
    • Search component with best pick, search bar and categories
    • Index
    • Carousel of recommended books
    • Video
  • πŸ“€ Most significant commits:

  • πŸ“ Files with more participation:

    • File 1 book-general.component.ts
    • File 2 book-general.component.html
    • File 3 search.component.html
    • File 4 search.component.ts
    • File 5 carousel.component.ts