/beatsaver-main

Primary LanguageKotlinGNU General Public License v3.0GPL-3.0

Beatsaver

Build Status

The main codebase for the beatsaver website.

Contains both backend code for uploading and managing maps, the beatsaver API and a reactJS frontend all written in Kotlin with shared code.

Local setup

Prerequisites

Lets go

  • Run docker-compose up -d to start the local database
  • Open the project in IntelliJ IDEA
  • Run the run gradle task
  • Navigate to http://localhost:8080
  • Login with one of the test users
    • admin:admin
    • test:test
    • collab1:collab1
    • collab2:collab2

Extra environment variables

  • ZIP_DIR Directory zips will get served from
  • COVER_DIR Directory cover images will get served from
  • AUDIO_DIR Directory preview audio will get served from
  • AVATAR_DIR Directory avatars will get served from
  • PLAYLIST_COVER_DIR Directory playlist covers will get served from
  • UPLOAD_DIR Directory files get uploaded to before being processed

Zips, covers and audio files must be placed in a subfolder that is named with their first character

e.g. cb9f1581ff6c09130c991db8823c5953c660688f.zip must be in $ZIP_DIR/c/cb9f1581ff6c09130c991db8823c5953c660688f.zip

Code Style

This project uses ktlint which provides fairly basic style rules.

You can run the ktlintFormat gradle task to automatically apply most of them or the ktlintCheck task to get a list of linting errors.