Contributing
By participating in this project, you agree to abide our code of conduct.
Set up your machine
bracket-creator is written in Go.
Prerequisites:
Other things you might need to run the tests:
Clone bracket-creator anywhere:
cd into the directory and install the dependencies:
Test your change
You can create a branch for your changes and try to build from the source as you go:
When you are satisfied with the changes, we suggest you run:
Before you commit the changes, we also suggest you run:
Testing the bracket generator web UI
Open the browser and walk through bracket generation manually — type checking and unit tests do not exercise the UI rendering path.
Testing the mobile / live tournament app
make run-mobile # localhost:8080, data dir ./tournament-data
PORT=8082 make run-mobile # custom port
TOURNAMENT_DATA_DIR=/path/to/data make run-mobile # custom data dir
Important: web-mobile/ is a Preact/JSX frontend compiled by esbuild into web-mobile/dist/ and then embedded into the Go binary at build time. Any change to web-mobile/js/*.js or web-mobile/css/*.css requires:
- Rebuild the JS bundle:
cd web-mobile && npm run build(ornpx esbuild ...— see the projectMakefile) - Rebuild the binary:
make go/build - Restart the server:
make run-mobile
Simply editing .js files and refreshing the browser will not pick up changes — the browser is served the embedded bundle baked into the last binary build.
Create a commit
Commit messages should be well formatted, and to make that "standardized", we are using Conventional Commits.
You can follow the documentation on their website.
Submit a pull request
Push your branch to your bracket-creator fork and open a pull request against the main branch.
Credit
This CONTRIBUTING guideline is very inspired by the goreleaser. Thanks goreleaser.