StudentMargaretP
Order10
CategoryUser
Prompt TitlePull pre-existing exercise list
Prompt

Fetch the exercise data from https://raw.githubusercontent.com/yuhonas/free-exercise-db/main/dist/exercises.json and write a seed script to import it into the exercises table. Map fields as follows:

  • namename
  • categoryexercise_type, using this mapping: strength/powerlifting/strongman/olympic weightlifting/plyometrics → 'strength', cardio → 'cardio', stretching → 'mobility'
  • primaryMuscles[0] (first entry only) → primary_muscle, normalized to this fixed list: [chest, back, shoulders, biceps, triceps, forearms, abs, quads, hamstrings, glutes, calves, full_body] — map the source's more granular muscle names (e.g. "lats", "middle back", "lower back" → "back"; "abdominals" → "abs"; "quadriceps" → "quads") into this list
  • equipmentequipment (leave null if null in source)
  • Join the instructions array into a single description field, one sentence per line
  • Set measurement_type: 'reps_weight' for strength/powerlifting/strongman/olympic weightlifting, 'time' for stretching, 'distance' for cardio
  • Set is_custom = false and created_by = NULL for all seeded exercises
  • Skip the images, force, and level fields — not needed for v1
  • Run the import and report how many exercises were inserted, and flag any rows that failed the category or muscle mapping so I can review them
ProgressNot Started