hoovercj/beatsaber-leaderboard-react

Allow configurable data sources

Closed this issue · 2 comments

Users should be able to:

  • Access their leaderboard files directly from the Beat Saber directory. For browser security reasons, the json files must be served from a server, not from the file system. So, if possible, allow a configuration parameter such that running npm start or a similar command will start a server in that directory to serve the files and use an API service to fetch them
  • Access their leaderboard files hosted remotely. The url used should be read from configuration as well.

The remaining work for this is two fold:

  • Create a backend which can have scores posted to and serve them via get requests
  • A FileSystemWatcher to install as a windows service on the PC to post the scores to the backend whenever the file changes

if REACT_APP_BACKEND_URL is provided in .env, it will be used to fetch scores, otherwise, scores.json will be used.

There is also a FileSystemWatcher project here: https://github.com/hoovercj/beatsaber-leaderboard-filewatcher