River UI consists of two apps: a Go backend API, and a TypeScript UI frontend.
The project uses a combination of direnv and a .env
file (to suit Vite conventions). Copy the example and edit as necessary:
cp .env.example .env.local
go get ./...
npm install
This project uses Reflex for local dev. Install it.
make dev
By default the Go backend starts at http://localhost:8080 and the Vite React frontend starts at http://localhost:5173.
$ createdb river_dev
$ go install github.com/riverqueue/river/cmd/river
$ river migrate-up --database-url postgres://localhost/river_dev
Raise test database:
$ createdb river_test
$ river migrate-up --database-url postgres://localhost/river_test
Run tests:
$ go test ./...
Alternatively, build the TypeScript API to dist
, which will be included in the Go API's bundle during compilation, if it's present:
$ npm run build
-
Fetch changes to the repo and any new tags. Export
VERSION
by incrementing the last tag:git checkout master && git pull --rebase export VERSION=v0.x.y git checkout -b $USER-$VERSION
-
Prepare a PR with the changes, updating
CHANGELOG.md
with any necessary additions at the same time. Have it reviewed and merged. -
Upon merge, pull down the changes, tag each module with the new version, and push the new tags:
git pull origin master git tag $VERSION git push --tags
-
The build will cut a new release and create binaries automatically, but it won't have a good release message. Go the release list, find
$VERSION
and change the description to the release content inCHANGELOG.md
(again, the build will have to finish first).