Create shuffled versions of your Spotify playlists, refreshed every day
- Open the WebUI and you will be immediately redirected a Spotify authorization prompt
- This is used to give Daily Shuffle access to your spotify playlists, as well as to authenticate you with the WebUI so there's no need for a password.
- Once you are logged in, you can create a job with the
Add a New Jobpanel- First, if the list of sources is empty press
Searchto load your playlists, then select one from the dropdown - You can change the name of the playlist if you like, or change it later in the Spotify app
- Press
Saveand you'r new playlist will be created and shuffled for the first time! - Now every day all the songs in the source playlist will be copied to the destination in a random order, so if you add or remove songs from the source playlist that will be reflected after the next shuffle
- First, if the list of sources is empty press
- Once you have a job saved, you can edit or remove it with the
Edit Jobspanel- Select a job by it's destination playlist
- To change the source playlist click
Searchto load your playlists, pick a new one from the dropdown, then clickSave - To remove the job click
Remove Job- This will just stop the shuffle job, the destination playlist will remain with it's content (you can remove it from the Spotify app)
If you want the WebUI to be accessible from anything other than localhost you will need to access it through an https reverse proxy like Nginx with Let's Encrypt
- Create an app in the Spotify Developer Portal
- Check
Web APIunderWhich API/SDKs are you planning to use? - Make sure to add the url of your callback endpoint to the
Redirect URIs(this should be the same asDAILYSHUFFLE_REDIRECT_URL, and end in/callback)
- Download
compose.yaml - Create an
appdatafolder - Update the environment variables and appdata path in
compose.yaml - Run
docker compose up
- Create a
.envfile in the directory you will run Daily Shuffle from, using the following template and the client ID and secret from the Spotify Developer Portal
# Required
DAILYSHUFFLE_CLIENT_ID=changeme
DAILYSHUFFLE_CLIENT_SECRET=changeme
# Optional (these are the defaults)
DAILYSHUFFLE_HOSTNAME=127.0.0.1
DAILYSHUFFLE_PORT=8080
DAILYSHUFFLE_REDIRECT_URL=http://127.0.0.1:8080/callback
DAILYSHUFFLE_DB_PATH=dailyShuffle.sqlite # Relative to cwd when running- Download the correct release binary for your system from https://github.com/non-bin/dailyShuffle/releases/latest, put it in the same directory as the
.envfile, and run it.
This project is written using the Bun runtime, it will not work with another runtime like NodeJS.
Create a .env file as described in How to Run
bun i -d # Install dev dependencies, or:
bun i -p # Install production dependencies
bun dev # Start the dev serverIn the src directory:
- main.ts - The entry point, runs the WebUI server and schedules jobs. Calls helpers from
/lib/shuffler.ts - lib/
- types.ts - TypeScript object type definitions
- shuffler.ts - Wrappers around methods in other files, to give a consistent api to
/main.ts - api.ts - Interacts with the Spotify API for everything but authentication
- auth.ts - Handles authentication with the Spotify API
- db.ts - Stores and interacts with persistent data like users and jobs
- ui/
- index.html - Single page interface, using the Bulma CSS framework
- main.ts - Transpiled to js by
/main.ts
All you have to do it run bun release and all the weird stuff is handled. What it does is:
- Compile
src/ui/main.tstobuild/ui.js - Set
DAILYSHUFFLE_BUNDLED=trueso the bundle knows it's a bundle and should use the bundledui.js - Compile everything into 5 different architecture binaries in
dist/ - Fix the interpreter path in the elf header of the linux binaries (only needed when building on NixOS)
Create shuffled versions of your playlists, refreshed every day
Copyright (C) 2025 Alice Jacka
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.