Skip to content

VassTs/auction-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web-Based Auction Application with a Matrix Factorization Recommendation Engine

Overview

The application follows a web architecture with a React + Vite frontend and a Java Spring Boot backend, implementing RESTful APIs with JWT authentication and SSL/TLS security. It enables users to participate in online auctions through distinct roles. Key features of the application include real-time bidding, search capabilities, a messaging system, and a matrix factorization-based recommendation engine.

Detailed description

User Roles & Endpoints

The application distinguishes four user roles:

  • Visitor – can browse active auctions and search (no login required).
  • Bidder – can bid on auctions, view recommendations, and manage messages.
  • Seller – can create, edit, publish, and delete auctions, as well as communicate with bidders.
  • Admin – can approve new user registrations and trigger the recommendation model update. Each role has a dedicated set of REST endpoints (authentication, admin, seller, bidder, visitor, messaging, and recommendations). All protected endpoints require a valid JWT token in the Authorization header.

Database

The system uses a MySQL database with tables representing users, items (auctions), bids, categories, images, messages, ratings (for the recommendation engine), and precomputed recommendations. Relationships are carefully mapped (One‑to‑Many, Many‑to‑Many, etc.) to maintain data integrity.

Security

  • Transport Layer Security: The backend API runs on https://localhost:8443 using a self‑signed SSL certificate. All data in transit is encrypted.
  • Application Layer Security: Spring Security manages authentication and authorization.

Matrix Factorization Recommendation Engine

We implement a matrix factorization approach to generate personalized recommendations for bidders. User–auction interactions (such as views and wins) are represented as a rating matrix, which is factorized into latent user and item feature vectors. By learning these latent representations, the system can predict unseen preferences and recommend up to five relevant auctions per user. The model is trained periodically using historical interaction data, ensuring that recommendations remain up to date and computationally efficient at query time.

For a detailed explanation of the system architecture, API endpoints, database design, and implementation choices, please refer to the report.pdf included in this repository.

Setup & Run Guide

Prerequisites

  • Java 17+
  • Maven 3.6+
  • MySQL 8.0+ (tested with 8.0.43 on Ubuntu 22.04)
  • Node.js 20.19.0+

Frontend Setup

cd frontend
npm install
npm install leaflet react-leaflet
npm run dev

Backend Setup

Database Setup

Linux

mysql -u <your_username> -p
CREATE DATABASE auction_db;
EXIT;
mysql -u <your_username> -p -D auction_db < auction_db.sql

Windows
Use MySQL Workbench to import auction_db.sql.

Configure Application Properties

Edit: backend/src/main/resources/application.properties

spring.datasource.username=<your_mysql_username>
spring.datasource.password=<your_mysql_password>

Build & Run Backend

cd backend
mvn clean install
mvn spring-boot:run

Run the Application

  1. Open backend (accept SSL warning): https://localhost:8443/
  2. Open frontend: http://localhost:5173/

Test Accounts

Role Username Password
Admin admin admin!@#
Seller coral asdfasdf
Bidder bethany asdfasdf

Sample images for easier interaction with the application are available in the requests-images folder.

License

This project is licensed under the MIT License. See LICENSE for details.

About

🏷️ React + Spring Boot auction platform featuring REST APIs, JWT authentication, real-time bidding, and personalized recommendations using matrix factorization.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors