A pre-commit hook is available that runs some basic checks over staged changes to keep things clean and tidy. It can be installed by running:
make .scripts
Learn more about git hooks here.
Commits should include a single functional change, and the message should be prefixed with the primary component being changed. For example:
db: implement improved not-found errors
docs: update web docs with UIKit and fixed links
Relevant issues should be mentioned in the commit message body:
chore: set up eslint for web
closes #40
Branch names should be prefixed with the primary component being changed as well. For example:
git checkout -b log/resolver-middleware
Development documentation for the Timelines web app can be found in
./web/README.md
.
The backend is currently written in Golang and is made up
of 2 components, a server (API) and a worker. They can both be run from the
same binary, timelines
, that you can build using:
make
./timelines --help
Note that you'll want Modules
enabled using GO111MODULE=on
or by cloning this repository outside your GOPATH
.
The minimum Go version is defined in go.mod
.
All Go code should satisfy gofmt
and
golint
.
Install and run Docker, then
use the provided Makefile
:
make devenv
make devpg # initialize postgres database
To deploy timelines
components using devenv
assets, use the --dev
flag:
./timelines server --dev
./timelines worker --dev
Utility functions for development are available as well under the dev
command:
./timelines dev --help
All Go code generation tasks should be able to be triggered by go generate
:
go generate ./...
To generate all code in the project, including web
code, run:
make generate
See gotools for more details.