Under the hood · 01

The map of the engines

How one logged set flows through Logex: which sets count, how it becomes an estimated 1RM, and which engines read it to grade your session, plan the next one and track your week.

7 min read

  • overview
  • data flow
  • counting rules

Logex has no single “algorithm”. It has a handful of small engines, each answering one question, and almost all of them start from the same raw material: the sets you log. This post is the map. The rest of the series zooms into one engine at a time.

In plain terms. You log weight, reps and (optionally) how hard it felt. Logex turns every set into one comparable number, an estimated one-rep max. Everything else is a comparison of that number against your own past, against a published table, or against a weekly target.

How a set travels

How a logged set flows through Logex A set is logged, filtered by counting rules, converted to an estimated 1RM, then used by the live coach, the save-time grading, and the planner. Results are stored on the phone, feed the progress hub and weekly volume, and sync to your account. 1 · You log a set weight · reps · RPE (optional) · set type · time 2 · Counting rules complete sets · warmups never count · dropsets skip e1RM 3 · Estimated 1RM (Epley) weight × (1 + reps ÷ 30) During Live Set Coach set fatigue warm-up trim On save quality score badges · records fatigue multiplier Next time set planner exercise ideas routine checks 4 · Stored on your phone (SQLite) pounds · local-first · derived columns recomputed on device Progress hub PRs · plateaus goals · projections Weekly volume fractional sets per muscle vs your target zones 5 · Sync copy to your account queued retries · never replaces a bigger local history
One set in, many readers out. Everything in the middle is computed on your device.

Ground rules every engine shares

Weights are pounds inside, whatever you see

Every stored weight is in pounds. Kilograms exist only at the screen edge: when you type a weight and when it is shown. Details are in Units, storage and sync.

Which sets count

Engines agree on one base rule and then differ in a few places on purpose.

Question Rule Where it applies
Is a set complete? Reps above 0, weight above 0 (0 or blank is fine for bodyweight and assisted lifts), and not mid-edit Everywhere
Does it count toward volume and set counts? Complete, and not a Warmup or Warmdown Exercise history, Progress badge, Live Set Coach
Does it count toward e1RM, PRs and rep records? The rule above, and also not a Dropset Records, PR badges, Live Set Coach
Does it drive the saved quality score? Only Working, Volume, AMRAP and 1RM sets Set quality, exercise quality, saved session e1RM
Does it count toward the Progress hub? Anything whose type does not contain “warm”, “drop” or “assisted” Plateaus, trends, PRs and weekly tonnage on the hub
Does it count toward weekly muscle volume? Complete, and not a Warmup, Warmdown or Cooldown. Sets rated below RPE 6 count less Weekly stimulus, session rings, finish check

For pull-ups, dips, push-ups and assisted machines, every engine that needs a weight uses the load you actually moved (a share of your bodyweight plus what you added, or minus the assistance), never the number in the field. See The exercise catalogue, bodyweight and assisted loads.

Records are never scaled

Several engines adjust expectations when you are tired (later in a workout) or returning from a break. None of them ever change a record. A PR is judged on the raw number you lifted. See Warmups and fatigue.

Missing data means no verdict

The code is consistent about not inventing things:

  • A lift you have never logged is not “your first time” just because a data load failed. The Lab Rat badge needs positive evidence.
  • The Statistics screens show a blank instead of a made-up number when there is not enough data. One legacy score, strengthIndex, is hard-coded to null with a comment that it is “not computed from any real strength data”.
  • Without a bodyweight, a pull-up’s load is unknown, not guessed: the sets still count for your muscles, but no e1RM or volume is made up.
  • An empty profile produces exactly the default settings, so skipping onboarding changes nothing. See Personalization.

The engines at a glance

Engine The question it answers Post
Epley e1RM and rep bands How strong was that set, in one number? Estimated 1RM and rep bands
Strength standards Where does my lift sit against published tables for my bodyweight? Strength standards and tiers
Baselines, set quality, badges Was today good compared with me, and which achievements did I earn? Set quality, baselines and badges
Live Set Coach What does my next set need to be to beat last time? Live Set Coach
Fatigue and warm-up engines How tired or warm am I, so what should I expect? Warmups and fatigue
Weekly stimulus How many effective sets did each muscle get this week? Weekly volume and sub-muscles
Exercise catalogue and load model Which muscles does this exercise train, and what load did a pull-up really move? The exercise catalogue, bodyweight and assisted loads
Suggestions and routines Which exercise fills the biggest gap? Is this routine complete? Smart suggestions
Set planner What warm-ups and working sets should I do today? Adaptive planning
Set types, attachments and supersets What does this set count toward? Which drop set next? Which sessions am I compared with? Set types, attachments and supersets
Progress hub Am I improving, stalled or on pace for a goal? The Progress hub
Personalization How does my profile change all of the above? Personalization
Storage and sync Where does my data live and how is it kept safe? Units, storage and sync

What is deliberately not covered

Two pieces of code exist in the repository but nothing in the app reaches them at release head: the XP and level system in services/XPService.js (the product moved from gamification to strength standards) and the dashboard layer of the older StatisticsService, which includes a DOTS powerlifting score and a consistency score (other helpers in that file, such as muscle balance, are in use). Both were checked by searching every screen, component and hook for callers. If that changes, they will get their own posts.

How to read the rest

Each post follows the same shape: a plain-language explanation, the actual formula with the real constants, a worked example with concrete numbers, the limits and edge cases, and a Source list naming the app files. Where the app’s own documentation and its code disagree, the posts follow the code.

Source

Written from these files in the Logex app (release head). Constants and formulas above are copied from them.

  • PRODUCT.md
  • docs/QUALITY_AND_BADGE_FORMULAS.md
  • utils/exerciseSnapshot.js
  • utils/stimulusModel.js
  • utils/loadModel.js
  • utils/liveSetCoach.js
  • utils/trainingInsights.js
  • services/WorkoutCalculationService.js
  • services/workoutService.js
  • services/WeeklyStimulusService.js
  • services/ProgressService.js
  • services/XPService.js