Musclog

AI-powered fitness & nutrition tracking — free & open source.

Smart workout tracking
AI photo nutrition logging
Detailed progress charts
100% private & on-device
Try it live
AndroidiOSWeb
Download the AppScan to download for Android
Back to all posts

Browse by category

Engineering articles

All Musclog blog posts filed under Engineering.

Engineering

My mascot was a kettlebell named Loggy, until I remembered what a log is

Musclog is a logging app, so I named the mascot Loggy and drew a kettlebell. Eight months later I noticed a log is a piece of wood. This is how he became a log, how twenty poses and fifty faces come out of one library of parts, why his green follows your theme, and why he is now public domain.

MusclogLoggySVGReact NativeExpoAnimationDesignOpen Source
Read article
Engineering

The first frame should already know your theme

On a big diary, Musclog opened in the default theme, in the wrong language and with your lock off, then corrected itself seconds later. Here is the small settings mirror that fixed the first frame, and the repeated decryption that was making the wait so long.

MusclogReact NativeExpoWatermelonDBPerformanceStartupEncryption
Read article
Engineering

My weekly review had buttons that could never work

Musclog now changes your calorie targets once a week, after you look at the evidence and say yes. Building it meant dated target periods, an honest definition of "enough data", and fixing two buttons that pointed at the one day that could never help.

MusclogNutritionReact NativeWatermelonDBTypeScriptUX
Read article
Engineering

One workout screen, two views, and 1,662 lines I got to delete

The live workout screen in Musclog had grown into a single 1,662-line file. Rebuilding it as two views (one set at a time, or the whole workout as a table) over one shared controller fixed bugs I did not know I had, starting with the second exercise calling its first set "Set 4".

MusclogReact NativeExpoTypeScriptRefactoringUX
Read article
Engineering

My workout app now explains every number it changes

Progressive overload that silently rewrites your weights is a bug you can't see. Here is how Musclog turned every automatic change into data with a reason attached, and the three coaching bugs the explanations helped me find before release.

MusclogReact NativeTypeScriptProgressive OverloadFitnessUX
Read article
Engineering

Greedy plate math is wrong the moment your gym runs out of plates

Putting the heaviest plate that fits on the bar works until your gym only owns one pair of each. Musclog now models your gym and solves plate loading as a small bounded knapsack, so the weights it suggests are weights you can actually load.

MusclogTypeScriptAlgorithmsFitnessDynamic Programming
Read article
Engineering

I lost my app icon, so now a script draws six of them

I made the Musclog icon once, by hand, and kept nothing. When the app grew six themes I rebuilt it as three layers and a script, then made the launcher icon follow the theme on Android and iOS without breaking deep links.

MusclogReact NativeExpoAndroidiOSsharpApp IconsDesign
Read article
Engineering

Adding light mode exposed my fake theme system

Musclog already had a theme file. Then I added five selectable palettes and discovered that colors, NativeWind variables, system mode, camera overlays, and component decisions were all separate systems pretending to be one.

MusclogReact NativeExpoNativeWindTypeScriptDesign Systems
Read article
Engineering

My camera took 25 seconds to take a photo

A shutter stall that only existed in release builds, survived eight versions and four wrong root causes, and turned out to be one background thread shared by every Expo module in the app.

MusclogReact NativeExpoAndroidCameraXKotlinPerformanceDebugging
Read article