Backend enhancements for real-time decision workflow: **New Features**: - decision_required event emission when game starts and after each decision - Quick-create endpoint (/games/quick-create) for rapid testing with pre-configured lineups - WebSocket connection manager integration in GameEngine **Changes**: - game_engine.py: Added _emit_decision_required() method and set_connection_manager() - game_engine.py: Emit decision_required on game start with 5-minute timeout - games.py: New /quick-create endpoint with Team 35 vs Team 38 lineups - main.py: Wire connection manager to game_engine singleton - state_manager.py: Enhanced state management for decision phases - play_resolver.py: Improved play resolution logic - handlers.py: Updated WebSocket handlers for new workflow - backend/CLAUDE.md: Added WebSocket protocol spec reference **Why**: Eliminates polling - frontend now gets real-time notification when decisions are needed. Quick-create saves 2 minutes of lineup setup during each test iteration. **Testing**: - Manual testing with terminal client - WebSocket event flow verified with live frontend 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .claude | ||
| .git-hooks | ||
| alembic/versions | ||
| app | ||
| scripts | ||
| terminal_client | ||
| tests | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .python-version | ||
| CLAUDE.md | ||
| clean_test_data.py | ||
| docker-compose.yml | ||
| Dockerfile | ||
| mypy.ini | ||
| pyproject.toml | ||
| pyrightconfig.json | ||
| pytest.ini | ||
| README.md | ||
| requirements-dev.txt | ||
| requirements.txt | ||
| TEST_COVERAGE_SUMMARY.md | ||
| test_db_playground.py | ||
| test_pd_api_live.py | ||
| test_pd_api_mock.py | ||
| test_redis_cache.py | ||
| uv.lock | ||
Paper Dynasty Backend
FastAPI-based real-time baseball game engine with WebSocket support.
Quick Start
# Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync
# Run server
uv run python -m app.main
Documentation
See CLAUDE.md for full documentation.