Macrofit Dev Reference
App Logic — Visual Spec

Meal & Snack Selection Logic

Complete visual specification for the dev team. Covers Macro Points math, the dual-path selection flow (meals-first or snacks-first), budget bar behavior, finalization, and swap options.

Dev Priority: Dual-path order logic is currently wrong

Section 01 — Foundation

Macro Points System

Core Formula

Macro Points = (Calories from Carbs + Calories from Fat) ÷ 10 Snack Macro Points = Meal Macro Points ÷ 7 Because snacks are selected for the whole week — 7 snack days = 1 meal-equivalent Protein = NOT included in Macro Points — handled in backend automatically

Examples — Meal Macro Points (decimal values are normal)

MealMacro PointsCarb+Fat CaloriesNote
1 Egg, 1 Slice of Bread & Protein Shake14.0 pts140 calLight breakfast
Almond Butter Toast with Eggs (Women's)23.5 pts235 cal
Almond Butter Toast with Eggs (Men's)46.9 pts469 calMen's version
Ashley's Biscuits & Gravy Casserole31.2 pts312 calBreakfast
Angela's Chicken Fajita Bowl (Women's)25.5 pts255 calLunch/Dinner
Beef Ramen27.7 pts277 cal

Critical Rule: Every Snack Group Must Hit 19g Protein

Customers do not build their own snack combinations. They select from pre-built Snack Groups — each group is a curated combination of 1–3 snack items that collectively total a minimum of 19g of protein (groups can exceed 19g). The Macro Points value of a snack group is derived from the combined CF Calories of all items in the group divided by 10. Customers pick 7 snack groups (one per day of the week).

Real Snack Groups — from Admin (each ≥ 19g protein)

Snack GroupProteinSnack PtsTotal Cals
Jack Link's Beef Jerky – Zero Sugar (36g)19g0.4 pts105.5 cal
Premier Protein Shake (any flavor) + Fruit from List B19g1.8 pts255.5 cal
1UP Nutrition Clear Protein Isolate + Hillshire Snacking Salame (78g)19g3.5 pts390.0 cal
Key Lime Pie Protein Ice Cream (Ninja Creami Recipe)19g3.9 pts369.4 cal
Hillshire Snacking Dips + Oikos Triple Zero Yogurt (any flavor)19g3.9 pts362.0 cal
Macrofit Fruit Dip + Fruit List A + Chomps Beef Jerky (32g)19g3.9 pts379.8 cal
Brown Sugar Oatmeal Cookie Protein Ice Cream (Ninja Creami Recipe)19g4.0 pts368.9 cal
Hillshire Snacking Dips + Premier Protein Shake (any flavor)19g4.0 pts429.0 cal
Hillshire Snacking Dips + Built Puff Bar (any flavor, 40g)19g4.5 pts409.0 cal
Hillshire Snacking Dips + Barebells Protein Bar (55g)19g5.4 pts486.0 cal

Recommended Budget Split (100 pt example)

Total Budget

100 pts

assigned by system

Meal Starting Guide

75 pts

~75% — starting reference only

Snack Starting Guide

25 pts

~25% — starting reference only

Goal

Use All 100

spend all points across meals + snacks

Macrofit Internal — App Logic Spec · For dev team use only