Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NIP-101e: Workout Events #1816

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DocNR
Copy link

@DocNR DocNR commented Mar 2, 2025

NIP-101e: Workout Events

This NIP proposes a standardized way to represent fitness and workout data in Nostr, including:

  • Exercise Templates (kind: 33401) for storing reusable exercise definitions
  • Workout Templates (kind: 33402) for defining workout plans
  • Workout Records (kind: 1301) for recording completed workouts

The format provides structured data for fitness tracking while following Nostr conventions for data representation.

Rationale

Many fitness applications use proprietary formats, locking user data into specific platforms. This NIP enables decentralized fitness tracking, allowing users to control their workout data and history while facilitating social sharing and integration between fitness applications.

@TheWildHustle
Copy link

TheWildHustle commented Mar 19, 2025

I'm working on a run tracking app on Nostr and love the NIP-101e proposal. I'd like to suggest some additional running-specific extensions that would enhance the proposal's utility for cardio activities while maintaining compatibility with the established framework.

Suggested Additions to NIP-101e for Running Activities

Running Exercise Template

For running activities, I suggest a standardized exercise template format:

{
  "kind": 33401,
  "content": "Easy pace run on flat terrain. Focus on maintaining consistent effort.",
  "tags": [
    ["d", "<UUID>"],
    ["title", "Easy Run"],
    ["format", "distance", "duration", "pace", "gps_data", "elevation_gain"],
    ["format_units", "km", "seconds", "min/km", "polyline", "m"],
    ["equipment", "cardio"],
    ["difficulty", "beginner"],
    ["t", "running"],
    ["t", "cardio"]
  ]
}

Running-Specific Workout Record

Run tracking records could then be represented as:

{
  "kind": 1301,
  "content": "Morning run felt great. Perfect weather conditions.",
  "tags": [
    ["d", "<UUID>"],
    ["title", "Morning 5K"],
    ["type", "cardio"],
    ["start", "1706454000"],
    ["end", "1706455800"],
    ["exercise", "33401:<pubkey>:<UUID-running>", "<relay-url>", "5", "1800", "4:52", "encoded_polyline_string", "125"],
    ["cadence_avg", "172", "spm"],
    ["heart_rate_avg", "142", "bpm"],
    ["weather_temp", "18", "c"],
    ["weather_humidity", "65", "%"],
    ["weather_condition", "partly_cloudy"],
    ["completed", "true"],
    ["t", "running"]
  ]
}

Split Data

For analyzing portions of runs:

{
  "kind": 1301,
  "tags": [
    ["split", "1", "1000", "m", "3:45", "155", "bpm"],
    ["split", "2", "1000", "m", "3:52", "158", "bpm"]
  ]
}

These additions would enhance the practical utility of NIP-101e for run tracking applications while maintaining compatibility with the core structure of the original proposal. They extend the "Additional parameters" flexibility mentioned in the NIP while providing standardized tags for the running-specific metrics that matter most to runners.

@Sebastix
Copy link

We need this for other GPX based activities too, like cycling

See #1423

@DocNR
Copy link
Author

DocNR commented Mar 19, 2025

@erskingardner had some ideas for storing gpx data on blossom servers that we can then reference in the workout record event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants