Skip to content

eatdeliciousbanana/spotify-jukebox

Repository files navigation

Spotify Jukebox

A jukebox application using Spotify Web API.

img1

Built With

Requirements

  • PHP 8.2 or later.
  • One Spotify Premium Account

Installation

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.

Usage

Administrator

After login, go to Spotify Login page and login to spotify (Premium account required).

img2

Go to Player page, turn on the device and start playback.

img3

General Users

Go to Search page and find track you want to request.

img4

Select a track and make a request.

img5

License

Distributed under the MIT License. See LICENSE.md for more information.