diff --git a/QUICKSTART.md b/QUICKSTART.md index 2457455..d39046f 100644 --- a/QUICKSTART.md +++ b/QUICKSTART.md @@ -1,6 +1,6 @@ # Paper Dynasty - Quick Start Guide -**Last Updated**: 2025-10-21 +**Last Updated**: 2025-11-04 ## Prerequisites @@ -22,12 +22,11 @@ cd /mnt/NV2/Development/strat-gameplay-webapp ```bash cd backend -# Create virtual environment -python3 -m venv venv -source venv/bin/activate +# Install UV (modern Python package manager) +curl -LsSf https://astral.sh/uv/install.sh | sh # Install dependencies -pip install -r requirements-dev.txt +uv sync # Configure environment cp .env.example .env @@ -37,7 +36,7 @@ cp .env.example .env docker compose up -d # Verify setup -python -m app.main +uv run python -m app.main # Server should start at http://localhost:8000 ``` @@ -69,8 +68,8 @@ docker compose up -d # Terminal 2: Run Backend cd backend -source venv/bin/activate -python -m app.main +uv run python -m app.main +# Or: source .venv/bin/activate && python -m app.main ``` Backend will be available at: @@ -99,14 +98,13 @@ npm run dev ```bash # Run tests cd backend -source venv/bin/activate -pytest tests/ -v +uv run pytest tests/ -v # Format code -black app/ tests/ +uv run black app/ tests/ # Type checking -mypy app/ +uv run mypy app/ # Check logs tail -f backend/logs/app_*.log @@ -142,15 +140,18 @@ psql postgresql://paperdynasty:PASSWORD@10.10.0.42:5432/paperdynasty_dev Use `docker compose` (with space) not `docker-compose` ### "greenlet library required" +This should not happen with UV. If it does, run: ```bash -pip install greenlet +uv sync # Reinstall all dependencies ``` ### Import errors / Module not found -Ensure virtual environment is activated: +Ensure dependencies are installed: ```bash -source venv/bin/activate -which python # Should show path to venv/bin/python +uv sync # Install/sync dependencies +# Or check virtual environment +source .venv/bin/activate +which python # Should show path to .venv/bin/python ``` ### Database connection errors diff --git a/README.md b/README.md index e633df6..c9b8260 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ strat-gameplay-webapp/ 3. **Start Backend** (in another terminal) ```bash cd backend - source venv/bin/activate # or 'venv\Scripts\activate' on Windows - python -m app.main + uv run python -m app.main + # Or manually activate: source .venv/bin/activate && python -m app.main ``` Backend will be available at http://localhost:8000 @@ -130,26 +130,26 @@ strat-gameplay-webapp/ ```bash cd backend -# Activate virtual environment -source venv/bin/activate +# Install UV (one-time setup) +curl -LsSf https://astral.sh/uv/install.sh | sh # Install dependencies -pip install -r requirements-dev.txt +uv sync # Run server -python -m app.main +uv run python -m app.main # Run tests -pytest tests/ -v +uv run pytest tests/ -v # Code formatting -black app/ tests/ +uv run black app/ tests/ # Linting -flake8 app/ tests/ +uv run flake8 app/ tests/ # Type checking -mypy app/ +uv run mypy app/ ``` ### Frontend @@ -265,7 +265,8 @@ open http://localhost:8000/api/health ## Tech Stack ### Backend -- **Framework**: FastAPI (Python 3.11+) +- **Framework**: FastAPI (Python 3.13+) +- **Package Manager**: UV (modern Python package management) - **WebSocket**: Socket.io - **Database**: PostgreSQL 14+ with SQLAlchemy - **Cache**: Redis 7