Skip to content

0008 workspace

github-actions[bot] edited this page Nov 17, 2026 · 1 revision

A pnpm workspace with app, desktop and core

Status: accepted · Implementation: skeleton · Date: 2026-11-17

Built: the workspace, the three packages, Biome (Markdown excluded: it breaks the frontmatter of these records) and Vitest. packages/core holds one rule so far.

Context

ADR 0007 gives librelifts an Expo app and an Electron shell around its web build. The rules of the program (when a weight goes up, when it deloads) are the part most worth testing, and they should not depend on a UI framework to run.

Decision

One repository, one pnpm workspace:

Path What it is
apps/app The Expo app: iOS, Android and web.
apps/desktop The Electron shell. It loads the web build of apps/app.
packages/core The rules of the program, in plain TypeScript. No React, no React Native.
  • packages/core is consumed as TypeScript source; it has no build step.
  • Tooling: pnpm, TypeScript, Biome for linting and formatting, Vitest for packages/core.
  • Packages that Expo manages are installed with npx expo install, so their versions match the SDK.

Consequences

  • The rules are tested once, quickly, without a simulator, and every platform runs the same code.
  • Anything that needs a platform API (storage, timers, notifications) stays out of packages/core and is passed in.
  • A workspace adds a little setup to Metro and Electron compared with a single package.

Clone this wiki locally