avatarSeb Hulse

Summary

Seb Hulse introduces a free, open-source fitness app that generates varied workouts based on user-selected parameters, aiming to provide a fresh alternative to repetitive video-based home workouts.

Abstract

The fitness app developed by Seb Hulse, accessible at fitness.sebhulse.com, offers a unique solution for individuals seeking diverse workout routines. Users can customize their workouts by selecting specific parameters, and the app generates a semi-random workout based on a categorized exercise bank and proven formats. The app is designed to inspire and cater to different fitness levels without requiring an account or personal data. Hulse's motivation for creating the app includes a desire to improve his web development skills, alleviate workout monotony, and promote environmental sustainability by encouraging home workouts. The app's functionality is supported by a meticulously curated dataset and an API, both of which are publicly available. While the app currently serves as an inspirational tool, Hulse plans to enhance its interactivity and expand workout options. The technology stack includes Bootstrap v5.0 for the UI, vanilla JS for dynamic components, and Cloudflare Workers for the server-less API.

Opinions

  • The author believes in inclusive access to fitness resources, as evidenced by making the app free and open source.
  • Hulse acknowledges the app's limitations, viewing them as opportunities for future development and community contribution.
  • The app is seen as a tool for inspiration rather than a comprehensive workout platform, encouraging users to adapt and personalize the generated routines.
  • The author values user feedback and invites the community to participate in the app's evolution, particularly in terms of adding real-time workout functionality and more diverse workout types.
  • Hulse emphasizes the importance of safety and familiarity with exercises, suggesting that users substitute unfamiliar exercises with ones they are comfortable with.
  • The use of Markdown for website copy is praised for its ease of updating and maintaining documentation, showcasing the author's innovative approach to web development.
  • The author is environmentally conscious, hoping that the app will reduce the need for gym visits and, consequently, lower the carbon footprint associated with travel to fitness facilities.

The Only Fitness App You Need – It’s Free!

Here’s how I built it

Photo by Dane Wetton on Unsplash

I’ll get straight to it. Simply navigate to fitness.sebhulse.com, select your workout parameters, click Generate Workout, and away you go! No account required. No data harvesting or trackers. Just free and varied workouts to inspire your fitness journey. It’s open source, too!

Tell me more

Happily. I’ve designed the app to generate semi-random workouts based on a bank of categorised exercises and according to pre-programmed, proven workout formats (think pyramids, Tabata, circuits etc). I say semi-random because the workouts have to abide by certain rules (the pre-programmed formats), but still ‘randomly’ choose from the exercises that are filtered according to the input parameters (e.g. cardio, 30 minutes, full body, intermediate).

The home-screen of fitness.sebhulse.com © Seb Hulse

What a way to make it sound boring, right?

I promise it’s not, and encourage you to give it a whirl. I’ve been known to continually click the Re-Generate Workout button, curiously waiting on the next workout result (it’s addictive and is seriously hampering productivity at this point).

Why make it free?

I, like many others, have relied heavily on home workouts recently and have gotten mildly frustrated with the lack of variation in realtime video-based workouts. Once you’ve done them, it becomes tiresome to listen to the trainers make the same jokes at the same points! Perhaps you can relate. To minimise waffle, I’ve summarised the why in three categories:

Selflessly — To allow for wider and more inclusive access to fitness resources.

Selfishly — To improve my full-stack web development skills and to relieve the boredom of video-based workouts.

Environmentally — Perhaps providing this tool empowers others to engage with home workouts, meaning they don’t need to travel to a gym to workout.

General Tips

Due to the ‘random-ish’ nature of the program, a few things need to be considered. I’ve summarised some tips:

  • For any single-side exercise (e.g. single leg deadlifts or single leg V-ups), always either alternate sides, or switch sides half-way through the exercise time. You can’t rely on the exercise coming back round to even it out!
  • If you are unfamiliar with or unsure about an exercise, substitute it with an exercise that you are comfortable with. Be safe!

Disclaimer

This brings us naturally to the disclaimer.

Remember, these are computer-generated workouts which have not been approved or reviewed by any personal trainer or otherwise qualified person, so don’t take them as gospel and do amend them as you see fit (get it?).

Please make sure you read and understand the disclaimer before diving head-first into the workouts since no personal trainer or otherwise qualified person has approved or reviewed any of the generated workouts.

With the serious bit out of the way, on with the show…

Quibbles

I might as well be honest about the shortcomings. Consider this as motivation for a to-do list that I’ll expand upon in the What’s Next? section.

  • I consider this website (in its current form) as a tool for ‘inspiration’ because — let’s be honest — we can’t really do much with a list of exercises and workout periods other than to garner ideas from them.
  • There are limited workout formats/types. I’m working on expanding the options with things like EMOMs, Intervals, Circuits etc.

Now let’s take a look at how the app works behind the scenes.

How does it work?

There are two elements that are instrumental to this website/app/project. Those are:

  1. The data
  2. The API

I’ve already mentioned the data which I’ve (painstakingly) curated and made publicly available. You’re free to use it under the CC BY 4.0 license. See this data page for an overview of how it’s structured.

The API is the brains of the operation. This filters the data according to the input URL parameters and spits out a (JSON) workout that’ll (hopefully) inspire you! I’ve written about it on the API page, but the documentation still needs some work. I’ll give an update when I have a more robust implementation. In the meantime, feel free to play around with it (and let me know what you build with it)!

Tech stack

What technologies make the website work under the hood?

Front-end: Bootstrap v5.0 UI with vanilla JS (and HTML, CSS) for the dynamically rendered components. The front-end is hosted with Github Pages.

Back-end: The API is written in vanilla JS and runs on server-less Cloudflare Worker instances. It is written using functional programming principles.

Workflow: The API code is ‘compiled’ and pushed to the Cloudflare Worker using a wrangler Github action on each git push.

Side-note: As an experiment, the copy for the website is written in Markdown, and is rendered into HTML client-side and on-demand. This makes it easier to update the copy/docs when needed. I wrote an article about the methodology here:

What’s Next?

As hinted at earlier, there are a few features I’d like to add to make this a truly useful fitness tool. The main thing to do is to add the realtime workout functionality so it’s more of an interactive and ‘immersive’ (is that the right word?) experience more akin to what users may be used to.

Fear not, I have a prototype — see the Gif for a brief demo. This uses the JavaScript GSAP animation library to generate the animation code from the workout JSON at runtime. See the realtime branch in the Github repo for the code.

I also plan to add more workout types/sections as alluded to earlier.

How can I help?

Give the workout generator a go at fitness.sebhulse.com and let me know what you think either as a comment here, or directly! Perhaps you have ideas for the realtime feature, or more workout types/sections. I look forward to hearing what you have to say!

In the future, I may go more in depth with the code base and developments if there’s interest. Stay tuned.

Resources

The workout generator — link

The workout generator open source code — link

Bootstrap UI — link

Github Pages — link

Server-less Cloudflare Workers — link

Revolutionise the Way You Write Docs with Marked.js | Seb Hulse — link

GSAP JS animation library — link

Feedback Contact — link

Thank you for reading the whole article! It means a lot to me that you took some moments out of your day to consider my ideas :)

If you’re not a Medium member but have enjoyed reading along, please consider supporting me by subscribing to Medium via my referral link. If you do, I’ll receive a portion of your membership fees and it will enable me to write more articles similar to this one.

Have a great day!

Fitness
Technology
Programming
Workout
Software Engineering
Recommended from ReadMedium