Repository navigation
0013 shared theme
Status: accepted · Implementation: planned · Date: 2026-11-18 · Superseded by: 0027
From LibreLifts ADR 0022. Uniwind's paid tier is not used. As built, 2026-11-18: packages/ui has the theme and the class-name helper, with the colours LibreLifts uses. The component kits come with the first screens, so this stays planned. The app got its first components on 2026-11-18, written by hand (0027), not from React Native Reusables. The website uses the theme since 2026-11-18, with plain elements and Tailwind classes; shadcn and React Aria are not added yet, for the same reason as in 0027. Both sides now read colours from the one file, so this stays planned only for the component kits.
The website and the app should look like one product. The website is built from HTML elements
and the app from React Native views, and apps/web does not use react-native-web, so a
component written for one cannot run in the other.
On the web, React Aria gives components their accessibility and behaviour. There is nothing maintained that does the same for React Native. What does exist on both sides is Tailwind CSS 4, and the shadcn way of working, where components are copied into the project and owned by it.
-
packages/uiholds the shared look: one Tailwind 4 theme file with the colours, and the helper that joins class names. That file is the only place a colour is defined. - Components are not shared. Each side has its own, with the same names and the same variants, so that a button is asked for the same way in both.
- Fonts are declared on each side.
- On the web, components come from shadcn on its React Aria base.
- In the app, components come from React Native Reusables, styled with Uniwind, which brings Tailwind 4 to React Native.
- Only Uniwind's free tier is used.
- Component kits are added when the first real screens need them, not before.
- A change to a colour is made once and shows up in both.
- Every component is written twice. Keeping the two sets alike is a matter of discipline; nothing checks it.
- Some classes that work on the web do nothing in the app, such as
hover:and grid. A class list meant for both is limited to what both understand. - The theme file may hold only fixed values, because Uniwind and plain Tailwind both have to read it.
- Accessibility in the app rests on React Native's own support and has to be tested with VoiceOver and TalkBack.
-
packages/uihas dependencies from outside the workspace for joining class names. It has none from inside it.
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