No description
  • Dart 96%
  • Python 2.8%
  • Ruby 0.5%
  • Swift 0.4%
  • Shell 0.2%
Find a file
Tux 75fe86c17c Resolve corrected health entries via last-ingested-wins read path
When a reading is edited in the source health app (e.g. a mistyped manual
weight is corrected), the 14-day reconcile window re-reads it and appends
it — append-only forbids rewriting the original — so both same-timestamp
values sit on disk. The read path previously returned whichever sorted
first, often the stale one.

The query layer now collapses scalar readings that share a source and
effective instant down to the latest-ingested (OMH header
creation_date_time), so the correction supersedes the stale value on the
dashboard without any file rewrite. Applied to the weight and heart-rate
read paths (latestScalar, scalarSeries, dailyHeartRate); steps and sleep
keep their existing dedup. Covers value corrections at an unchanged
timestamp; timestamp edits and deletions still await the Phase 8
change-token work.

Keyed on a (name, second) record rather than a delimited string so a
source name can't collide two measurements. Documented in DESIGN.md §4.3
as a read-rule both the mobile and Nextcloud frontends must apply.

Pre-commit gate: code-reviewer PASS, security-auditor SECURE.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 09:18:05 +02:00
.claude Bootstrap Cairn: Flutter scaffold, architecture, docs, licensing 2026-06-14 23:19:01 +02:00
.forgejo/workflows Rebrand to LuminaApps; bundle id com.luminaapps.cairn 2026-06-23 13:01:25 +02:00
.githooks Fix Android workout/sleep reads; add secret-guard pre-commit hook 2026-06-15 16:08:12 +02:00
android Release 0.1.3: fix F-Droid build (rm globs, signing scrub) 2026-06-23 14:46:01 +02:00
assets/icon Add Cairn app icon and capitalize the app name 2026-06-17 13:09:24 +02:00
docs Resolve corrected health entries via last-ingested-wins read path 2026-06-24 09:18:05 +02:00
fastlane/metadata Release 0.1.3: fix F-Droid build (rm globs, signing scrub) 2026-06-23 14:46:01 +02:00
fdroid Add AutoName to F-Droid recipe (clean checkupdates --auto) 2026-06-23 18:38:23 +02:00
ios Fix iOS HealthKit entitlement; pin iOS deployment target 14.0 2026-06-24 08:36:22 +02:00
lib Resolve corrected health entries via last-ingested-wins read path 2026-06-24 09:18:05 +02:00
test Resolve corrected health entries via last-ingested-wins read path 2026-06-24 09:18:05 +02:00
tool Rebrand to LuminaApps; bundle id com.luminaapps.cairn 2026-06-23 13:01:25 +02:00
.fvmrc Bootstrap Cairn: Flutter scaffold, architecture, docs, licensing 2026-06-14 23:19:01 +02:00
.gitattributes Bootstrap Cairn: Flutter scaffold, architecture, docs, licensing 2026-06-14 23:19:01 +02:00
.gitignore Add internationalization (English + German) 2026-06-17 11:56:46 +02:00
.metadata Bootstrap Cairn: Flutter scaffold, architecture, docs, licensing 2026-06-14 23:19:01 +02:00
analysis_options.yaml Add internationalization (English + German) 2026-06-17 11:56:46 +02:00
CHANGELOG.md Resolve corrected health entries via last-ingested-wins read path 2026-06-24 09:18:05 +02:00
CLAUDE.md Bootstrap Cairn: Flutter scaffold, architecture, docs, licensing 2026-06-14 23:19:01 +02:00
flutter_launcher_icons.yaml Add Cairn app icon and capitalize the app name 2026-06-17 13:09:24 +02:00
l10n.yaml Add internationalization (English + German) 2026-06-17 11:56:46 +02:00
LICENSE Bootstrap Cairn: Flutter scaffold, architecture, docs, licensing 2026-06-14 23:19:01 +02:00
pubspec.lock Add opportunistic background sync (Phase 5) 2026-06-17 13:57:31 +02:00
pubspec.yaml Release 0.1.3: fix F-Droid build (rm globs, signing scrub) 2026-06-23 14:46:01 +02:00
README.md Bootstrap Cairn: Flutter scaffold, architecture, docs, licensing 2026-06-14 23:19:01 +02:00

Cairn

A personal health-data aggregator that you own end to end.

Cairn reads your wearable and phone health data from the platform's own health store (Apple HealthKit / Android Health Connect), normalizes it into an open, documented file format (Open mHealth / IEEE 1752.1, as sharded JSON Lines), and syncs it into a Nextcloud you control. No central server, no proprietary database, no vendor lock-in — the files in your Nextcloud are the single source of truth.

It is deliberately aimed at privacy-conscious people and self-hosters who run (or will happily run) their own Nextcloud. "Bring your own Nextcloud" is the feature, not a barrier.

Components

  • Mobile app (Flutter, iOS + Android) — reads the health store, writes OMH files, syncs over WebDAV. The only writer. (MIT)
  • Nextcloud web app (PHP + Vue, planned) — an optional, read-only second frontend over the same files. (AGPL-3.0-or-later — Nextcloud app store)

Status

Early development. The repository currently contains the project foundation: Flutter scaffold, architecture skeleton, and documentation. See the phased plan in docs/DESIGN.md §15.

Documentation

License

The mobile app and the OMH file format are released under the MIT License. The future Nextcloud web app will ship from its own subtree under AGPL-3.0-or-later (it links AGPL Nextcloud server code); see docs/DEVELOPMENT.md §5.

Not a medical device

Cairn aggregates and visualizes data. It makes no diagnostic, treatment, or clinical claims.