Track your Spotify listens
Find a file
semantic-release-bot 34007c56ea chore(release): 1.0.0 [skip ci]
# 1.0.0 (2020-05-07)

### Bug Fixes

* **api:** redirect to frontend on spotify auth error ([cffdded](cffddedc81))
* **cd:** typo ([b8ee62f](b8ee62ff09))
* **frontend:** fix minor styling+linting issues ([0abc594](0abc594db4))

### Features

* **api:** add health-check endpoint ([202665a](202665a510))
* **cd:** configure automated semantic releases ([8e796d7](8e796d7e78))
* **frontend:** style recent listens page ([1d5cefb](1d5cefb447))
* add docs and polish ([75d3e2e](75d3e2edbd))
* **api:** add getListens endpoint with pagination ([de6d057](de6d057f80))
* **api:** add optional spotify user whitelist ([a27fcce](a27fcce03b))
* **api:** fetch listens from spotify ([f2065d3](f2065d3f1f))
* **api:** listen on SIGTERM for graceful shutdown ([d58cb46](d58cb46f3e))
* **api:** setup database migrations ([a7c5c68](a7c5c68540))
* **api:** validate configuration ([e78c6e3](e78c6e312d))
* serve frontend from api container in prod build ([ad98ce4](ad98ce4e88))
* **api:** setup logging ([b6eef7f](b6eef7f090))
* **api:** setup nestjs ([db62d5d](db62d5d908))
* **api:** user authentication ([f253a66](f253a66f86))
* **frontend:** redo setup with ts+tailwind and implement auth+header ([05f230a](05f230a7ce))
* **frontend:** setup ([f14eda1](f14eda16ac))
* **frontend:** show page when login fails ([32dcd84](32dcd84964))
* **frontend:** show recent listens ([49bff95](49bff95ea5))
2020-05-07 00:40:16 +00:00
.github/workflows feat(cd): configure automated semantic releases 2020-05-07 02:34:49 +02:00
frontend chore(deps): install latest versions 2020-05-07 01:46:03 +02:00
src feat: add docs and polish 2020-05-03 21:10:31 +02:00
test feat(api): setup nestjs 2020-05-03 21:00:20 +02:00
.dockerignore feat(frontend): redo setup with ts+tailwind and implement auth+header 2020-05-03 21:10:31 +02:00
.env.sample feat: add docs and polish 2020-05-03 21:10:31 +02:00
.gitignore feat: serve frontend from api container in prod build 2020-05-03 21:10:31 +02:00
.releaserc.yml fix(cd): typo 2020-05-07 02:36:59 +02:00
CHANGELOG.md chore(release): 1.0.0 [skip ci] 2020-05-07 00:40:16 +00:00
docker-compose.yml chore(deps): install latest versions 2020-05-07 01:46:03 +02:00
Dockerfile feat(cd): configure automated semantic releases 2020-05-07 02:34:49 +02:00
LICENSE feat: add docs and polish 2020-05-03 21:10:31 +02:00
nest-cli.json feat(api): setup nestjs 2020-05-03 21:00:20 +02:00
package-lock.json chore(release): 1.0.0 [skip ci] 2020-05-07 00:40:16 +00:00
package.json chore(release): 1.0.0 [skip ci] 2020-05-07 00:40:16 +00:00
README.md feat: add docs and polish 2020-05-03 21:10:31 +02:00
renovate.json chore(deps): configure renovate 2020-05-07 01:48:30 +02:00
tsconfig.build.json feat(api): setup nestjs 2020-05-03 21:00:20 +02:00
tsconfig.json feat(api): setup nestjs 2020-05-03 21:00:20 +02:00
tslint.json feat(api): setup nestjs 2020-05-03 21:00:20 +02:00

Listory

Login with Spotify and Listory will save all tracks you listen to.

Installation

End-user Installation of Listory is not yet fully supported and the docs in this section are not complete.

Configuration

All configuration must be set as environment variables. Default values are added in bold, values that are required are marked with Required.

Application

  • PORT: 3000: Port the webserver will listen on.
  • APP_URL: http://localhost:3000: Public URL of the Application, is used to generate Links.

Authentication

  • JWT_SECRET: Required, used to sign the JWTs.
  • JWT_ALGORITHM: HS256: Algorithm used to sign the JWTs. One of HS256, HS384, HS512
  • JWT_EXPIRATION_TIME: 1d: Lifetime of signed JWTs. Accepts strings like 1d, 2h, 15m.

Spotify

  • SPOTIFY_CLIENT_ID: Required, Spotify App Client ID
  • SPOTIFY_CLIENT_SECRET: Required, Spotify App Client Secret
  • SPOTIFY_FETCH_INTERVAL_MIN: 5: Interval for fetching recently listened tracks from Spotify.
  • SPOTIFY_WEB_API_URL: https://api.spotify.com/: Spotify WEB API Endpoint.
  • SPOTIFY_AUTH_API_URL: https://acounts.spotify.com/: Spotify Authentication API Endpoint.
  • SPOTIFY_USER_FILTER: "": If set, only allow Spotify users with these ids to access the app. If empty, allow all users to access the app. Seperate ids with , eg.: 231421323123,other_id.

Database

  • DB_HOST: Required, Database host
  • DB_USERNAME: Required, Database username
  • DB_PASSWORD: Required, Database password
  • DB_DATABASE: Required, Database database

Development

Configure Spotify API Access

Copy the file .env.sample to .env and add your Spotify API Key.

Starting the application

We use docker-compose to provide a full local development environment.

$ docker-compose up

You can now access the frontend at http://localhost:3000 and the API at http://localhost:3000/api.

Frontend and API will automatically reload on any code changes.

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

License

Listory is MIT licensed.