Browse Use Cases

Workout and set builder

Show what a workout covers as it is built, so a user can see the gap before they train.

A builder is a list of exercises until you can see what it adds up to.

Collect the muscle ids from the exercises already added, and render them as one figure. The picture updates as the workout grows, and the gap becomes obvious without anybody reading a list.

Render the accumulated muscles

Take the union of the muscle ids across the chosen exercises, and split them by how hard each is worked:

/v1/{key}/body/male/back.webp?primary=lats,glutes&secondary=hamstrings,triceps&w=320

Both sides of a body are rarely covered by one session. Showing front and back together is what makes the gap visible.

Keep URLs stable

Sort the ids before you build the URL. primary=glutes,lats and primary=lats,glutes are the same request and two different addresses, and only one of them is already in your users’ browser caches.

A builder generates a new combination on every tap. See caching for how long each response can be reused.

Suggest what is missing

When a builder wants to suggest what is missing, ask which muscles the sheet on screen can actually show:

curl 'https://api.gymassets.dev/v1/muscles?figure=male&side=back' \
  -H "Authorization: Bearer $GA_SECRET_KEY"

Subtract what the workout already covers and you have a suggestion list that is guaranteed to light up when the user acts on it.