Giter Club home page Giter Club logo

gatefold's Introduction

Gatefold - A Display For Raspotify

Display the currently playing Spotify track. Made for the Raspberry Pi.

Features

  • ✅ Displays currently playing track
  • ✅ Suitable for communal areas where lots of different people connect to Raspotify daily
  • ✅ QR code takes you directly to the song on the Spotify app
  • ✅ No login required

Why Gatefold?

Gatefold is for individuals, organizations, or households with communal areas. Other solutions like Gatefold exist, but require each user to authorize with their Spotify account. With Gatefold it doesn't matter who's connected - no login required!


Installation

Part 1 - Web App Setup

1. Generate Spotify client credentials

Login to the Spotify Dashboard and hit 'Create app'. Call the app 'Gatefold', give it some description, and set the 'Redirect URI' to example.com (we don't need this but it's a required field).

Leave the other settings blank. Click 'Settings' on the app's page and make a note of the 'Client ID' and 'Client secret'.

2. Fork this repo

Click the 'Fork' button at the top of this page to copy this repo to your account.

3. Create a site on Netlify

Create an account on Netlify if you don't already have one.

Login, go to the 'Team overview' tab, select 'Add new site' > 'Import an existing project' > 'Deploy with GitHub'. If this is your first Netlify site, it'll ask you to authorise your GitHub account. Once authorised, select your forked Gatefold project.

Set the below settings (leave other fields as blank/whatever Netlify sets):

  • Base directory: webapp
  • Build command: npm run build
  • Publish directory: webapp/build

Under 'Environment variables' create a new variable for each of the following:

  • VITE_MQTT_BROKER_URL: wss://broker.emqx.io:8084/mqtt
  • VITE_MQTT_TOPIC: [Your GitHub username]/raspotify/playerEvent
  • VITE_SPOTIFY_CLIENT_ID: [Your Spotify Client ID]
  • VITE_SPOTIFY_CLIENT_SECRET: [Your Spotify Client Secret]

Replace the values in the square brackets (incl. the brackets) with your values.

Hit the Deploy button.

4. View Gatefold

On your tablet or other device, navigate to the Netlify URL of your site (it'll be a black screen for now). Tap anywhere on the screen once to make it go fullscreen (this will also prevent the device from sleeping). Bookmark this URL if you wish.

Done!

Part 2 - Raspotify Setup

Install nvm on your Raspberry Pi.

Clone this repo onto your Raspberry Pi (eg in ~/). Then run (don't forget the last line!):

cd gatefold/raspotify
./setup.sh
sudo systemctl daemon-reload && sudo systemctl restart raspotify

Follow the setup instructions.

Done! Raspotify will now send player events to the Netlify site we created earlier.

Note

By default, a free public service (broker.emqx.io) is used to communicate between the Raspberry Pi and your Gatefold site. This means the Spotify track IDs played on your Raspotify are, in theory, publicy visible. If you'd prefer to host your own MQTT service, you may do so.

gatefold's People

Contributors

jamiegoodson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.