wger icon indicating copy to clipboard operation
wger copied to clipboard

Track additional (probably customized?) body measurements

Open financelurker opened this issue 4 years ago • 6 comments
trafficstars

Use case

I recently stumbled over wger and began using it for tracking my workouts. Since I'm a former Apple Health user to keep track of these things, besides nutrients and workouts there are also other things you can keep track of to have an holistic overview of your health state:

  • sleep-data
  • body measurements
    • BMI
    • waist circumference (cm)
    • body fat percentage (%)
    • height (cm)
    • body temperature (°C)
    • lean body mass (kg)
    • blood pressure (systolic/diastolic)
    • blood glucose level (mg/dL)
    • BMI
    • heart rate (BPM)
    • heart rate variability (ms)
    • resting heart rate (BPM)
    • walking heart rate average (BPM)
    • cardio fitness (VO2 max)
    • ...

And it would be awesome if you can keep track of this data within wger as well - so people, coming from the Apple ecosystem have a viable self-hosted alternative.

Proposal

It's probably a lot of work to implement each measurable compartment here, so my proposal is:

  • provide a generic way of defining additional body measurement types (name, unit and amount of data points per measurement - the latter one is to enable "blood pressure" and sleep-data "from"-"to")
  • provide a generic way for letting people add data to these previously added body measurement type time-series
  • provide a generic overview for each defined body measurement type to show the time-series data
  • provide some pre-defined body measurement types (like the ones above) that users can add without further customization needed

I know, this is probably a huge feature request, but in my point of view this would fit perfectly into wger and I wouldn't want to have a separated other tool for that to completely switch from Apple Health to wger (besides the lack of an official AppStore app).

financelurker avatar Nov 07 '21 05:11 financelurker

Hi! This is actually already implemented in the flutter app (more or less the way you describe it), but not yet on the web app. You can define your category and the corresponding unit and then add measurements to it which will be plotted on a chart. All of this is pretty simple at the moment, but the base is there :)

rolandgeider avatar Nov 07 '21 09:11 rolandgeider

Wow, that's a great start. I guess that this feature requests just boils down to enabling this functionality in the web ui.

Question: Is my assumption right, that I have to build the flutter app for iOS on my own machine, and then upload it to my iPhone with my own certificates? (I know, this question would be better asked in the flutter repository)

financelurker avatar Nov 08 '21 04:11 financelurker

Rather than just enabling it, implement it 😅

Yes, you'll have to build it yourself for now. I'd love to publish it on the app store, but that will have to wait

rolandgeider avatar Nov 08 '21 08:11 rolandgeider

Hi! We are trying to implement this function but we've been unable to find the backend codes for this part. Do you have any suggestions what files we should look at in order to fully implement this function?

jiany18 avatar Apr 30 '22 17:04 jiany18

Hi @jiany18 !

Currently there isn't any code for this for the web UI, only for the flutter app (e.g. here or here).

We want to implement new features directly in react to allow for more dynamic content, so if you want to help with this (🙌), that's where to start, take a look at the react repo This feature isn't very complicated, there's two endpoints, /api/v2/measurement-category/ and /api/v2/measurement/. The category has a name and a unit, such as "body fat" and "%" and the entries just reference a category and are plotted.

rolandgeider avatar May 02 '22 13:05 rolandgeider

https://github.com/wger-project/react/issues/13

rolandgeider avatar Sep 21 '22 19:09 rolandgeider

What is your strategy eventually? Flutter or react?

matteopolleschi avatar Apr 22 '23 08:04 matteopolleschi

Well, both. The mobile app uses flutter and the website react

rolandgeider avatar Apr 22 '23 08:04 rolandgeider

Have you tried flutter web? Awfully slow but really "write once, deploy everywhere"...

matteopolleschi avatar Apr 22 '23 08:04 matteopolleschi

Yeah. I still feel it's not quite there yet

rolandgeider avatar Apr 22 '23 09:04 rolandgeider

Forgot to close this issue. This is available on the web app

rolandgeider avatar Oct 10 '23 12:10 rolandgeider