A comprehensive web-based cricket auction management system built with Spring Boot, HTML/CSS/JavaScript, and MySQL. This system allows teams to register, manage players, conduct live auctions by category, and track budgets and player acquisitions.
- Team Management: Register teams with captains, total budgets, and optional player retentions
- Player Registration: Register players with roles (All-rounder Bowling/Batting, Batsman, Bowler, Wicket Keeper)
- Live Auction System: Conduct auctions organized by player categories
- Budget Tracking: Real-time budget tracking with remaining budget calculations
- Player Lifecycle Management: Players move between REGISTERED → SOLD/UNSOLD → RECYCLED states
- Player Release: Release players back to the auction pool with refunds
- Auction Statistics: Real-time tracking of registered, sold, and unsold players
- Initialize auction and select first category
- Randomly select a player from current category
- Teams place bids for the player
- Player is either:
- SOLD: Assigned to team and deducted from budget
- UNSOLD: Returned to registration pool for next cycle
- Process continues through all categories
- Unsold players are recycled back to REGISTERED state
- Cycle continues until all players are sold
- Backend: Spring Boot 4.0.1
- ORM: Spring Data JPA with Hibernate
- Database: MySQL 8.0+
- Frontend: HTML5, CSS3, JavaScript (Vanilla)
- Build Tool: Maven 3.8+
- Java Version: JDK 17+
- Additional Libraries:
- Lombok (for annotation processing)
- Apache POI (for Excel support - future enhancement)
SPL-2/
├── src/
│ ├── main/
│ │ ├── java/com/example/spl2/
│ │ │ ├── entity/ # JPA Entities
│ │ │ │ ├── Player.java
│ │ │ │ ├── Team.java
│ │ │ │ ├── Bid.java
│ │ │ │ └── AuctionState.java
│ │ │ ├── dto/ # Data Transfer Objects
│ │ │ │ ├── PlayerDTO.java
│ │ │ │ └── TeamDTO.java
│ │ │ ├── repository/ # Spring Data JPA Repositories
│ │ │ │ ├── PlayerRepository.java
│ │ │ │ ├── TeamRepository.java
│ │ │ │ ├── BidRepository.java
│ │ │ │ └── AuctionStateRepository.java
│ │ │ ├── service/ # Business Logic
│ │ │ │ ├── PlayerService.java
│ │ │ │ ├── TeamService.java
│ │ │ │ └── AuctionService.java
│ │ │ ├── controller/ # REST API Controllers
│ │ │ │ ├── PlayerController.java
│ │ │ │ ├── TeamController.java
│ │ │ │ ├── AuctionController.java
│ │ │ │ └── HomeController.java
│ │ │ ├── exception/ # Custom Exceptions
│ │ │ │ ├── PlayerNotFoundException.java
│ │ │ │ ├── TeamNotFoundException.java
│ │ │ │ ├── TeamAlreadyExistsException.java
│ │ │ │ └── GlobalExceptionHandler.java
│ │ │ └── Spl2Application.java
│ │ └── resources/
│ │ ├── application.properties
│ │ ├── static/
│ │ │ ├── index.html
│ │ │ ├── add-team.html
│ │ │ ├── team-management.html
│ │ │ ├── auction.html
│ │ │ ├── player-registration.html
│ │ │ ├── css/
│ │ │ │ └── style.css
│ │ │ └── js/
│ │ │ └── script.js
│ │ └── templates/
│ └── test/
│ └── java/com/example/spl2/
│ └── Spl2ApplicationTests.java
├── pom.xml
└── HELP.md
- JDK 17 or higher
- Maven 3.8+
- MySQL 8.0+
cd C:\Users\soumyadeep DEY\IdeaProjects\SPL-2- Create MySQL Database:
CREATE DATABASE spl_auction_db;
USE spl_auction_db;- Update Database Credentials in
src/main/resources/application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/spl_auction_db?useSSL=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=your_password.\mvnw clean package -DskipTestsOption A: Using Maven
.\mvnw spring-boot:runOption B: Using JAR
java -jar target/SPL-2-0.0.1-SNAPSHOT.jar- Home: http://localhost:8080/index.html
- Add Team: http://localhost:8080/add-team.html
- Manage Teams: http://localhost:8080/team-management.html
- Auction: http://localhost:8080/auction.html
- Register Player: http://localhost:8080/player-registration.html
POST /api/teams- Create new teamGET /api/teams- Get all teamsGET /api/teams/{id}- Get team by IDPUT /api/teams/{id}- Update teamDELETE /api/teams/{id}- Delete teamPOST /api/teams/{teamId}/release-player/{playerId}?releasePrice={price}- Release player
POST /api/players- Create new playerGET /api/players- Get all playersGET /api/players?status=REGISTERED- Get players by statusGET /api/players?status=REGISTERED&role=All-rounder%20Bowling- Filter by status and roleGET /api/players?teamId={id}- Get players by teamGET /api/players/{id}- Get player by IDPUT /api/players/{id}- Update playerDELETE /api/players/{id}- Delete player
POST /api/auction/initialize- Initialize auctionGET /api/auction/next-player- Get next player for auctionPOST /api/auction/sell-player/{playerId}?teamId={teamId}&soldPrice={price}- Sell playerPOST /api/auction/unsold-player/{playerId}- Mark player as unsoldPOST /api/auction/move-to-next-category- Move to next categoryGET /api/auction/status- Get auction statusGET /api/auction/categories- Get all auction categories
- Click "Add Team" in navigation
- Fill in team details:
- Team Name (required, unique)
- Captain Name (required)
- Total Budget (required, positive number)
- Player Retention 1 & 2 (optional with amounts)
- Click "Create Team"
- Teams are immediately added to the system
- Click "Register Player" in navigation
- Fill in player details:
- Player Name
- Age (18-50)
- Role (select from dropdown)
- Base Price
- Click "Register Player"
- Players appear in "Registered Players" table
- Filter by role or status using dropdowns
- Click "Manage Teams" in navigation
- View all teams with their budgets
- Click "View Details" on any team to see:
- Team composition
- Players acquired
- Spent amount
- Remaining budget
- Release players from team (will refund to team budget)
- Click "Auction" in navigation
- Click "Initialize Auction" to start
- Click "Next Player" to display a random player
- Teams place bids by:
- Selecting team from dropdown
- Entering bid amount
- Clicking "Place Bid"
- Alternatives:
- "Mark Unsold" - Player not sold, goes to unsold pool
- "Next Player" - Move to next player
- Monitor auction statistics in real-time
CREATE TABLE players (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
player_name VARCHAR(100) NOT NULL,
age INT NOT NULL,
role VARCHAR(50) NOT NULL,
base_price DOUBLE NOT NULL,
status VARCHAR(20) NOT NULL,
team_id BIGINT,
sold_price DOUBLE,
created_at TIMESTAMP,
updated_at TIMESTAMP,
FOREIGN KEY (team_id) REFERENCES teams(id)
);CREATE TABLE teams (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
team_name VARCHAR(100) UNIQUE NOT NULL,
captain VARCHAR(100) NOT NULL,
total_budget DOUBLE NOT NULL,
remaining_budget DOUBLE NOT NULL,
player_retention1 VARCHAR(100),
player_retention2 VARCHAR(100),
player_retention1_money DOUBLE,
player_retention2_money DOUBLE,
created_at TIMESTAMP,
updated_at TIMESTAMP
);CREATE TABLE bids (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
player_id BIGINT NOT NULL,
team_id BIGINT NOT NULL,
bid_amount DOUBLE NOT NULL,
is_winning BOOLEAN,
bid_time TIMESTAMP,
created_at TIMESTAMP,
FOREIGN KEY (player_id) REFERENCES players(id),
FOREIGN KEY (team_id) REFERENCES teams(id)
);CREATE TABLE auction_state (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
current_category VARCHAR(50) NOT NULL,
category_index INT NOT NULL,
current_player_id BIGINT,
auction_active BOOLEAN,
category_start_time TIMESTAMP,
updated_at TIMESTAMP,
FOREIGN KEY (current_player_id) REFERENCES players(id)
);The system supports the following player roles:
- All-rounder Bowling - Players good at batting and bowling
- All-rounder Batting - Players good at batting and bowling
- Only Batsman - Pure batsmen
- Only Bowler - Pure bowlers
- Wicket Keeper - Wicket keepers
The auction proceeds through these categories in order:
- All-rounder Bowling
- All-rounder Batting
- Only Batsman
- Only Bowler
- Wicket Keeper
After completing all categories, unsold players cycle back to REGISTERED status.
- Mandatory: No team can have negative remaining budget
- Retention Deduction: Retention amounts are automatically deducted from total budget
- Spent Tracking: System tracks total spent on player acquisitions
The application includes comprehensive error handling:
- 404 Not Found: Team or player not found
- 409 Conflict: Team already exists with same name
- 400 Bad Request: Invalid input data or insufficient budget
- 500 Internal Server Error: Unexpected server errors
All errors return JSON with:
{
"timestamp": "2026-01-01T00:00:00",
"status": 400,
"error": "Bad Request",
"message": "Error description"
}- Verify MySQL is running
- Check credentials in
application.properties - Ensure database
spl_auction_dbexists
# Change port in application.properties
server.port=8081# Clean and rebuild
.\mvnw clean compile- Ensure annotation processor paths are configured in pom.xml
- Rebuild project:
.\mvnw clean compile
- Excel Import: Import player data from Excel sheets
- CSV Export: Export auction results to CSV
- Real-time Notifications: WebSocket support for live bidding
- Admin Panel: Dashboard with analytics
- Authentication: User login and permissions
- Auction History: Track previous auctions
- Mobile Responsive: Improved mobile UI
- Multi-language Support: i18n support
For bug reports and feature requests, please contact the development team.
This project is proprietary and confidential.
For issues or questions, please refer to the documentation or contact support.
Version: 1.0.0
Last Updated: January 1, 2026
Build: SPL-2-0.0.1-SNAPSHOT