Skip to content

poozipotti/spotify_constellations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify Constellations 🌠

What is it?

This project was started to see if I could find an interesting way to explore the spotify api. I found the spotify jam feature really intriguing, especially the push and pull of different peoples tastes colliding. If someone changed the entire vibe, would it stick, or not?

To capture this feeling Spotify constellations uses a database to store a directed graph of connections between different tracks. Each track only exists once in the system, when a user adds a new song it is either added directly if it hasn't been added before, or a new association is made if it already exists. Right now there are very few constraints on exactly how these connections are made, but the plan is to eventually add a combination of sensible rules (i.e. right now it is possible to have a track lookup to itself) and metadata to allow the system to prioritize popular connections or use some other metric to allow for easier navigation.

The system synchronizes the choices the user makes while traversing the constellation graph by manipulating a playlist saved on the user's spotify account. This became necessary because it was the only method I could find that allowed for smooth playback. It also has the benefit of allowing users to save their progress and return to it later.

The bulk of my work so far has been finding a stable way to synchronize the app state to spotify, once this is stable enough much more time will be spent on ease of navigation and new features.

Spotify Constellations is still in an unfinished state and does not have a player implemented yet. To acess spotify constellation open spotify and start playing a song.

Spotify Setup instructions

This app requires you to setup an app an have a spotify client id Instructions can be found here

How to run locally

clone this repo:

git clone https://github.com/poozipotti/spotify_constellations.git

Client

  • Use cd <path-to-repo>/spotify_web/client to navigate to the react app folder

  • Copy the contents of example.env to .env before running any commands

docker is required to run:

docker compose up --build

Api

Copy the contents of example.env to .env before running any commands, and add your spotify client id yarn is required to run.

  • Use cd <path-to-repo>/spotify_web/api to navigate to the server folder

  • First install the node_modules.

yarn
  • Next, run the development server
yarn dev

The website should be live at localhost:3000

Thank you Bezkoder

The api for this app was based off of designs from Bezkoder from these articles specifically

Dockerize Node.js Express and MySQL example - Docker Compose

Build Node.js Rest APIs with Express & MySQL

The main system changes I made are as follows

  • migrate to typescript and use sequilize-typescript as the main driver

  • use postgres instead of MySQL (I am just more familiar with it, no technical reason)

About

build a spotify web together

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published