[Devember 2021] Spotify archiver
Full name pending, work name SAINT
Project
I’ll be creating a thing to archive/backup whatever I can (that makes sense) from the Spotify API in regards to the user’s usage of it. Off the top of my head, at least the following data will be stored in the application’s database:
- Play history
- User’s own playlists, followed playlists
- Liked lists
The main goal is to archive relevant information into a database that the user has control over
So in a sense, I want to backup my Spotify profile for my own use, with some data analysis later on I hope
Technologies
While Linode has sponsored Devember with some free credits for new signups, I want to run this thing as cheaply as I can in perpetuity with as little maintenance as possible, therefore it will (initially) be hosted on AWS as I’m already familiar with its services and am interested in the ecosystem
Tech/service stack I’ll be using used will most likely be:
- Telegram
- Spotify
- Terraform
- Python
- AWS Lambda
- AWS API Gateway
- AWS EventBridge or Step Functions
- AWS DynamoDB?
The plan so far is:
- User interaction through Telegram’s bot API where Telegram will then call the bot through its webhook system
- Lambda function to do the API calls to Spotify in a scheduled manner and store this data somewhere
- Lambda function to process the data scraped from the API and store it in the database
- Database, will probably use DynamoDB, although I haven’t really used it before
The architecture will probably end up looking something like this from a top level point of view (just a quick draft):
Project goals
Devember goals (must have):
- Have a working setup that can be deployed from nothing to running on an AWS account
- Archive/backup data relevant to the user’s music preferences (see above)
- Allow user to download their archived/backed up stuff in some format
- (Not sure if this is possible, but let’s assume yes) “Restoration” of the backups, as in for example create a new playlist from the database song data
Stretch goals (will make it to Devember if there’s time left, but also something I’ll probably work on at a later date anyway):
- Try porting it to Kubernetes for the fun of it (looking at LKE)
- Web UI maybe, some kind of Last.fm ripoff website
- Data analysis of some sort
- Automated deployment through GitHub Actions or something similar
- ???