# Private Health
This project aims to create the necessary building blocks in order to allow collect and analyze one's personal health data in a privacy-oriented manner. Instead of closed-source apps and dubious clouds, it should use a FLOSS stack.
## Architecture
This architecture leans on proven, reusable components wherever possible.
Refer to the diagram below for an overview: it highlights mature apps in green, partially solved areas in orange, and gaps that require mostly new development in red.
At the moment, the [HealthConnect API](https://developer.android.com/health-and-fitness/health-connect) is remains a pragmatic choice for integration and synchronisation.
It lives on the user’s phone, encrypts data, and speaks schemas for dozens of vendors. That buys time for a gentle migration: you can keep your current wearable, pull data into a local store, and steadily replace proprietary parts as FLOSS apps/adapters mature.
However, alternative solutions to the HealthConnect API are more than welcome.
```mermaid
flowchart LR
scale(("bathroom
scale"))
A["openscale"]
B["openscale sync"]
hc["HealthConnect API
(or similar)"]
fitness_tracker(("fitness
tracker"))
gb["Gadgetbridge"]
gb_sync["(Gadgetbridge sync?)"]
nc[("Nextcloud")]
bpm(("blood
pressure
monitor"))
--> bpm_app["BPM app"]
--> hc
scale-->A
--> B
--> hc
fitness_tracker
--> gb
--> gb_sync
--> hc
hc --> nha["Nextcloud (health) app"]
nha --> nc
nc --> cA["Web UI
(Dashboard, statistics)"]
nc --> cB["mobile devices"]
nc --> cC["...other clients..."]
classDef green fill:#8fb935,stroke:#333;
classDef yellow fill:#e6e22e,stroke:#333;
classDef orange fill:#e09c3b,stroke:#333,stroke-width:4px;
classDef red fill:#e64747,stroke:#333,stroke-width:4px;
class A,B,gb,hc green;
class bpm_app,gb_sync,cA,nc orange;
class nha red;
```