Skip to content

Development

github-actions[bot] edited this page Nov 18, 2026 · 9 revisions

Development

How to set up LibreBars and run what there is of it. This file grows with the repository: each app gets its section in the pull request that adds it.

Requirements

  • Node 26 (see .nvmrc) and pnpm 12.

Later, for the parts that are planned: Xcode with an iOS simulator and CocoaPods, the Android SDK with an emulator and Java 17, and Docker for the API's database.

Install

pnpm install

The workspace holds back packages that were published very recently. If an install refuses a package for that reason, wait or pick an older version; don't switch the hold off.

Checks

pnpm check       # everything CI runs
pnpm test        # unit tests, in every package
pnpm typecheck   # TypeScript, in every package
pnpm lint        # Biome
pnpm format      # Biome, fixing what it can

pnpm check is the one command to run before saying a change is done. It is a script in the root package.json, and a step is added to it when the thing it checks exists.

Biome does not check Markdown. It is left out because the formatter breaks the front matter of the decision records.

The packages

Four packages hold what more than one app needs. Each is plain TypeScript source with no build step, and none imports another.

Package What to know
packages/engine One function per file with its test beside it. No dependencies, nothing impure.
packages/ui src/theme.css is the only place a colour is defined.
packages/data The exercises. An id is permanent: never change or reuse one.
packages/contracts The API's shapes, and the synced tables: their order, columns and version.

To run one package's tests: pnpm --filter @librebars/engine test.

The docs

Docs are plain Markdown in docs/. Links between them are relative paths to the .md file, so they work on GitHub and can be rewritten for the wiki.

The wiki is built from docs/ by scripts/wiki.ts. To see what will be published:

pnpm wiki        # writes the wiki pages to dist/wiki

It fails if a link between docs doesn't resolve, and it is a step of pnpm check.

LibreBars

Clone this wiki locally