Repository navigation
0028 spotstrap theme
Status: accepted · Implementation: done · Date: 2026-11-19 · Supersedes: 0013
From LibreLifts ADR 0037. Supersedes only the part of 0013 about where the theme lives and what its colours are called. Components are still not shared, each side's components are still its own (0027), fonts are still declared by each app, and only Uniwind's free tier is used. Moving the app's components to Spotstrap's recipes is a later change. Built 2026-11-19 with Spotstrap 0.1.3: 126 class uses and 5 CSS variables renamed; the colour files outside CSS read @kodentuzo/spotstrap/tokens/librelifts.json, whose hex values match the old ones exactly, so the generated icons did not change. The website's colours are identical and the app's screens are pixel-identical, light and dark; on the website, text without a size grew from 16px to 17px.
0013 put the theme in packages/ui/src/theme.css, with names of the
project's own: bg, text, line, muted, accent, accent-ink and fail. The same
maintainer now publishes Spotstrap (@kodentuzo/spotstrap), a Tailwind 4 theme and class
library made for phones, and is moving every project of theirs onto it. LibreLifts, which
LibreBars was copied from, has moved already.
Spotstrap writes its themes in the format this repository already uses: static values in
@theme, with the colours under the light and dark variants, so that Uniwind reads the
same file as the website. It ships a librelifts theme with the colours LibreBars uses,
converted to oklch, and a native.css for React Native that holds its sizes and type scale
without the web's base styles. Its colours use shadcn's names (background, foreground,
primary, muted-foreground, destructive, border…), which the components shadcn and
React Native Reusables offer already expect. 0027 gave those
names as one reason not to copy React Native Reusables yet.
Two of shadcn's names are also this project's names, with other meanings: shadcn's muted is
a background, and its accent is a quiet hover colour, not the brand colour.
-
The theme comes from Spotstrap's
libreliftstheme. The website imports@kodentuzo/spotstrap/tailwind.cssandthemes/librelifts.css; the app imports@kodentuzo/spotstrap/native.cssand the same theme, after Uniwind. -
Colour values live in Spotstrap. A change to the colours is made in its theme and
reaches the website and the app by updating the package. No colour value is written in this
repository, except where a file cannot read CSS (the favicon, the web manifest, the
generated icons,
app.json, thetheme-colormeta tag); those take the hex values from Spotstrap's tokens. -
Class names are shadcn's.
bg→background,text→foreground,line→border,muted→muted-foreground,accent→primary,accent-ink→primary-foreground,fail→destructive.surfaceandraisedkeep their names, which Spotstrap has too. All of them are renamed at once, so that no oldtext-mutedorbg-accentis left to pick up shadcn's meaning. -
packages/ui/src/theme.cssis deleted.packages/uikeeps the helper that joins class names. - Spotstrap is installed at an exact version, and pnpm's minimum release age does not apply to it: it is the maintainer's own package, published from CI with provenance.
-
Components do not change. The app's own
Button,Field,SetRowand the rest stay as 0027 built them, with the new names.
- The colours do not change: Spotstrap's theme was converted from these.
- On the website, Spotstrap's base styles apply: body text is 17px (Apple's body size) instead
of the browser's 16px wherever no size is set, and borders default to the theme's border
colour.
global.csskeeps its own focus outline. - A colour change is now a release of another package. That is slower than editing a file here, and it is the point: LibreBars and LibreLifts stay alike.
- Spotstrap's
mutedandaccentexist. Writingtext-mutedbuilds and shows the wrong colour; review has to catch it, since nothing else does. - Components copied later from shadcn or React Native Reusables need no renaming of colours.
- The theme names web fonts with fallbacks, which React Native cannot use. The app sets no
font yet; when it does, it sets
--font-sansand the others after the theme.
Generated from docs/ on dev. Edit the docs there; changes made on the wiki are overwritten.
- Development
- Workflow
-
Decisions
- 0001 Decisions are recorded
- 0002 Apache License 2.0
- 0003 Changes land on dev by fast-forward; main is the last release
- 0004 Conventional Commits, Keep a Changelog and Semantic Versioning
- 0005 docs/ is for developers and is mirrored to the wiki
- 0006 LibreBars is a free workout log for calisthenics
- 0007 The tracker is an iOS and Android app; its web build stays until the store release
- 0008 LibreBars is an app and a crowd-sourced open database
- 0009 The database is ODbL, media is CC BY-SA, and neither can be closed later
- 0010 A hosted API with a free tier is the paid product
- 0011 The workspace is app, web and api, with engine, ui, data and contracts
- 0012 The engine is small pure functions, in the style of date-fns
- 0013 Web and app share a Tailwind theme, not components
- 0014 Postgres is the source of truth for all data
- 0015 The API is Fastify, and it owns LibreBars accounts
- 0016 Every install is a guest account, made in the background
- 0017 Accounts use Better Auth
- 0018 The on-device database is SQLite with Drizzle, on every platform
- 0019 Sync is our own push and pull
- 0020 The app says it backs up, and backup can be turned off
- 0021 Postgres 18, run with Docker Compose and tested on two databases
- 0022 expo-sqlite is patched so the web build reuses one buffer
- 0023 Seed data is TypeScript modules in packages/data, with permanent ids
- 0024 The first tables
- 0025 One TanStack Start app is the website, on GitHub Pages
- 0026 The catalog reaches the app as a snapshot plus updates, and the website through the API
- 0027 The app's first components are its own
- 0028 The theme comes from Spotstrap, with shadcn's colour names
- 0029 The app's own components take their classes from Spotstrap's recipes