Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Why I built an open source alternative to Terra for wearable data

Description and use

The author built Open Health Sync, a self‑hosted wearable data aggregator that preserves raw payloads, outputs FHIR R4, and runs on modest hardware, offering a cheaper alternative to paid hosted APIs.

Problem

Existing hosted APIs like Terra are expensive, introduce third‑party data paths, lose raw payloads, and do not enforce FHIR R4 standards, making them unsuitable for projects that need cost control, full data retention, and clinical interoperability.

Outcome

Open Health Sync achieves 2–3× faster end‑to‑end ingestion than Open Wearables, uses ~22 MB idle memory versus ~494 MB, and stores raw payloads for unlimited retention while providing FHIR R4 and other export formats.

Workflow

  • Clone the repository and set up environment variables
  • Generate an encryption key and start the Docker Compose stack
  • Run the health‑check command
  • Seed synthetic data for demo or import real Apple Health export
  • Use the REST API or FHIR endpoints to query merged data
  • Delete user data via DELETE /v1/users/{id} if needed

Evidence

Every wearable speaks its own dialect. Apple Health sends one JSON line per HealthKit sample, with heart rate in count/min and oxygen saturation as a fraction. Withings sends a daily activity object keyed by date and intraday series keyed by Unix epoch. Oura, WHOOP and Fitbit each have their own idea of what a day, a device and a duplicate are.

Source

It idles at about 22 MB of memory and runs on a Raspberry Pi 5.

Source

Open Health Sync stored the records 2 to 3 times faster end to end and used about 22 MB of memory idle against about 494 MB, while Open Wearables used 3.4 times less disk.

Source

  • Record date: 2026-10-18T03:41:01.254Z