Mission Built

The MealStack Schema 0.9.3 · Field set

Macros

Grams of protein, carbs and fat, and the kcal they come to.

The three numbers the whole app runs on, and the one it derives from them. Grams of protein, carbohydrate and fat; kilocalories are always 4 × protein + 4 × carbs + 9 × fat and are never stored as a fourth independent number, so a document can never disagree with itself.

Reusable: macros is nested wherever a plate, a target or a day has a value, and the field names are the same in every place.

Reused as

  • ingredient.perWhat one unit of the ingredient is worth.
  • portion.macrosWhat this many units come to.
  • meal.statedTyped figures for a plate that was never weighed.
  • meal.macrosWhat the plate comes to, derived.
  • target.trainingThe training-day target.
  • target.recoveryThe recovery-day target.
  • day.targetThe target the day ran against.
  • day.consumedWhat was eaten.
  • day.meal.consumedWhat this meal was when it was eaten.

macros.* never appears at the top level; only nested.

Fields

  1. macros.protein core float required

    Grams of protein. Never negative.

    Example55

  2. macros.carbs core float required

    Grams of carbohydrate. Never negative.

    Example73

  3. macros.fat core float required

    Grams of fat. Never negative.

    Example20

  4. macros.kcal core float

    Kilocalories, always 4 × protein + 4 × carbs + 9 × fat. Derived, never independent: a writer may include it for readers that cannot multiply, and a reader recomputes it and ignores the stored value.

    Example692