Bootleg-Beatsaver (formerly 'Beatsaver-search')
Born out of a lack of existing search capability and desire to experiment with serverless web hosting, this is the result.
Powered by Amazon Web Services (AWS): API Gateway, Lambda, Relational Database Service (RDS) & Simple Storage Service (S3)
If you're interested in creating a similar kind of serverless website, I can highly recommend the AWS tutorial upon which a lot of this is based: https://aws.amazon.com/getting-started/projects/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/
- An IDE to debug in (IntelliJ Community Edition is my IDE of choice)
For testing database / backend changes
- Python 3.0+
- Python plugin (if you're using IntelliJ Community Edition)
- A postgres SQL database with a corresponding settings.json file, with username, password, database (name), db_endpoint (database endpoint) and db_port (database port) parameters defined (as per what you see at the start of run-search.py)
It should be as simple as loading up the index.html (firefox recommended!), and then modifying it and any associated files e.g.
Backend Database Development
- Install the python libraries as per the requirements.txt (pip install -r requirements.txt)
- Run an initial scrape of the data:
This will populate the 'songs' table (see
create_table.sql file) in the db by pulling the data off beatsaver.com and into your database, or update it if it has changed.
- Then run
which will populate the 'authorstats' table of the db by compiling what has already been collected in the songs table
Once this is done you should able to ad-hoc run most/all of the python functions found inside
run-search.py to do things like retrieve song/author data etc locally.
Due to the fact that the implementation of the API / lambda function is stored in AWS, it's not possible to make testing/debugging completely end-to-end (or at least, not that I have so far figured out).
If you want to go down the rabbit-hole of setting this up end-to-end, [this is a good starting point](https://aws.amazon.com/getting-started/projects/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/](https://aws.amazon.com/getting-started/projects/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/), however I'm not willing (or really qualified) to do a step-by-step of the process.
Feedback / Questions
If you've got any questions, want to give feedback or have suggestions on what can be improved, leave me a message on discord: Zeekin#1824