{"id":25692582,"url":"https://github.com/greerpage/spotify-party","last_synced_at":"2025-04-24T05:15:45.384Z","repository":{"id":42805820,"uuid":"269856658","full_name":"GreerPage/spotify-party","owner":"GreerPage","description":"🎵 an app to sync spotify playback between users (written before spotify implemented this feature)","archived":false,"fork":false,"pushed_at":"2023-07-12T05:58:42.000Z","size":663,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T05:15:24.929Z","etag":null,"topics":["flask","javascript","music","python","react","reactjs","socket-io","socketio-server","spotify","spotify-api","sync-spotify-playback"],"latest_commit_sha":null,"homepage":"https://spotify.greerpage.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GreerPage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-06T03:35:22.000Z","updated_at":"2024-10-11T18:40:54.000Z","dependencies_parsed_at":"2023-01-24T10:15:17.461Z","dependency_job_id":null,"html_url":"https://github.com/GreerPage/spotify-party","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreerPage%2Fspotify-party","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreerPage%2Fspotify-party/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreerPage%2Fspotify-party/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreerPage%2Fspotify-party/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GreerPage","download_url":"https://codeload.github.com/GreerPage/spotify-party/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250566512,"owners_count":21451234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","javascript","music","python","react","reactjs","socket-io","socketio-server","spotify","spotify-api","sync-spotify-playback"],"created_at":"2025-02-24T23:09:28.792Z","updated_at":"2025-04-24T05:15:45.367Z","avatar_url":"https://github.com/GreerPage.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spotify Party ![logo](https://raw.githubusercontent.com/GreerPage/spotify-party/master/app/static/images/favicon.png) ![license](https://img.shields.io/github/license/GreerPage/spotify-party) ![contributors](https://img.shields.io/github/contributors/greerpage/spotify-party)\n\nAn app to sync Spotify playback between users.\n\n[https://spotify.greerpage.com](https://spotify.greerpage.com) - if people use it I will get a real domain name\n\n## About\nThis project uses the [Spotify Web API](https://developer.spotify.com/documentation/web-api/) to get and set user playback. It is using [Socket.IO](https://github.com/socketio/socket.io) to sync user playback. Essentially, the host sends requests to the Spotify API and when it detects a change, it sends the updated information to the Socket.IO server which disributes necessary information to the clients. \n\n## Web Stack\n- ### Frontend\n    - The frontend is primarily written in [React](https://reactjs.org/)\n    - React renders the necessary information for all of the pages\n    - The requests to the Spotify API are done in the frontend to prevent my server from getting heavily rate limited\n    - As a result, all data bettween the Socket.IO server and the [clients](clients) is done in JavaScript\n    - All React files can be found in `app/js/`, when they are compiled (see the build notes) they go to `app/static/js/build/`\n- ### Socket.IO Server\n    - The Socket.IO server is done in the Python library [flask_socketio](https://github.com/miguelgrinberg/Flask-SocketIO)\n    - The server handles all of the syncing between the host of the \"party\" and all of the members\n    - Essentially, when the host sends new information with the update method the server sends the new playback to all members of the corresponding party\n    - This code can be found in `app/app.py`\n- ### Web Server\n    - The web server is written in Python with [Flask](https://palletsprojects.com/p/flask/)\n    - The web server handles all of the routing and the rendering of HTML files and such\n    - The code for the web server can be found in `app/app.py` along with the Socket.IO server\n- ### JSON\n    - The \"database\" I am using is just simply JSON. This stores some Spotify user info and the current running parties\n    - This is stored in the `app/json/` directory which is created when you run the app\n\n## Building and Running\n- Prerequisites\n    - Python 3.7 or 3.8 (and pip)\n    - npm\n\n- Clone the repo and cd into it\n```bash\n$ git clone https://github.com/GreerPage/spotify-party.git\n$ cd spotify-party\n```\n- Install the dependencies\n```bash\n$ pip install -r requirements.txt\n$ cd app\n$ npm install\n```\n- Transpile the JSX to `app/static/js/build/` (you can keep this running in the background)\n```bash\n$ cd js\n$ npx babel --watch . --out-dir ../static/js/build --presets react-app/prod\n```\n- Make `app/spotify_access.py`\n```python\n# spotify client and secret id (https://developer.spotify.com/dashboard)\nclient_id = 'your_client_id'\nsecret = 'your_client_secret'\n```\n- Run Flask\n```bash\n$ cd ..\n$ python app.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreerpage%2Fspotify-party","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreerpage%2Fspotify-party","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreerpage%2Fspotify-party/lists"}