The API that powers batch.songwhip.com. A bespoke sevice built for an individual company (SMH Records) to upload batches of source-urls (eg. Spotify) and get back a CSV with final music service links.

# Stack

- DynamoDB for persistence
- SQS for seqentially processing batch items (Songwhip lookups)
- Uses `songwhip-lookup` to get metadata
- Serverless.com for deployments to AWS

## Auth

When you attempt to hit an account URL (eg. batch.songwhip.com/wilsonpage) it will prompt you to send a magic-email if you don't have a valid token (JWT) for the account scope.

The API will send an email with a link containing a JWT to the address associated with that account. Clicking the link stores the JWT as cookie and songwhip-batch-web will use that JWT for all auth-guarded routes.

### Getting a root token

The root token allows you to access any endpoint. To get the root token login to batch.songwhip.com/wilsonpage. The token you get will allow you to visit any account pages (eg. batch.songwhip.com/smh).
