You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The User entity represents a person registered in the auction application. It includes attributes such as ID, name, visible name, email, description, encoded password, profile picture, postal code, reputation, and active status.
Product Entity
The Product entity represents an item listed for auction in the system. It includes attributes such as ID, name, description, initial value, seller ID, start time, end time, status, and image.
Offer Entity
The offer entity represents a user's offer for a product in an auction. It includes attributes such as ID, cost, time, product ID, and user ID.
Transaction Entity
The transaction entity represents the final transaction in which a user buys a product from a seller in an auction. It includes attributes such as ID, cost, buyer ID, product ID, and seller ID.
Rating Entity
The rating entity represents the ratings given to sellers for their auctioned products. It includes attributes such as ID, score, product ID, and seller ID.
User Roles & Permissions
Unregistered User
Can:
Have access to auctions that are still ongoing.
View auctioned products.
Browse user profiles.
View a product's bidding history.
Registered User
Can:
Have access to auctions that are still ongoing.
Access their personal data.
View their listed products.
List products for auction.
Place bids on auctions.
Complete transactions as a buyer or seller.
View the products they have bid on and won.
Rate other users.
Administrator
Can:
Have access to all listed products.
Ban or unban users and products.
Images
Users can upload images for the products they list.
Users may have their own profile picture.
Charts
Users can view line charts displaying the bidding history for each listed product.
Complementary Technology
The web application was supposed to use Auth0 for authentication and authorization management. However, due to issues with the implementation it was decided to take the safer route and implement the map API that shows a postal code area.
Advanced Algorithm or Query
When viewing listed products, they will be displayed in order based on the rating of the seller.
Pages
Featured Products (Index)
All users, including unregistered ones, can browse available products. These products are displayed in order based on the ratings of the sellers. Users can navigate to individual product pages to view more details.
Sign-Up Page
Only available to unregistered users. This page allows them to provide the necessary information to create an account.
Log-In Page
Accessible to all users. It allows registered users to enter their credentials and access the application.
Account Details Page
Accessible to registered users. Users can:
Edit their profile information.
View a list of products they have posted.
Access a personal section displaying auctions where they have placed the highest bid.
When viewing another user's profile, these personal sections will not be visible.
When an Admin accesses another user's profile they can ban the user.
Your Winning Bids
This page is available to registered users. It displays a list of auctions where the user placed the highest bid, meaning they have won the item.
Your Products
Available to registered users. It shows a list of auctions created by the user, whether they are ongoing or finished.
Edit Profile
Users can access this page to update their personal details such as their description/Bio, profile picture, and other relevant information. It is an extension to the regular Account Details Page
New Auction Page
Only available to registered users. This page allows them to create new product listings for auction.
Product Page
All users can view:
The product's title, initial price, description, and current status (ongoing or finished).
The seller’s profile page.
A bidding history line chart.
An approximate location of the product using the postal code.
Registered users can place bids on the product.
Admins have the ability to remove product listings to ensure compliance with platform rules.
Navigation diagram
As a summary we show the updated navigation diagram.
Instructions to Run
Required Technologies / Applications
VSCode (or any preferred IDE like IntelliJ IDEA or Eclipse)
Java 21
Maven 4.0.0 or higher
Spring Boot 3.4.3
MySQL Installer 8.0.33 or higher
MySQL Workbench 8.0.33 or higher
Docker
Docker Compose
Angular Lenguage Service extensions (Available in VSCode)
Steps
Download the ZIP from this GitHub repository
Extract it
Run it with your IDE
Configure the MySQL database with the password Password0] (specified in application.properties)
Run the application
Open your browser
Go to
https://localhost:8443
If you encounter security warnings, select Advanced options and then Proceed to the website
Steps with Docker
Install Docker
Install Docker Compose
Run Docker
Clone or download the repository
Go to "backend" folder
Execute Pujahoy with Docker Compose: "docker compose up"
Open your browser
Go to
https://localhost:8443
If you encounter security warnings, select Advanced options and then Proceed to the website
Steps for building Docker Image
Install Docker
Run Docker
Clone or download the repository
Go to "backend" folder
Execute:
chmod +x create_image.sh && ./create_image.sh
chmod +x publish_image.sh && ./publish_image.sh
(NOTE:There's a chance you might encounter an unauthorized error. If this happens, run the "docker login" command and follow the process to log in, as Docker has rate limits for anonymous users. After logging in, simply rerun the above code.)
Steps with Virtual Machine
It is required to be connected to URJC network to be able to access VM
In this commit full functionality of edit profile was added. Specifically to try new things, the form that sends the data to be replaced in the DB is created dynamically with JS.
In this commit functionality for register was finished. Backend checks for certain details when registering such as Postal Code. Further checks to these fields were added on commit 1º
In this commit functionality for the Map that locates a seller was implemented. Notice no GoogleMaps was used since a bank account was needed. So we decided to take the free approach. How it works is: Map is loaded with OpenStreetMap (Leaflet.js), the location is obtained with an API, then location is used to pin point in the map
In this commit as stated before we tryed to use as external technology the Auth0 login workflow, but due to implementing issues and lack of time idea was depleted and we reversed to an easier approach.
In this commit logout methods and a first instance of a user session was created. Later on this instance was changed into a more usefull use. Since only 'Authenticated' was sent when a user was logged in accross all views.
I was mostly in charge of security. As stated before all of my time during this weeks was invested into implementing Auth0 but due to a big difficulty when implementing it, because of outdated documentation and lack of information we decided to take the path explained during the theorical classes
The login html was made by me too. Interesting to highlight register and login go throw the same view and are dynamicaly swapped between them with JS. Backend checks are done to secure reliable data.
Although i wasnt in charge of creating the profile view, i had to add edit a profile. As a challenge i decided to use the same view to be able to edit a user with a button. A hidden form is created dynamically and data is sent in it. Backend checks are done to secure reliable data.
This is my largest commit so far. Due to significant changes in the codebase since my previous commit, I had to restructure all my work to ensure compatibility with the updated codebase.
I designed and implemented the HTML structure for the auction creation page, ensuring support for image uploads so that they can later be displayed on product pages.
Display certain parts using Mustache based on the user type: unregistered user, registered user accessing their own profile, registered user accessing the seller's profile, and administrator.
I complete and fix all product functionalities, enable bidding by entering the desired amount, display more product information, and correctly add navigation to error pages.
Added implementation and full funtionality on this file as part of the security configuration of the PujaHoy web application. It is responsible for integrating CSRF protection into the application.
Set up roles, role-specific URLs, login functionality, and cookies to maintain the session for one day. It's where the security for HD database was implemented.
Added GET methods for retrieving all products and specific products, as well as GET, POST, and PUT methods for product images, including their respective error responses.
This file defines a MapStruct mapper interface TransactionMapper for converting between Transaction entities and their corresponding TransactionDTO objects.
This file defines a Spring service TransactionService to manage transactions, including finding, saving, deleting, and creating transactions, as well as converting them to DTOs using the TransactionMapper.
Comments about the functionality of the methods added to this file which defines a Spring MVC controller to manage product-related operations in the web application.
I added the visual map from Google Maps. Despite beeing just a few lines, job took a long time since old map used in the spring app was not working as intended and had to search for alternatives.
I added the getProductIndex function which fetches a paginated list of all public products from the backend for a given page number, handling any potential errors.
This is an Angular component for displaying and paginating product lists based on the route and user session where I worked on the indexProduct, loadMoreProducts and ngOnInit methods