{"id":20526748,"url":"https://github.com/syeo66/go-shufflify","last_synced_at":"2025-03-06T01:47:08.467Z","repository":{"id":248732672,"uuid":"828318646","full_name":"syeo66/go-shufflify","owner":"syeo66","description":"A go implementation of a new shuffle for Spotify.","archived":false,"fork":false,"pushed_at":"2025-01-18T09:39:23.000Z","size":155,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T13:53:41.999Z","etag":null,"topics":["golang","htmx","random","shuffle","spotify"],"latest_commit_sha":null,"homepage":"","language":"Go","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/syeo66.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-13T19:08:08.000Z","updated_at":"2025-01-18T09:38:24.000Z","dependencies_parsed_at":"2024-07-16T20:43:14.371Z","dependency_job_id":"1a87fa64-4a32-4464-9e3b-cbc4a405c126","html_url":"https://github.com/syeo66/go-shufflify","commit_stats":{"total_commits":77,"total_committers":1,"mean_commits":77.0,"dds":0.0,"last_synced_commit":"524d3a474e4b51d1bdf776ab6082c37a80d65592"},"previous_names":["syeo66/go-shufflify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syeo66%2Fgo-shufflify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syeo66%2Fgo-shufflify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syeo66%2Fgo-shufflify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syeo66%2Fgo-shufflify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syeo66","download_url":"https://codeload.github.com/syeo66/go-shufflify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242133435,"owners_count":20077096,"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":["golang","htmx","random","shuffle","spotify"],"created_at":"2024-11-15T23:15:43.076Z","updated_at":"2025-03-06T01:47:08.440Z","avatar_url":"https://github.com/syeo66.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Shufflify\n\n\"Go Shufflify\" is a web application that integrates with the Spotify API to provide a personalized music queue.\n\n## Features\n\n- **User Authentication**: Authenticate users via Spotify and manage sessions.\n- **Queue Management**: Automatically manages the music queue based on user preferences and active playlists.\n\n## Project Structure\n\n- `server.go`: Entry point for the application.\n- `types/`: Contains all the data structures used across the application.\n- `lib/`: Utility functions and common library code.\n- `data/`: Functions for interacting with the Spotify API and the database.\n- `routes/`: HTTP route handlers for various endpoints.\n\n## Getting Started\n\n### Prerequisites\n\n- [Go](https://golang.org/dl/) (1.22.5 or later)\n- Spotify Developer Account with Client ID and Client Secret\n\n### Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/yourusername/go-shufflify.git\ncd go-shufflify\n```\n\n2. Install the required Go packages:\n\n```bash\ngo mod tidy\n```\n\n3. Set up your environment variables:\n\nCreate a `.env` file in the root directory with the following content:\n\n```env\nSPOTIFY_CLIENT_ID=your_spotify_client_id\nSPOTIFY_CLIENT_SECRET=your_spotify_client_secret\nSESSION_KEY=your_session_key # A really (!) random key, use 'uuid' or anything else generating random strings\nPORT=3333\nDB_FILE=./shufflify.db\n```\n\n4. Start the application\n\n```bash\n./start_server.sh\n```\n\nThis will create the `shufflify.db` file and set up the necessary tables.\n\n### Running the Application\n\nStart the server:\n\n```bash\n./start_server.sh\n```\n\nOpen your browser and navigate to `http://localhost:3333/`.\n\n### Disallowing new users\nTo disallow new user signups, set `DiSALLOW_NEW_USERS` to `true` in the `.env` file.\n\n## Usage\n\n- **Login**: Navigate to `/login` and log in with your Spotify account.\n- **Queue Management**: The application will automatically manage your music queue based on your preferences when 'Shuffle' is enabled.\n\n## Known Issues\n\nCurrently the Spotify API returns always 20 items in the queue. If there are not 20 items it just repeats the same items until the 20 items are filled up. This makes it hard to determine the real amount of tracks in the queue. Thus the shuffle works best if you only start playing a track from a Single before Go Shufflify takes over.\n\nSee https://community.spotify.com/t5/Spotify-for-Developers/Spotify-Web-API-Queue-endpoint-needs-polish/td-p/5493505\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request or open an issue for any bugs or feature requests.\n\n1. Fork the repository\n2. Create a new branch (`git checkout -b feature-branch`)\n3. Make your changes\n4. Commit your changes (`git commit -am 'Add new feature'`)\n5. Push to the branch (`git push origin feature-branch`)\n6. Create a new Pull Request\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgements\n\n- [Spotify Web API](https://developer.spotify.com/documentation/web-api/)\n- [gorilla/sessions](https://github.com/gorilla/sessions)\n- [Mattn/go-sqlite3](https://github.com/mattn/go-sqlite3)\n\n---\n\nHappy shuffling! 🎶\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyeo66%2Fgo-shufflify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyeo66%2Fgo-shufflify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyeo66%2Fgo-shufflify/lists"}