Giter Club home page Giter Club logo

free-exercise-db's Introduction

Free Exercise DB ๐Ÿ’ช ย  Test, Lint & Deploy Site to Github Pages License: Unlicense

Open Public Domain Exercise Dataset in JSON format, 800+ exercises 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 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.

{
  "id": "Alternate_Incline_Dumbbell_Curl",
  "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

To further explore the data, you can use lite.datasette.io

How do I use them?

You can check the repo out and use the JSON files and images locally

Alternatively

You can leverage github's hosting and access the single or combined exercises.json and prefix any of image path's contained in the JSON with https://raw.githubusercontent.com/yuhonas/free-exercise-db/main/dist/exercises/ to get a hosted version of the image eg. Air_Bike/0.jpg or leverage something like imagekit.io for dynamic image resizing which is utlized on the frontend example site

Build tasks

There are a number of helpful Makefile tasks that you can utilize

Linting

To lint all the JSON files against the schema.json use

make lint

Combining into a single JSON file

If you make changes to any of the exercises or add new ones, to recombine all single JSON files into a single JSON 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 Importing JSON into PostgreSQL using COPY

Browsable frontend

Screenshot of browsable frontend

There is a simple searchable/browsable frontend to the data written in Vue.js available at 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

Incomplete fields

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

  • force
  • mechanic
  • equipment

Images

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

Contributors

Made with contrib.rocks.

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

Special Thanks ๐Ÿ™‡

free-exercise-db's People

Contributors

jtucker2 avatar yuhonas avatar zergo0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

free-exercise-db's Issues

Enquiry regarding the license status of the images in your dataset

Hi,
Thanks for the dataset. I am planning on working on a fitness app & this dataset will contribute a lot in that regards. Thanks again

However I was having a very important doubt regarding the license status of the images in your dataset.
Are the images in your dataset available without any copyright issue/open sourced & can be used in a commercial app without any issues later on?

Thanks & Regards

License of Images?

Hello,

I was wondering where you got the images from. I want to use your database, but I'm not sure if the images are royalty free, so I wanted to ask about it.

Thank you!

Translations

I'm thinking of utilizing your work in a project of mine - but I'd prefer to have texts in my own language. I'd be willing to do quite a bit of translation work myself, but it would be nice if translation could be a collaborative effort and not something done locally by individuals.

Would you be interested in implementing some kind of solution that supports this process?

Alternate names for exercises

Thanks for this really helpful project!

I am trying to port a workout dump that uses exercises from ExerciseDB. Since most of the exercises have a different name here, it is quite difficult to do so. I suggest we add a new key to each exercise called alternateNames: string[]. This will allow others users to port their own data to this dataset more easily.

I can make a PR for the same.

[Suggestion]: Add field for type of exercise

While working on Ryot, I needed to classify each exercise into one of the following: Duration, DistanceAndDuration and RepsAndWeight. Here is the code I am using to classify each exercise for now.

However, I think there should be an additional type: RepsOnly. For example, Pushups, Pullups, Crunches and so on.

Would you be open to adding a new field type to the schema, which will be an enum with 4 variants? This should be not be very difficult since I already have 3 variants sorted out. WIll have to do the RepsOnly variant manually.

[suggestion] Download images script

Because the images are tucked away, it would be nice to have a script to download them all. It would be even nicer if you could automatically create a gif from the images as well ;)

With the help of ChatGPT, I had this made. GitHub won't allow me to upload .sh files, so it's a .txt. It had to do some renaming due to directory creation/matching issues with the following exercises:

  • 3/4 Sit-Up
  • 90 90 Hamstring
  • Adductor Groin
  • Bradford Rocket Presses
  • Gorilla Chin Crunch
  • Knee Hip Raise on parallel bars
  • Rocky Pullups pulldowns
  • Trail Running walking

image_download.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.