Skip to content

Open Public Domain Exercise Dataset in JSON format, over 800 exercises with a browsable public searchable frontend

License

Notifications You must be signed in to change notification settings

JeremyXXXuuu/exercise-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Free Exercise DB 💪   Lint & Deploy Site to Github Pages

Open Public Domain Exercise Dataset in JSON format, 800+ exercises & images with a browsable public searchable frontend

Why?

I started building another fitness related app and was looking for free/open source exercise lists and imagery I stumbled upon exercises.json which was amazing though the data wasn't structured the way I wanted it and I also wanted a free browsable/searchable frontend to the data inspired by this issue so I restructured the data and built a simple frontend to it :)

What do they look like?

All exercises are stored as seperate JSON documents and conform to the following JSON Schema eg.

{
  "name": "Alternate Incline Dumbbell Curl",
  "force": "pull",
  "level": "beginner",
  "mechanic": "isolation",
  "equipment": "dumbbell",
  "primaryMuscles": [
    "biceps"
],
"secondaryMuscles": [
  "forearms"
],
"instructions": [
  "Sit down on an incline bench with a dumbbell in each hand being held at arms length. Tip: Keep the elbows close to the torso.This will be your   starting position."
],
"category": "strength",
"images": [
  "Alternate_Incline_Dumbbell_Curl/0.jpg",
  "Alternate_Incline_Dumbbell_Curl/1.jpg"
]}

See Alternate_Incline_Dumbbell_Curl.json

How do I use them?

You can use the JSON files independantly or combine them into a single JSON file containing an array of objects using the following make task

make dist/exercises.json

Note: requires jq

Importing into PostgreSQL

To combine all JSON files into Newline Delimeted JSON suitable for import into PostgreSQL use the following make task

make dist/exercises.nd.json

Note: requires jq

See also Makefile

Browsable frontend

Screenshot of browsable frontend

There is a simple searchable/browsable frontend to the data written in Vue.js available at https://yuhonas.github.io/free-exercise-db/, all related code is in the ./site directory

Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Run End-to-End Tests with Cypress

npm run test:e2e:dev

This runs the end-to-end tests against the Vite development server. It is much faster than the production build.

But it's still recommended to test the production build with test:e2e before deploying (e.g. in CI environments):

npm run build
npm run test:e2e

Lint with ESLint

npm run lint

TODO

The following fields are incomplete in some JSON files and in such have had to allow null in schema.json

  • force
  • mechanic
  • equipment

There are also a small number of duplicate images eg.

jdupes --summarize --recurse .

Scanning: 2620 files, 874 items (in 1 specified)
25 duplicate files (in 22 sets), occupying 809 KB

Contribute

Contributions are always welcome! Please read the contribution guidelines first.

Special Thanks 🙇

About

Open Public Domain Exercise Dataset in JSON format, over 800 exercises with a browsable public searchable frontend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 56.6%
  • JavaScript 34.0%
  • HTML 5.0%
  • Makefile 4.1%
  • CSS 0.3%