GithubHelp home page GithubHelp logo

jstnjns / nowify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jonashcroft/nowify

0.0 0.0 0.0 6.47 MB

A Spotify 'Now Playing' screen designed for Raspberry Pi

JavaScript 5.88% HTML 3.79% Vue 51.50% SCSS 38.83%

nowify's Introduction

Netlify Status

Nowify

A simple app to display your currently playing Spotify track on a Raspberry Pi, made with Vue.

Nowify will:

  • ✅ - Use Spotify Web API to get your current track
  • ✅ - Only access that and no other data
  • ✅ - Use Access and Refresh Tokens to ensure that you're kept logged in between sessions
  • ✅ - Display the current track artist, cover, and a matching vibrant background colour

Preview: Nowify Preview Image 1 Nowify Preview Image 2 Nowify Preview Image 3

Nowify needs a webserver to run. The quickest way to get up and running is to use a Jamstack platform like Netlify or GitHub Pages.

  • Fork this repository
  • Connect your repo to your Jamstack platform
  • Add your Spotify Client ID and Client Secret to the platforms environment variables
  • Deploy!

How to use

Prerequisites: You will need:

  • A Github account
  • A Netlify account
  • Spotify Client Keys
  • A device to display Nowify

1. Fork this repository

On this page, click on the 'Fork' button in the top-right to create a copy of the repo as-is on your account. Alternatively, you can clone the repo and push to Github.

2. Create a new project on Netlify

Log in to Netlify and click 'New site from Git'.

If you're doing this for the first time, you will need to authorise your Github account with Netlify by following the instructions.

Once authorised, follow the on-screen instructions to connect your repository. You should be fine to leave the default settings as-is here.

Click on 'Deploy site'.

Note: Nowify should use Node 14. This has been set in the project environment. I've only ever attempted this Netlify, so cannot help you if you use another platform.

3. Create Spotify Client keys.

To allow authorisation to your track data, you'll need to generate client keys. You can do this by logging in to the Spotify Dashboard creating an app.

Call the application 'Nowify'.

Set the 'Redirect URI' as the URL of your project in Netlify. This must be set else Spotify won't authorise Nowify.

You can leave the other settings (Callback URL, Bundle IDs etc) blank.

Copy down the Client Secret and Client ID and save your app in the Spotify Dashboard.

4. Add the Client ID and Client Secret to Netlify

Now that we have our Spotify API keys, we must let Nowify know that they exist.

To do this, navigate to Netlify > Site Settings > Build & Deploy > Environment

Under 'Environment variables', add two fields. The 'Keys' can be found in the env.sample file and the values will be the Client ID and Client Secret, respectively.

Hit save.

5. View Nowify

Once the environment variables are in, you will have to navigate to your Netlify site overview > Deploys > Trigger Deploy drop-down > click 'Clear cache and deploy site' and wait for deployment to complete. You can now navigate to your Netlify site. You'll be prompted with a Spotify login button. Do that, and you're good to go!


Alternatively, you can clone the repo, compile the code offline, and upload to your own webserver (more advanced users only). If you're considering doing this, I'll assume that you somewhat know you're way around build tools.

Original Write up:

https://ashcroft.dev/blog/now-playing-screen-spotify-raspberry-pi-es6/

Brief About:

Nowify was a project that I originally made in 2017 when I wanted to learn more modern Javascript. Over the years, I've learned a lot more and had people contact me about Nowify, so I wanted to build a more modern version of it using modern tools. This is still a learning exercise, but hopefully one that's more usable. If you'd like to view the old repository, that can be found on the old branch.

nowify's People

Contributors

jonashcroft avatar chvvkumar avatar thepont 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.