Skip to content
Nightscape Coffee edited this page May 16, 2022 · 11 revisions

Browser Extensions

Add to Firefox

Source code: https://github.com/coffeebank/soju-redirect


Advanced

To get a direct link, you can also add the url to a ?s= query parameter like so:

https://soju.▉▉▉▉▉.▉▉/?s=SPOTIFYLINKHERE

Here's a list of query parameters. Many of these can be strung together using ?s=str&sm=str&method=str.

Query Type Description
?s= str Jump straight to processing a Spotify url
?sa= bool Run all processing methods for an ?s= url
see ?method= for more info
?sm= str Processing method for an ?s= url
see ?method= for more info
?method= str Set default processing method for the browsing session
  • api (default): Uses Spotify Web API to fetch data
  • embed: Loads a Spotify webpage directly (fallback)

Privacy

The regex parses your Spotify links for track/album/playlist and the item ID. All other parts of the Spotify link are discarded. Cookies from Spotify are not placed until an unmodified Spotify webpage is displayed, either as a fallback when the API fails, or manually fetching from the fallback.

Soju is a static site with no server backend. To provide a secure connection to the Spotify API, Soju fetches/displays all Spotify data to the end user through Netlify Functions and Netlify CDN, which uses AWS Lambda and Cloudflare.

Soju can be considered as a "private frontend for Spotify", particularly as it doesn't require logins, and because Spotify-to-YouTube frontends are arguably only "YouTube frontends that support Spotify links". As an in-between service, Soju allows users increased anonymity than when accessing Spotify content directly. Soju does not run analytics, does not log the music you send, and does not leave cookies (other than the ones from above).

Soju is not a "privacy advocate". Soju does not promise to protect users from "big tech", governments, or Spotify's legal team. Soju, by being a project based around a nonfree service and copyrighted content, has already sacrificed its right to stand for any free/libre values, and is now more a question of not abusing the Spotify links you share with Soju. Regular users also use Soju, who will often gladly exchange privacy for convenience. Soju's main focus is delivering a quality user experience within these constraints, which includes using Vue/JavaScript, accessing/displaying unmodified Spotify webpages where necessary, and relying on Netlify/Cloudflare to stand between you and Spotify. A "privacy frontend" doesn't require "fighting for unlimited, anonymous access to copyrighted content for free". If your threat model depends on avoiding commonplace web technologies and services, then Soju may not be for you.

Soju's code is open-source, and the Node.js scripts are ready, if you would like to adapt it to create an API-only (no-JavaScript) frontend. The Soju License cannot control what you do with Soju's code outside of the license requirements.


Spotify License Limitations

Soju fetches copyrighted music data licensed by Spotify. Soju website hosts use an API key from Spotify Web API to license this data for use in Soju.

  • Soju will only use "Audio Preview Clips", which are 30 second preview clips for public use. For the purposes of Spotify's licenses, Soju does not and will not do "Streaming", which is defined as streaming/making available the full song.
  • Soju fetches the most up-to-date content from Spotify to display at the time of request by a user. No data is collected or stored after the user closes the tab. Soju cannot access any data Spotify removes from its API.
  • Soju does not and will not bypass geo-restrictions. Songs that are geo-blocked or otherwise restricted by the API will not play and show a crossed-out music note icon.
  • Soju provides a link back to all content fetched from Spotify.
  • Soju may display an unmodified Spotify webpage in its original form (outside of the control of Soju) when the API fails. This webpage is maintained by Spotify, who may place cookies, use tracking technologies, and restrict access to Spotify content within that webpage.

On page load, a Spotify access token is retrieved using the website host's Spotify API Key via Netlify Functions and cached for use during the session. The Spotify access token is removed when the tab closes, or expires after an hour, whichever comes earlier. Spotify ratelimits requests from users using this access token. All data from the session is cleared when the user closes the tab.


Self-Host

Soju is free, open source, and self-hostable. However, this comes with some big caveats:

  • Soju was designed for Netlify, which effectively restricts you to only hosting on Netlify at the moment.
  • Soju uses copyrighted content from Spotify, which means you must obtain a Spotify API key to use the data. Soju will not parse and does not endorse parsing any public Spotify webpages for any licensed Spotify content.

Prerequisites:

  • Netlify account (free)
  • Spotify account + API key
  • A public electronic mail inbox or webpage with contact info, for DMCA and contact

Steps:

  1. Click "Fork" on the top right corner
  2. Add your info under instanceInfo in src/main.js
  3. Go to Netlify (create an account if you haven't) and deploy the site
  4. Under Build settings > Environment variables, add the variables listed in .env.example (your Spotify API keys go here)
  5. Under Top Bar > Deploys > Trigger deploy > click "Clear cache and deploy site" to re-deploy the site

Development

Fork the project, then install all dependencies using npm install.

Copy the .env.example file to .env and fill in the values.

Run the development server using netlify dev. Due to a bug, this currently requires Node 14-16 (not 17) for the server to run properly.


License

Soju is licensed under the GPLv3 License, which allows changes as long as your code remains open-source.

Soju is not endorsed by Spotify. Soju uses copyrighted content from the Spotify Web API under license.

Feel free to modify Soju for white-label purposes, but please keep all credits per LICENSE.

This was an educational project exploring Vue/Vite, Nodejs, and the Spotify Web API. All code has been open-sourced in the hopes that this software can be useful to someone. If there are any legal questions (DMCA, license, white-label, etc.) please send them to sojumail [@] catdev.anonaddy.com.

© 2021–Present, by coffeebank.

Clone this wiki locally