Files
soundcloak/docs/DEV_GUIDE.md

1.9 KiB

Setup

Prerequisites

  1. golang (I recommend version 1.25.1)
  2. git

The setup

  1. Clone this repository:
git clone https://git.maid.zone/stuff/soundcloak
  1. Go into the cloned repository:
cd soundcloak
  1. Download required JS modules:

Currently it's just HLS.js. This is what powers the HLS player

go tool soundcloakctl js download
  1. Build binary:

This uses the build script, which generates code from templates, generates code for regular expiressions, and then builds the binary.

./build

Now, you can run soundcloak with the ./main binary. By default, it is listening on 127.0.0.1:4664. For a configuration guide, refer to here

Updating your local setup

  1. Retrieve the latest code:
git fetch origin
git pull
  1. Update dependencies/tools:
go mod download # update tools and dependencies

go tool soundcloakctl js download # re-download JS modules
  1. Run codegen and build the binary:
./build

Now, you can run soundcloak with the ./main binary.

Contributing

Contributions are appreciated!

We develop soundcloak on our forgejo instance, but feel free to contribute on our Codeberg and Github as well!

If you want to add a new feature that's not in the todo list, please create an issue or discussion first.

If you have updated go dependencies or added new ones, please run go mod tidy before commiting.

If you update structs, please run betteralign to make sure memory layout is optimized.

Any security vulnerabilities should first be disclosed privately to the maintainer (different ways to contact me are listed here)