A simple, real-time IPL-style cricket player auction system for university tournaments. Run it on your laptop and let 4 teams bid live from their phones/laptops!
- Real-time bidding via WebSockets โ all teams see bids instantly
- 4 team logins with password protection
- Admin/Auctioneer controls โ next player, sold, unsold
- Player pools โ Marquee, Batsman, Bowler, All-Rounder
- Budget tracking โ auto-deducted when player is sold
- Squad management โ see each team's purchased players
- SQLite database โ no server setup needed
- Public URL โ share via Cloudflare Tunnel (free, secure HTTPS)
- Single file deployment โ one Python file, one HTML file
git clone https://github.com/yourusername/cricket-auction.git
cd cricket-auction
chmod +x install_and_run.sh
./install_and_run.shThat's it! The script will:
- Create a Python virtual environment
- Install dependencies
- Download Cloudflare Tunnel (for public URL)
- Start the server
- Display the public URL to share with teams
# Clone the repo
git clone https://github.com/yourusername/cricket-auction.git
cd cricket-auction
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the server
python main.py| Role | Username | Password |
|---|---|---|
| ๐ด Royal Strikers | team1 |
strike1 |
| ๐ต Thunder Kings | team2 |
thunder2 |
| ๐ข Super Chargers | team3 |
charge3 |
| ๐ก Fire Eagles | team4 |
eagle4 |
| ๐ Admin (Auctioneer) | admin |
admin123 |
โ ๏ธ Change these passwords inmain.pybefore your actual auction!
Players are organized into 4 pools for structured bidding:
| Pool | Icon | Description |
|---|---|---|
| Marquee | โญ | Top premium players (highest base prices) |
| Batsman | ๐ | Specialist batsmen |
| Bowler | ๐ฏ | Specialist bowlers |
| All-Rounder | ๐ช | All-rounders and Wicket-keepers |
Admin can switch between pools during the auction.
- Open the app and login as
admin - Select a pool (start with Marquee)
- Click "Next Player" to put a player on the block
- Wait for teams to bid
- Click "SOLD" when bidding stops, or "Unsold" if no bids
- Repeat until all players are auctioned
- Open the shared URL on your phone/laptop
- Login with your team credentials
- When a player is on the block, click "BID +50" to place a bid
- Watch your budget and squad in real-time
If your university network blocks tunnels:
- Turn on your phone's mobile hotspot
- Connect your laptop + all team devices to the hotspot
- Run the server and share your local IP:
http://192.168.x.x:8000
The install script automatically sets up a secure HTTPS tunnel:
https://random-words.trycloudflare.com
If everyone is on the same network:
hostname -I # Get your IP
# Share: http://YOUR_IP:8000cricket-auction/
โโโ install_and_run.sh # One-click setup script
โโโ main.py # FastAPI backend (single file)
โโโ players.csv # Player data (60 players)
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ .gitignore # Git ignore rules
โโโ static/
โโโ index.html # Frontend (single file)
Edit main.py to customize:
# Team settings
TEAMS = {
"team1": {"name": "Royal Strikers", "password": "strike1", "color": "#e63946"},
"team2": {"name": "Thunder Kings", "password": "thunder2", "color": "#457b9d"},
# ... add more teams
}
# Budget and bidding
TOTAL_BUDGET = 5000 # Each team's starting budget
BID_INCREMENT = 50 # Minimum bid increment
# Admin password
ADMIN_PASSWORD = "admin123"Edit players.csv to add your own players:
name,role,base_price,pool
John Doe,Batsman,200,Marquee
Jane Smith,Bowler,150,BowlerPools: Marquee, Batsman, Bowler, All-Rounder
Roles: Batsman, Bowler, All-Rounder, Wicket-Keeper
pkill -f "python3 main.py"rm auction.db*
python main.py # Will recreate from players.csv- Try mobile hotspot instead
- Check if your network blocks outbound connections
- Backend: Python 3.8+ with FastAPI
- Frontend: Vanilla HTML/CSS/JavaScript
- Database: SQLite (file-based, no setup)
- Real-time: WebSockets
- Tunnel: Cloudflare Tunnel (cloudflared)
MIT License - feel free to use for your university tournaments!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Built for university cricket tournaments
- Inspired by IPL auction format
- Thanks to FastAPI and Cloudflare for awesome free tools
Made with โค๏ธ for cricket lovers