An example here for "run locally" would be Apple Health, which uses end-to-end encryption to sync data between your devices, does all the analytics stuff locally, and has a extensive permissions scheme for voluntary sharing of info with doctors or research programs.