Skip to content
This repository was archived by the owner on Jan 11, 2026. It is now read-only.

Latest commit

 

History

History
121 lines (66 loc) · 2.66 KB

File metadata and controls

121 lines (66 loc) · 2.66 KB

Development

Requirements:

Install dependencies with Brew

brew bundle install --file ./hack/Brewfile

Write an environment file

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 a workspace with Zellij

launch the workspace

./hack/start-dev.sh

Manually

Set up Postgres

Docker/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)

Frontend build

Navigate to the web folder.

Build the frontend

deno task build

Backend build

Navigate to the root of the repo.

Build the backend

./hack/verify-build-smoketest.sh

Start the backend

go run .

Remove migrations

gomigrate -source "file://$(pwd)/kodata/migrations" -database postgres://flattrack:flattrack@localhost/flattrack?sslmode=disable down

Project structure and details

API

Written in Go, the HTTP server is located in internal/httpserver.

The features and areas are separated into packages.

  1. Testing

    Tests are located in test/backend/e2e. So far there are only e2e tests for FlatTrack’s API.

Frontend

Written in Vue.js + JavaScript, the frontend is located in web.

The frontend makes requests to the backend to perform actions.

Database

The migrations and database structuring is located in migrations. Each table is created with golang-migrate.

Docs

To run the docs in development, use:

mkdocs serve

Making a release checklist

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