app.pyis the primary Flask application entry point, with supporting modules in*.pyfiles at the repo root (e.g.,db.py,master_player.py).- Frontend assets live in
static/(JS, images) andless/(styles). HTML templates are intemplates/. - Tests are in
test/andtest_websocket.py; database schema files live indb_schema/. - Docs and operational notes are in
docs/,README.md, andQUEUEING.md.
docker compose up --buildstarts the full stack (Flask app + Redis + worker) for local development.pip install -r requirements.txtinstalls Python dependencies for non-Docker workflows.redis-serverruns the Redis backend needed by the queue and session state.python run.pystarts the Flask app locally on the configured port.pytestruns the test suite;toxruns tests in a managed env (legacypy27entry intox.ini).
- Python code uses 4-space indentation and prefers PEP 8 naming (snake_case functions/variables, CapWords classes).
- Keep module-level scripts in the repo root; place web assets in
static/and templates intemplates/. - Avoid adding new formatting or linting tools unless requested; keep changes consistent with existing style.
- Tests use
pytest. Name filestest_*.pyand keep test functions prefixed withtest_. - For websocket behavior, check
test_websocket.pyfor patterns and fixtures. - Run targeted tests first (e.g.,
pytest test/test_auth.py) before full runs.
- Recent commits use short, imperative subjects like “Fix …”, “Add …”, or “Document …”.
- Keep commits focused; update changelog or docs only when behavior changes.
- PRs should include: a clear summary, testing notes (
pytest,docker compose), and UI screenshots when frontend changes are visible.
- Copy
config.example.yamltolocal_config.yamlfor local overrides. - Store OAuth secrets only in local files; do not commit credentials.
- Reference
SECURITY.mdfor reporting and disclosure guidance.