Requirements:
brew bundle install --file ./hack/BrewfileWrite the credientials for the database into .env
APP_DB_USERNAME=flattrack
APP_DB_PASSWORD=flattrack
APP_DB_DATABASE=flattrack
APP_DB_HOST=localhost
see the example.env file in the root of the repo for more.
launch the workspace
./hack/start-dev.shDocker/Podman:
docker run -d \
--name flattrack-postgres \
-p 5432:5432 \
-e POSTGRES_DB=flattrack \
-e POSTGRES_USER=flattrack \
-e POSTGRES_PASSWORD=flattrack \
docker.io/postgres:18.0-alpine3.22@sha256:48c8ad3a7284b82be4482a52076d47d879fd6fb084a1cbfccbd551f9331b0e40
Manually connecting to the Postgres database:
psql -U flattrack -d flattrack -w -h localhost
(entering the password as flattrack)
Navigate to the web folder.
Build the frontend
deno task build
Navigate to the root of the repo.
Build the backend
./hack/verify-build-smoketest.sh
go run .
gomigrate -source "file://$(pwd)/kodata/migrations" -database postgres://flattrack:flattrack@localhost/flattrack?sslmode=disable down
Written in Go, the HTTP server is located in internal/httpserver.
The features and areas are separated into packages.
-
Testing
Tests are located in test/backend/e2e. So far there are only e2e tests for FlatTrack’s API.
Written in Vue.js + JavaScript, the frontend is located in web.
The frontend makes requests to the backend to perform actions.
The migrations and database structuring is located in migrations. Each table is created with golang-migrate.
To run the docs in development, use:
mkdocs serve
Things to do before making a release:
- ensure docs represent the latest changes
- ensure linting passes
- generate change list with
git cliff --tag "new tag name here" "$(git describe --tags --abbrev=0)"..HEAD