routers
feat: Implement game state snapshotting and auto-saving, add bid plot number validation, and enable admin team disconnection.tests
feat: Implement initial auction backend with admin controls for managing auction state and plots, along with core infrastructure, models, and tests..dockerignore
feat: Introduce Docker support for the backend with a new Dockerfile, .dockerignore, and updated seed script to handle containerized CSV paths..gitignore
feat: Implement auction round management, previous plot navigation with refund logic, recent bids API, and enhance bid validation..python-version
feat: Implement initial auction backend with admin controls for managing auction state and plots, along with core infrastructure, models, and tests.auction.db
feat: Implement auction round management, previous plot navigation with refund logic, recent bids API, and enhance bid validation.database.py
feat: Add admin endpoint to force resell plots, refine Round 4 advancement logic, update database enum handling to be asynchronous, and remove CSV seeding.Dockerfile
feat: Add admin endpoint to force resell plots, refine Round 4 advancement logic, update database enum handling to be asynchronous, and remove CSV seeding.main.py
fix: socket fix in railwaymodels.py
feat: Implement game state snapshotting and auto-saving, add bid plot number validation, and enable admin team disconnection.pyproject.toml
contour detectionREADME.md
updated READMEseed.py
feat: Add admin endpoint to force resell plots, refine Round 4 advancement logic, update database enum handling to be asynchronous, and remove CSV seeding.seed.py.orig
feat: Add admin endpoint to force resell plots, refine Round 4 advancement logic, update database enum handling to be asynchronous, and remove CSV seeding.socket_manager.py
feat: Implement game state snapshotting and auto-saving, add bid plot number validation, and enable admin team disconnection.start.sh
feat: Add admin endpoint to force resell plots, refine Round 4 advancement logic, update database enum handling to be asynchronous, and remove CSV seeding.uv.lock
contour detectionAU-FEST 2026 Auction Backend
Real-time auction backend for AU-FEST 2026 land plot auction system. Built with FastAPI and Socket.IO for real-time bidding updates.
Tech Stack
- FastAPI - REST API framework
- Socket.IO - Real-time bidirectional communication
- SQLModel - Database ORM (supports PostgreSQL/SQLite)
- PostgreSQL - Primary database (via asyncpg)
- pytest - Testing framework
Features
- Team authentication with passcode
- Real-time bid updates via WebSocket
- Admin controls: start, pause, advance to next plot, reset auction
- Plot management with status tracking (pending, active, sold)
- Budget tracking for teams
- Connected client monitoring
Setup
Prerequisites
- Python 3.12+
- PostgreSQL database
Installation
uv syncEnvironment Variables
Create a .env file:
DATABASE_URL=postgresql+asyncpg://user:password@host:5432/auctionfest
SECRET_KEY=asdjkasd
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000Database Setup
# Seed database with sample data
uv run seed.pyRunning the Server
uv run uvicorn main:app --host 0.0.0.0 --port 8000 --reloadThe server runs on http://localhost:8000
API Endpoints
Authentication
POST /api/auth/login- Team login
Data
GET /api/data/plots- Get all plotsGET /api/data/teams- Get all teamsGET /api/data/team/{team_id}- Get specific teamGET /api/data/connected- Get connected client count
Admin
GET /api/admin/state- Get auction statePOST /api/admin/start- Start auctionPOST /api/admin/pause- Pause auctionPOST /api/admin/next- Move to next plotPOST /api/admin/reset- Reset auction
Socket.IO Events
Emitted Events
auction_state_update- Auction state changesbid_update- New bid placedauction_reset- Auction reset
Client Events (handled server-side)
join_room- Join auction roomplace_bid- Place a bid on current plot
Database Models
- Team - Bidding teams with budget and spent tracking
- Plot - Auction plots with area, price, and status
- Bid - Individual bids with amount and timestamp
- AuctionState - Global auction state (current plot, status)