- Follow Typescript and Svelte best practices
- Code Review Comments guide from the Go project should be followed
Run make format
to format all go and frontend code before commit
- not doing so can result in a failed build on GitHub
docker-compose up --build
This solution will require you to pass environment variables or set up the config file, as well as setup and manage the DB yourself.
docker build ./ -f ./build/Dockerfile -t thunderdome:latest
docker run --publish 8080:8080 --name thunderdome thunderdome:latest
To run without docker you will need to first build, then setup the postgres DB, and pass the user, pass, name, host, and port to the application as environment variables or in a config file.
DB_HOST=
DB_PORT=
DB_USER=
DB_PASS=
DB_NAME=
go mod download
go install github.com/swaggo/swag/cmd/swag@1.8.3
cd ui && npm install
make build
npm run build --prefix ui
swag init -g internal/http/http.go -o docs/swagger
go build
npm run autobuild --prefix ui
make dev-go
Run the server and visit http://localhost:8080
The restful API is documented using swagger, any changes to that documentation require regenerating the docs with the following commands and committing the updated docs with the changes.
swag fmt
swag init -g internal/http/http.go -o docs/swagger
First install goose tool
go install github.com/pressly/goose/v3/cmd/goose@latest
Generate new migration file
goose -dir internal/db/migrations create SHORT_DESCRIPTIVE_FILNAME sql
Thunderdome supports Locale selection on the UI (Default en-US)
Adding new locale's involves just a few steps.
- First by copying the
ui/src/i18n/en/index.ts
into the new locale folder atui/src/i18n/{locale}/index.ts
using the two letter locale code for the directory name and translating all the values. - Second, the locale will need to be added to the locales list used by switcher component
in
ui/config.js
locales
object - Run
npm run locales
inui
directory to generate the new locale types used by the build process - commit changes and open PR