/song-inspector

This is the source code for Song Inspector, hosted at http://songinspector.com/. Song Inspector is an app that allows people to check the attributes of a given song based on data made available through the Spotify API. It then allows people to find new songs by 'tuning' those attributes.

Primary LanguageJavaScriptMIT LicenseMIT

Song Inspector

This is the source code for Song Inspector, hosted at http://songinspector.com/. Song Inspector is an app that allows people to check the attributes of a given song based on data made available through the Spotify API. It then allows people to find new songs by 'tuning' those attributes. The result is an app that allows users to make requests like "Give me Bohemian Rhapsody, but with no vocals," or "give me Cheap Thrills, but make it acoustic."

Architecture

Song Inspector is built on Node, served with Express, proxied with Nginx, and uses React (Vite) for the front-end. It uses PM2 to run "server.cjs" as a daemonized process that listens to API calls made by the front end.

Deploying Song Inspector

To deploy your own instance of Song Inspector, you will need a spotify dev account. A premium subscription is required to take advantage of the preview player. Song Inspector will use the client secret and client ID generated by your spotify dev account to populate a .env file that will allow "server.cjs" to function.

If you are interested in deploying Song Inspector yourself, run "npm run build" from the parent directory to compile a distribution package. You can then serve this however you like, but you will need a server running "server.cjs" as a process, and you will need to modify the endpoints of the Song Object component to match the server where you are running "server.cjs"

Make sure "server.cjs" is running in the same directory as a .env file containing the following information

# Environment variables.
STATUS=dev
#Development port
DEV_PORT=3000
#Production port
PROD_PORT=8000
##Spotify dev account ID and secret
CLI_ID=''
CLI_SECRET=''