Repository navigation
0027 own components first
Status: accepted · Implementation: done · Date: 2026-11-18 · Supersedes: 0013
Partly supersedes 0013, which said the app's components come from React Native Reusables: they will, once a component needs behaviour worth borrowing. The rest of 0013 stands. Built 2026-11-18: Button, ConfirmButton, Screen, Section, Card, Note, TextField, NumberField and SetRow.
0013 said that in the app, components come from React Native Reusables, added when the first real screens need them. The first real screens are here (0006), and what they need is small: a button, a number field, a text field, a row and a screen with a scroll view.
React Native Reusables brings those, and with them its command-line tool, a set of primitive
packages, an icon library, a portal for overlays, and its own colour names (background,
primary, foreground), which are not the names in packages/ui. Each copied component
would have to be rewritten to the project's colour names before use. For a button and two
fields that is more to take on than to write.
The same question decided the navigation. Tabs want an icon each, and an icon library is one more dependency for three pictures.
-
The app's first components are written here, in
apps/app/src/components, with Uniwind classes and the colour names frompackages/ui. They are plain React Native views withaccessibilityRoleand labels set by hand. - React Native Reusables is added when a component needs behaviour that is hard to get right: a dialog, a menu, a select, a sheet. It is then copied in and renamed to the project's colours, in a pull request of its own.
- Variants are a map from a name to a full class string, never a class built from parts, because Tailwind only finds classes that are written out.
- The first screens are a stack, not tabs. The home screen links to history and settings. Tabs, with icons, can come when there are more places to go.
- A destructive button asks twice in place: the first press changes its label, the second acts. React Native's alert does nothing in the web build, and nothing is built for one platform alone (0007).
- No new dependency for the first screens.
- The app's components and the website's are still written separately, as 0013 says, and now neither side has a kit to keep them alike.
- Accessibility is entirely the project's job here: roles, labels and hit areas are set by hand and have to be tested with VoiceOver and TalkBack.
- When a kit is added later, these components are replaced or kept one by one. That is a cost put off, not avoided.
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