I’m not sure. I’ve been mulling over how to integrate nostr in to the fitness app I’ve been working on for a while.

I could create the workouts in a JSON format post those to the note and then have the client render them in a nice format.

The difficult part is standardizing the way workouts are held in JSON.

For example, if I was to export my workout data in JSON and put it in a most note it looks like this

{"name":"Fran","worksets":[{"exercises":[{"name":"Thruster","specs":[{"mass":{"unit":{"converter":{"coefficient":0.453592,"constant":0},"symbol":"lb"},"value":95}},{"reps":21}]},{"specs":[{"reps":21}],"name":"Pull-up"},{"specs":[{"reps":15},{"mass":{"value":95,"unit":{"converter":{"coefficient":0.453592,"constant":0},"symbol":"lb"}}}],"name":"Thruster"},{"specs":[{"reps":15}],"name":"Pull-up"},{"name":"Thruster","specs":[{"mass":{"value":95,"unit":{"symbol":"lb","converter":{"coefficient":0.453592,"constant":0}}}},{"reps":9}]},{"name":"Pull-up","specs":[{"reps":9}]}],"bounds":{"timePriority_rounds":1,"timePriority_reps":0}}]}

Or a workout like Starting Strength may look like this:

{"name":"Starting Strength Phase 1A","worksets":[{"exercises":[{"name":"Barbell Squat","specs":[{"reps":5}]},{"name":"Barbell Squat","specs":[{"reps":5}]},{"name":"Barbell Squat","specs":[{"reps":5}]}],"bounds":{"elementPriority":true}},{"bounds":{"elementPriority":true},"exercises":[{"name":"Barbell Press","specs":[{"reps":5}]},{"specs":[{"reps":5}],"name":"Barbell Press"},{"name":"Barbell Press","specs":[{"reps":5}]}]},{"bounds":{"elementPriority":true},"exercises":[{"specs":[{"reps":5}],"name":"Barbell Deadlift"}]}]}

So clients like Damus and whatnot are just going to get raw JSON, which isn’t a problem per se.

Let me know. I’m really interested in working on this problem.

Reply to this note

Please Login to reply.

Discussion

Yes! Someone working on this 💪 great to hear.

How does JSON compare to this approach in terms of being an easy standard for similar nostr apps to use? nostr:nevent1qqsxuckqe6q5zus3wem5r3z8umnh4tu99tmgvc36h7te533hfjvzzrqppemhxue69uhkummn9ekx7mp0qgsru22d9lfnnwck54qr4phrvey50h2q33xc0gqxv5j03ftn4efu4rsrqsqqqqqpcavs7m

I'm very new to the dev-side of these choices and need help comparing pros and cons.

Seems like you'd have quite a bit more freedom with the JSON option. But that's not always a good thing 😜 .

I’ll have to look into those other event types. It’s a tough nut to crack because people may want wildly different things. Straight lifting apps provide one style, cross training another and HIIT and CrossFit another…