Skip to content

Recommendation engine for TIDAL playlists and mixes.

License

Notifications You must be signed in to change notification settings

lionello/TIdalSocial

Repository files navigation

TIdalSocial logo

License: MIT TypeScript code style: prettier

GitHub package.json version Docker Image Size (tag)

This project is not affiliated with TIDAL or ASPIRO AB.

TIdalSocial is my attempt at creating a playlist recommendation engine for the awesome TIDAL music streaming service.

TIDAL does not currently have a way to browse or search for shared playlists, but that doesn't stop us, the fans, from creating our own platform.

TIdalSocial uses the following libraries for the recommendations:

  • implicit for the Alternating Least Squares matrix decomposition
  • hnswlib for the Hierarchical Navigable Small Worlds approximate nearest neighbors

For more details about the inner working of the algorithm, please check the excelent blog post by @benfred on https://www.benfrederickson.com/matrix-factorization/

The frontend is written in HTML and TypeScript and uses Vue.js and is served by ExpressJS. The backend is also written in TypeScript, runs on NodeJS, but POSTs requests to a local Python 3 Flask server for the actual recommendations. I'm using ECMAScript Modules (ESM) to allow the generated JavaScript to work in the browser as well as on NodeJS.

Development

Use direnv with the following .envrc:

use flake
export PATH=$PATH:$PWD/node_modules/.bin
layout python

Or, without direnv:

nix-shell --pure
npm install
source .venv/bin/activate # or whichever venv you want
# For some reason CMAKE ignores the CXX from mkShell and insists on using clang
CC=$CXX pip install -r requirements.txt

Test

nix-shell
npm test
python -m unittest discover -s model

Run

nix-shell
npm start

Publish

npm version patch # or minor, or major
npm run docker:push