- Dart 96%
- Python 2.8%
- Ruby 0.5%
- Swift 0.4%
- Shell 0.2%
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> |
||
|---|---|---|
| .claude | ||
| .forgejo/workflows | ||
| .githooks | ||
| android | ||
| assets/icon | ||
| docs | ||
| fastlane/metadata | ||
| fdroid | ||
| ios | ||
| lib | ||
| test | ||
| tool | ||
| .fvmrc | ||
| .gitattributes | ||
| .gitignore | ||
| .metadata | ||
| analysis_options.yaml | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| flutter_launcher_icons.yaml | ||
| l10n.yaml | ||
| LICENSE | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| README.md | ||
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
- docs/DESIGN.md — full design and rationale (source of truth).
- docs/DEVELOPMENT.md — set up a dev environment from scratch (Flutter and the future Nextcloud app).
- CHANGELOG.md — notable changes.
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.