Requirements:
brew bundle install --file ./hack/Brewfile
Write 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.sh
Docker/Podman:
docker run -d \
--name flattrack-postgres \
-p 5432:5432 \
-e POSTGRES_DB=flattrack \
-e POSTGRES_USER=flattrack \
-e POSTGRES_PASSWORD=flattrack \
postgres:16.1-alpine3.19
Manually connecting to the Postgres database:
psql -U flattrack -d flattrack -w -h localhost
(entering the password as FlatTrack)
Navigate to the web
folder.
Install Frontend dependencies
npm i
Build the frontend
npm run build
Navigate to the root of the repo.
Build the backend
./hack/verify-build-smoketest.sh
go run .
gomigrate -source "file://$(pwd)/migrations" -database postgres://flattrack:flattrack@localhost/flattrack?sslmode=disable down
Written in golang, the API is located in pkg/routes.
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.
Images are located in web/assets, these are used throughout the project (such as in the frontend, and readme).
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