Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Development

General Workflow

The project is built and developed with make.

To build and start the server in debug mode run make dev. This builds everything necessessary and runs the backend binary. By default the server runs on 0.0.0.0:3000.
For frontend javascript development make js can be used while the server is running.

Checks / Tests

The whole project can be checked with make check.

For just the frontend checks biome ci can be used. This is enough if working on the frontend and much faster than running all backend checks.

Currently tests are only used for the backend, and are run with make test.

Layout

Backend (src/, tests/, build.rs)

src/:

  • api.rs / api/: contains all api related functions
  • config.rs: contains the config definition and code to load the config
  • entity.rs / entity/: contains the definition and code for all components
  • error.rs: internal and external error definition
  • lib.rs: core library exposing definitions and functions
  • main.rs: binary entry point, containing the server and api
  • money.rs: definition for different money types
  • storage.rs / storage/: code for the storage backend

tests/: contains all backend tests

build.rs: dynamically integrates git hash for debug builds

Frontend (frontend/, assets/, biome.json)

frontend/: contains all frontend code as it is served
assets/: contains all assets used in the frontend

biome.json: config file for biome

Docs (docs/)

docs/:

  • book.toml: mdbook configuration
  • src/: markdown source code of the documentation
  • theme/: custom theme/favicon declaration for mdbook
  • mdbook-oasma: mdbook preprocessor to integrate API.md
  • API.md: from openapi.json generated API documentation

Contrib (contrib/)

Contains standalone useful scripts for development or deployment.

contrib/:

  • migrate.py: migrate from a strichliste instance to strichrliste \
  • release.sh: script used to get the repo ready for a release