Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TreasureBid

Full-stack online auction platform with anti-sniping, Buy It Now transactions, and collaborative filtering recommendations
Built with PHP · MySQL · JavaScript · Bootstrap

Overview

TreasureBid is a fully functional online auction system supporting real-time bidding, seller dashboards, buyer recommendations, and transactional purchases. The database schema is normalized to Third Normal Form (3NF) and the system implements several advanced features beyond standard auction functionality.

Built as a UCL MSc Financial Technology coursework project (COMP0178 Database Fundamentals, December 2025).

Features

Core

  • User registration and authentication with role-based access (Buyer, Seller, Admin)
  • Auction creation with image upload, reserve price, and Buy It Now option
  • Real-time bidding with live countdown timer
  • Search and browse with keyword, category, and price filters
  • Seller feedback and ratings system

Advanced

  • Anti-sniping protection — auction end time automatically extends by 5 minutes when a bid is placed in the final window, preventing last-second sniping
  • Transactional Buy It Now — atomic MySQL transaction ensures no race conditions during instant purchase
  • Collaborative filtering recommendations — triple self-join on bid history identifies similar users and surfaces relevant active auctions
  • Watchlist — users track auctions and receive outbid notifications
  • Seller analytics dashboard — revenue aggregation across closed auctions

Database Design

Schema normalized to 3NF across 7 tables:

Table Description
users Buyers, Sellers, Admins with role discriminator
item Static item data (title, description, category)
auctions Dynamic auction data (price, end time, status)
bids Full bid history for analytics and recommendations
watchlist Junction table resolving user-auction M:N relationship
notifications Outbid and watchlist alerts
ratings Post-auction buyer-to-seller feedback

Key design decisions:

  • Item and Auction data separated to avoid transitive dependencies
  • Full bid history retained (not just current price) to support collaborative filtering
  • Surrogate keys throughout to simplify complex JOIN operations

Tech Stack

  • Backend — PHP 8, MySQL 8
  • Frontend — HTML/CSS, JavaScript, Bootstrap 4
  • Database — MySQL with prepared statements, transactions, aggregate queries
  • Key SQL — multi-table JOINs, COALESCE, GROUP BY, subqueries, triple self-join for recommendation engine

Project Structure

├── index.php # Homepage with search and listings

├── listing.php # Auction detail page with bidding

├── seller_home.php # Seller dashboard and analytics

├── register.php # User registration

├── login_result.php # Authentication handler

├── create_auction_result.php # Auction creation handler

├── watchlist.php # User watchlist

├── watchlist_funcs.php # Watchlist helper functions

├── mybids.php # Buyer bid history

├── db_connect.php # Database connection (uses env vars)

├── custom.css # Custom styles

└── uploads/ # Uploaded auction images

Setup

  1. Clone the repository
  2. Create a MySQL database named auction
  3. Import the schema: mysql -u root -p auction < schema.sql
  4. Configure environment variables: DB_HOST=localhost

DB_USER=your_username

DB_PASS=your_password

DB_NAME=auction 5. Serve with a local PHP server or XAMPP/MAMP

Academic Context

Developed for COMP0178 Database Fundamentals, MSc Financial Technology,
University College London (December 2025).

About

Full-stack online auction platform with anti-sniping, Buy It Now transactions, and collaborative filtering recommendations | PHP, MySQL, JavaScript

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages