Skip to content

nokazn/ravyd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Ravyd

CI License: MIT

Ravyd is an open source Spotify web client. Spotify premium account is required to play entire tracks.

Setup

1. Regisiter your application to Spotify

You need to register your application and get client ID & client secret to use Spotify Web API and Spotify web playback SDK in Spotify for Developers page.

For detailed explanation, please check out App settings guide.

2. Set environment variables

# packages/server/.env.development

CLIENT_ORIGIN=https://localhost:3000 # Required
PORT=5000
REDIS_URL=localhost # Required
REDIS_PORT=6379
REDIS_PASSWORD=<Your redis password> # Required
SESSION_SECRET=<Your session secret> # Required
SPOTIFY_CLIENT_ID=<Your Spotify Client ID> # Required
SPOTIFY_CLIENT_SECRET=<Your Spotify Client Secret> # Required
LOCAL_HTTPS=true # set to true If you use https local server
# packages/client/.env.development

CLIENT_ORIGIN=https://localhost:3000 # Required
SERVER_ORIGIN=https://api.localhost:5000 # Required
PORT=3000
LOCAL_HTTPS=true # set to true If you use https local server

You can use https local development server by locally-trusted certificates. You need to set LOCAL_HTTPS to true, and generate localhost.pem and localhost-key.pem by tools like mkcert and put them at project root.

Please refer to .env for client and .env for server.

3. Install dependencies

This project is managed by lerna. You can install dependencies for all packages by lerna bootstrap.

$ yarn global add lerna # or npm i -g lerna

# install dependencies for all packages
$ lerna bootstrap

4. Start application

This project uses Redis for session store. You can launch Redis by Docker.

# launch Redis
$ docker-compose up -d redis
# start development server at localhost:5000
lerna run dev --scope @ravyd/server --stream
# or start development server in Docker container
docker-compose up -d client

# start development server for client at localhost:3000
lerna run dev --scope @ravyd/client --stream
# or start development server in Docker container
docker-compose up -d server

If you want to launch client/server by docker-compose, you need to set environment variables in .env at project root. Please refer to .env.sample.

# build for production and launch server
$ lerna run build --scope @ravyd/server
$ lerna run start --scope @ravyd/server

# build for production and launch client
$ lerna run build --scope @ravyd/client
$ lerna run start --scope @ravyd/client

Scripts

# ESLint (fix option)
$ yarn lint
$ yarn lint:fix

# Stylelint (fix option)
$ yarn stylelint
$ yarn stylelint:fix

# Run vue type checks
$ yarn vtc

# Type checks
$ yarn tsc

Roadmap

  • Play albums, artists, playlists & podcasts
  • Create/Edit playlists
  • Follow artists/users
  • Spotify connect support
  • Detailed search
  • Synchronously playing tracks with other listeners
  • i18n

License

MIT