Dilden / helth

PWA for tracking nutrients and water
https://helth.app/
GNU General Public License v3.0
7 stars 1 forks source link

Abstract components away from being specific to nutrients #117

Closed Dilden closed 6 months ago

Dilden commented 1 year ago

Using the nutrients from $utils/nutrients.js, all counters should be dynamically generated. Users should be able to disable/enable certain counters in their settings. Charts and various other features are also affected by this.

  1. Charts (ie WaterChart, ProteinChart, NutrientsChart, CaloriesChart)
  2. Counters (ie. counts/Calories, counts/Water, etc.)
  3. Goals & limits (Goals are currently only set for protein and water while limits are only set for calories and sodium).
  4. db.js inserts default goals, counts, and limits for each nutrient. May have to add more defaults or even better, allow the components/charts to have a default value which is saved when the user takes an action.

This is also a good time to abstract water away as a nutrient though it doesn't come as a value from the OpenFoodFacts AP (at least, I don't think it does).

Related issues: