Repository navigation
Workflow
How a change gets from an idea to dev, and from dev to a release. The reasons are in
ADR 0012. If you are contributing from a
fork, CONTRIBUTING.md is the short version.
| Branch | What it is | How it moves |
|---|---|---|
dev |
The default branch. Everything lands here first, and it stays green. | Fast-forwarded to a checked pull request. |
main |
The last release. The website is published from it. | Fast-forwarded to dev. |
<type>/<name> |
A topic branch for one change, such as feat/rest-timer or fix/plate-rounding. |
Rebased on dev; deleted once landed. |
The type in a branch name is the Conventional Commits type of the change: feat, fix,
docs, chore, ci, refactor, test.
History on dev and main is linear, and main is always an ancestor of dev. Neither
branch accepts a force-push, an unsigned commit, or a commit that hasn't passed the checks.
- Messages follow Conventional Commits.
- A change is a sequence of commits that each make sense alone, not one large commit.
- Commits on
devandmainare signed. A contributor's commits don't have to be: they are signed by the maintainer when they land (see below).
Every change goes through a pull request into dev, the maintainer's own included. The pull
request is where the checks run.
git switch -c feat/rest-timer origin/dev
# ...commit...
git push -u origin feat/rest-timer
gh pr create --base devThe check job in .github/workflows/ci.yml runs on the pull request: lint, typecheck,
tests, the website build and the docs link check. To run the same things locally:
pnpm lint && pnpm typecheck && pnpm test && pnpm website build && pnpm wikiWhen the change is ready, it lands as a fast-forward, so dev gets exactly the commits that
were checked, with their signatures:
git fetch origin
git rebase origin/dev # only needed if dev has moved
git push --force-with-lease # only needed if you rebased
gh pr checks --watch # wait for "check" on the final commits
git push origin HEAD:dev # fast-forward dev
git push origin --delete feat/rest-timerGitHub marks the pull request as merged when its commits appear on dev. The merge buttons
for merge commits and for rebasing are turned off: a merge commit breaks the linear history,
and GitHub's rebase re-creates the commits without their signatures.
A pull request from a fork lands the same way, with the maintainer doing the last steps:
gh pr checkout 123
git rebase -S origin/dev # the author stays the author; the maintainer signs
git push --force-with-lease # back to the contributor's branch
gh pr checks 123 --watch
git push origin HEAD:devPushing back to the contributor's branch needs "Allow edits from maintainers", which is on by default for a pull request from a fork. If that isn't possible, or the commits aren't worth keeping apart, use Squash and merge on GitHub instead: one commit, signed by GitHub, and the history stays linear.
A release moves main forward to dev:
git fetch origin
git push origin origin/dev:main # fast-forward only; never forcedThat publishes the website if anything it is built from has changed
(.github/workflows/pages.yml).
Nothing has a version number yet. From the first release of the app, a release is also a
signed tag on the commit main points at:
git tag -s v1.0.0 -m "v1.0.0" origin/main
git push origin v1.0.0| What | Branch | Workflow |
|---|---|---|
| The website, librelifts.app | main |
.github/workflows/pages.yml |
The wiki, a mirror of docs/
|
dev |
.github/workflows/wiki.yml |
The website is for people who use the app, so it follows releases. The docs are for people
who work on it, so they follow dev.
Generated from docs/ on dev. Edit the docs there; changes made on the wiki are overwritten.
- The open database and the API
- Development
- Parity with StrongLifts
- Workflow
-
Decisions
- 0001 Decisions are recorded as ADRs
- 0002 Apache License 2.0
- 0003 Parity with StrongLifts, everything free
- 0004 iOS, Android and web
- 0005 Local-first; accounts and sync later through Spotcraft
- 0006 openweight for import and export, not for storage
- 0007 One Expo app, wrapped in Electron for desktop
- 0008 A pnpm workspace with app, desktop and core
- 0009 The website is static Astro in apps/website
- 0010 The website is hosted on GitHub Pages at librelifts.app
- 0011 docs/ is for developers and is mirrored to the wiki
- 0012 Changes land on dev by fast-forward; main is the last release
- 0013 LibreLifts is an app and a crowd-sourced open database
- 0014 The database is ODbL, media is CC BY-SA, and neither can be closed later
- 0015 Data contributions start as pull requests; a web editor comes later
- 0016 A hosted API with a free tier is the paid product