- Kotlin 59.2%
- CSS 20.4%
- HTML 15.1%
- Dockerfile 3.5%
- Makefile 1.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Release / release (push) Successful in 4m20s
The Android app (framework only, no libraries), its level maths with unit tests, F-Droid metadata, and bonbr.kroshtan.com: a page in kroshtan.com's design that ships the signed APK, built and deployed by CI on every release tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
| .forgejo/workflows | ||
| .kamal | ||
| app | ||
| config | ||
| fastlane/metadata/android/en-US | ||
| gradle | ||
| site | ||
| .dockerignore | ||
| .gitignore | ||
| build.gradle.kts | ||
| Dockerfile | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| settings.gradle.kts | ||
bonbr
body and brain: a Pomodoro timer where the next brain session only unlocks after a body set.
- Press the big button: a brain session starts (length set on first launch, changeable in settings).
- When it runs out the phone rings and the app turns to body mode: pick push-ups, pull-ups, squats, sit-ups or a walk, and log how big your set was. Zero is fine: the break still made you stop and consider.
- See what the set did to that exercise's level, then back to the big button.
"Do a bonus set" logs a set any time without a timer.
The levels
Each exercise has a level and one balance, a tug of war between surplus and deficit:
- At level n, par is n reps (or minutes of walking) a day. Each day charges n; each logged rep pays one in.
- Balance reaches +5n: up to level n+1. The 5n is spent and the new level's par is charged for that day.
- Balance reaches −5n: down to level n−1. Level 1 is the floor.
- The clock for an exercise starts the first day you log it, so exercises you never do cost nothing.
25 push-ups on day one: 1 (par) + 5 (to level 2) + 2 (par) + 10 (to level 3) + 3 (par) = 21, so level 3 with 4 over. A day without push-ups leaves 1, another −2.
Everything is recomputed from the log of sets (Progress.kt), so nothing runs at midnight and nothing drifts.
Privacy
No internet permission, no trackers, no Google services, no libraries: just the Android framework and the Kotlin standard library. The sets live in one plain-text file in the app's private storage; your phone's own backup tool (e.g. Seedvault) may include it.
Permissions: notifications (the end-of-session ring) and exact alarms (so the session ends on time).
Building
Everything runs in a pinned Docker image; the host needs only docker (and adb for make install).
make check # lint (warnings are errors) + unit tests + debug build
make apk # dist/bonbr-<version>-debug.apk
make install # onto a phone over adb
Releasing
A release is a tag, and bonbr.kroshtan.com is where it ships:
- Bump
versionCodeandversionNameinapp/build.gradle.ktsand addfastlane/metadata/android/en-US/changelogs/<versionCode>.txt. - Commit,
git tag v<versionName>, push the commit and the tag.
.forgejo/workflows/release.yaml then runs kamal deploy on the forge's deploy runner. The image build
(Dockerfile) runs the unit tests and lint, builds the release APK, signs it, and bakes it into the page with its
version, size, SHA-256 and signing certificate. The page offers bonbr-<version>.apk, plus bonbr.apk, which
always points at the latest version. A push to main that only changes site/ redeploys the page, still offering
the latest tag's APK.
The signing key is a build secret and never ends up in an image layer. CI reads it from
/var/lib/kroshtan-deploy/bonbr/ on the box; the owner's copy lives outside the repo. Losing it means existing
installs can't update to new versions, so keep a backup. F-Droid builds the unsigned release and signs it with its
own key.
Building the page locally needs the key too:
export BONBR_KEYSTORE="$(base64 -w0 <keystore.p12>)" BONBR_KEYSTORE_PASSWORD="<password>"
docker build --secret id=BONBR_KEYSTORE,env=BONBR_KEYSTORE \
--secret id=BONBR_KEYSTORE_PASSWORD,env=BONBR_KEYSTORE_PASSWORD -t bonbr-site .
docker run --rm -p 8080:10000 bonbr-site # http://localhost:8080
Licence
MIT, see LICENSE.