Developer Setup
This guide covers everything needed to run the Player Wellness App locally for development and testing.
Prerequisites
| Tool | Version | Notes |
|---|---|---|
| Python | 3.11+ | |
| PostgreSQL | 16+ | Via Homebrew on macOS |
| Git | Any recent | |
| VS Code | Any recent | Recommended editor |
1. Clone the repository
git clone https://github.com/your-username/player_wellness_registration.git
cd player_wellness_registration
2. Create a virtual environment
3. Install dependencies
For documentation development, install mkdocs separately:
4. Set up PostgreSQL
Install via Homebrew on macOS:
Create the database:
5. Configure secrets
Create the Streamlit secrets file:
Add the following to .streamlit/secrets.toml:
Warning
Never commit secrets.toml to version control. Verify it is listed in .gitignore before pushing.
6. Seed the players table
The app requires at least one player record before the selectbox will populate. On first run, the app creates all tables automatically. Then seed a test player using a database client or psql:
INSERT INTO players (player_id, player_first_name, player_last_name, team)
VALUES (99, 'Test', 'Player', 'U21');
7. Run the app
The app will be available at http://localhost:8501.
8. Preview the documentation
The docs site will be available at http://localhost:8000 with live reload on save.
VS Code extensions
The following extensions are recommended:
- Python (Microsoft) — linting, formatting, IntelliSense
- SQLTools — database browser and query runner
- SQLTools PostgreSQL Driver — connects SQLTools to PostgreSQL