Music Together is a local-first shared music lobby. One host runs the backend server and other clients can connect to the same session, share a queue, sync playback, and maintain per-user loved tracks.
This repository is the finished V1 of the project.
- Shared queue and synchronized playback state
- Playback seek bar synced to the server timeline
- Per-user loved playlists
- Username on both host and connect flows
- Launcher memory for the last username and IP address used
- Lobby network discovery with local and external address hints
- Background UPnP / external IP discovery so the backend stays responsive
- Production build support through PyInstaller
- Python 3.13.x recommended and tested with this workspace
ffmpegavailable onPATHfor media playback and conversion work handled byyt-dlp- Windows desktop environment for the launcher
These are listed in requirements.txt:
yt-dlpfastapiuvicornwebsocketspydanticpsutilpywebviewpyinstallerminiupnpc
src/main.pylaunches the desktop app and starts the backendsrc/Python_API/Music_Together_API.pycontains the FastAPI backend and websocket protocolsrc/Python_API/json_loader.pyreads and writes the JSON databasesrc/Python_API/link_handler.pyhandles downloads and playlist managementsrc/web/index.htmlis the frontend entry pointsrc/web/app.jscontains the client logicsrc/web/index.csscontains the styling
The app stores its state in db.json.
It contains:
- downloaded music metadata
- playlists
- launcher settings such as the last username and IP address used
- Create and activate a virtual environment.
- Install the dependencies from
requirements.txt. - Make sure
ffmpegis installed and available onPATH. - Run:
python src/main.pyThe build script is build.bat.
- Set
BUILD_PRODUCTION=1to build the hidden-console production EXE. - Set
BUILD_PRODUCTION=0to build a debug EXE with a console.
The production build uses PyInstaller and bundles the backend Python package and frontend files into the executable.
This project uses the PolyForm Noncommercial License 1.0.0.
- noncommercial use is allowed
- commercial use is not allowed by default
- the required notice in
LICENSEmust be kept in redistributions
- The backend now avoids blocking the event loop for the lobby network discovery path.
- The launcher remembers the last username and IP locally and in the JSON database.
- Production startup output is kept ASCII-safe to avoid console encoding crashes.