Repository navigation
0008 app and open database
Status: accepted · Implementation: planned · Date: 2026-11-18
From LibreLifts ADR 0013. Whether the two projects end up sharing one database is not decided; for now each has its own. How contributions are made gets its own record when they open.
The app needs reference data: exercises, how each is counted, how one leads to the next, instructions, pictures. No open source of that data for calisthenics is both large and clean. The open collections that exist are uneven or have media of unknown origin, and the good ones are proprietary.
LibreLifts made the same observation for lifting and decided to build an open database beside its app. Projects such as MusicBrainz, Open Food Facts and OpenStreetMap show that a community will build and keep up a reference database when the data stays theirs to use.
- LibreBars is two things under one name: the app, and an open database of calisthenics reference data that anyone can contribute to.
- The database holds reference data only. It never holds a person's workouts or any other personal data.
-
Its scope, in the order it is built:
- Exercises: permanent ids, names and other names, how they are counted (reps or time), muscles, equipment, instructions, translations.
- Progressions: which exercise leads to which.
- Media for exercises.
- Routine templates a machine can read.
- The app ships with the data it needs. It works with no server (0026).
- Contributing data is the only community feature. There is no feed, no following and no sharing inside the app.
-
None of this is built yet. The first exercises are written by hand in
packages/data(0023).
- The app refers to exercises by their permanent ids, so newer data can replace older data without breaking a workout history.
- The project will have contributors of data, not only of code. They need licence terms (0009) and a way to contribute.
- The database is useful to other apps. That is intended: it is how the project grows, and what the hosted API sells access to (0010).
- A database is a long commitment. Quality, review and moderation become ongoing work for a project with one maintainer.
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