How fenilkaneria/ipl-auction-assistant works
IPL Auction Assistant lets a user sign in or play as a guest, choose a franchise, and manage it in a live auction against nine bot teams. The WebSocket-driven server advances one opponent per user action, enforces auction rules, and returns state and events; the advisor combines player valuation, budget limits, and opportunity cost to guide bids. Major supporting capabilities include fixed auction ordering, squad and purse views, account verification, and resumable saved games. The README and sampled entry points support the main flow; unsampled module wiring is omitted where uncertain.
Main entry points: ws.py WebSocket handler · routes.py REST routes · recommend.py Advice policy · game.py Game setup
Components 22
Frontend experience
- App routes
frontend/src/App.jsx - Auth context
frontend/src/lib/auth.jsx - Team selection
frontend/src/pages/TeamSelect.jsx - Auction room
frontend/src/pages/AuctionRoom.jsx - Socket client
frontend/src/lib/useAuctionSocket.js - Auction views
frontend/src/components
Auction runtime
- WebSocket handler
backend/app/api/ws.py - Game setup
backend/app/api/game.py - Auction engine
backend/app/auction/engine.py - Bot bidders
backend/app/auction/bots.py - Queue ordering
backend/app/auction/ordering.py - Round definitions
backend/app/auction/round_order.py
Decision advisor
- Advice policy
backend/app/advisor/recommend.py - Player valuation
backend/app/advisor/valuation.py - Budget advice
backend/app/advisor/budget.py - Alternatives
backend/app/advisor/alternatives.py
Accounts and persistence
- REST routes
backend/app/api/routes.py - Session persistence
backend/app/api/persist.py - Database models
backend/app/models.py - Email transport
backend/app/email_service.py
Other components
- Player
- PostgreSQL
Connections 26
- Player → App routes: navigates
- App routes → Auth context: provides auth
- Auth context → REST routes: auth requests
- REST routes → Email transport: sends links
- Player → Team selection: chooses franchise
- Team selection → REST routes: starts game
- REST routes → Game setup: creates session
- Game setup → Queue ordering: builds queue
- Queue ordering → Round definitions: uses rounds
- Game setup → Auction engine: initializes auction
- Auction room → Socket client: opens session socket
- Socket client → WebSocket handler: sends actions
- WebSocket handler → Auction engine: advances auction
- WebSocket handler → Bot bidders: dispatches bot turns
- Bot bidders → Player valuation: uses price signal
- WebSocket handler → Advice policy: requests advice
- Advice policy → Player valuation: estimates value
- Advice policy → Budget advice: checks affordability
- Advice policy → Alternatives: weighs later options
- WebSocket handler → Session persistence: saves state
- REST routes → Session persistence: loads saved game
- Session persistence → Database models: maps records
- Database models → PostgreSQL: reads and writes
- WebSocket handler → Socket client: returns snapshots
- Auction room → Auction views: renders auction
- Auction views → Player: shows live status