A jukebox application using Spotify Web API.
- PHP 8.2 or later.
- One Spotify Premium Account
Clone the repo locally:
git clone https://github.com/eatdeliciousbanana/spotify-jukebox.git
cd spotify-jukebox
Setup configuration:
cp .env.example .env
Enter the following items in .env
- database config
- Google OAuth credentials (Create a new project on Google Console)
- Spotify app credentials (Create a new app at Spotify’s developer site)
- Jukebox administrator's e-mail address (Must be a Gmail address)
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=sail
DB_PASSWORD=password
GOOGLE_KEY=""
GOOGLE_SECRET=""
GOOGLE_REDIRECT_URI="http://localhost/auth/google/callback"
SPOTIFY_CLIENT_ID=""
SPOTIFY_CLIENT_SECRET=""
SPOTIFY_REDIRECT_URI="http://localhost/auth/spotify/callback"
JUKEBOX_ADMIN_MAIL=""
Install PHP dependencies:
composer install
Start container:
./vendor/bin/sail up -d
Install PHP dependencies in container and restart:
./vendor/bin/sail exec laravel.test composer install
./vendor/bin/sail restart
Generate application key:
./vendor/bin/sail artisan key:generate
Run database migrations:
./vendor/bin/sail artisan migrate
Install NPM dependencies:
./vendor/bin/sail exec laravel.test npm install
Build assets:
./vendor/bin/sail npm run dev
You're ready to go! Visit http://localhost in your browser, and login as administrator.
After login, go to Spotify Login page and login to spotify (Premium account required).
Go to Player page, turn on the device and start playback.
Go to Search page and find track you want to request.
Select a track and make a request.
Distributed under the MIT License. See LICENSE.md
for more information.