Repository navigation
0010 hosted api
Status: accepted · Implementation: planned · Date: 2026-11-18
From LibreLifts ADR 0016. Hosting, billing, the legal entity, the terms of service and the trademark policy get their own records. Prices are not decided here.
Everything in the app is free (0006), and the project runs a server for accounts and backup (0014). Servers cost money. The open database (0008) is useful to other apps, and serving it reliably is worth paying for.
The data is open and its dumps are free (0009), so the data itself cannot be what is sold. MetaBrainz earns its income this way: the data is free, and companies pay for a current feed, support and not having to run the pipeline themselves.
- The project sells a hosted API to the database. The app stays free.
- The paid API serves reference data only. It has no endpoints for personal data.
- What is paid for is the service, never the data: higher rate limits, fresher data than the dumps, delivery of media, an uptime commitment and support.
- There is a free tier. It needs a key, is rate-limited and requires attribution.
- Commercial use of the hosted API needs a paid tier. Commercial use of the data does not: the dumps are free to anyone.
- The terms forbid free-riding: reselling or proxying the API, and copying the whole database through it instead of the dumps. A key can be revoked.
- The name and logo are not licensed by Apache-2.0 or ODbL. A fork or a reuser must not suggest it is LibreBars or is endorsed by it.
- The app does not depend on the paid API. It works without it.
- Income is likely to be small and slow until other products depend on the data.
- The project will take payments, which needs terms and a legal entity.
- "Everything is free" has to be said precisely: everything in the app is free, and the data is free. The service is what costs.
- Free tiers of public APIs are scraped heavily. Keys, limits per key and free dumps are the defence, and the dumps make the limits fair.
- The same service that serves the paid API also serves the project's own apps, and the two parts have to stay visibly apart (0015).
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