Thanks for your interest in improving TrackFlow! This guide covers how to set up a development environment and submit changes.
git clone https://github.com/murodovdev/Spotify.git trackflow
cd trackflow
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # then set BOT_TOKEN
python -m bot.mainYou'll need FFmpeg on your PATH and a Telegram bot token
from @BotFather. Spotify credentials are optional β the
bot runs in embed mode without them.
The application lives in the bot/ package:
handlers/β Telegram update handlers (one router per feature area).services/β core logic (Spotify client, search, downloads, recognition, β¦).db/β SQLite data access.admin/β admin control panel.web/β OAuth callback and health endpoint.
See docs/ARCHITECTURE.md for a walkthrough.
-
Target Python 3.12 and keep the code fully
asyncwhere I/O is involved. -
Follow the existing style; Ruff config lives in
pyproject.toml. Before opening a PR:pip install ruff ruff check . ruff format .
-
Match the conventions of surrounding code (naming, structure, comment density).
-
Keep handlers thin; put reusable logic in
services/.
- Fork the repository and create a feature branch.
- Keep changes focused β one logical change per PR.
- Describe what changed and why in the PR description.
- Make sure the bot starts (
python -m bot.main) andruff check .passes.
When filing a bug, include:
- What you did and what you expected to happen.
- Relevant log output (redact tokens and cookies).
- Your environment (local vs. Railway, Python version).
Please never paste secrets β bot tokens, Spotify secrets, or cookies β into issues or pull requests.