I'm turning a workout tracker into a fitness ecosystem using OPENFORMAT 💪
How I used OPENFORMAT to build connected no-code fitness apps.
I was sat in the gym a couple of months ago during a push session (my favourite time of the week). I’d just got a PB whilst doing incline dumbell press and went to record the set, as I always do, using my STRONG app.
As I opened the app, it got me thinking, despite the fact that I live an active lifestyle and do many sports, the data recorded in the workout tracker app only really exists to me while I am in the gym. As soon as I leave, the app is closed and remains that way until the next gym session. It exists in complete isolation to all of the other exercise I do, and all of the data collected by the other fitness apps I use.
It seemed like a bit of a waste to me, especially given the amount of fitness data I actually record every week…
Tracking my runs with Runkeeper
Using Whoop for monitoring my sleep, heart rate and other body data
Attending the occasional Parkrun
Recording my climbs with Griptonite
…there was a lot of data there and it got me thinking how much more useful it would be to me, and to many other people, if it was all connected, with the user owning the data and having the ability to share it with others in return for some sort of value.
So the next step in my mid-gym brainstorming session was how I could practically test this, and actually build something.
For context, it’s important to mention that I am absolutely not a developer. I like to build stuff, test theories and experiment. I use no-code and low-code tools to do that.
Disclaimer number 2… I work for OPENFORMAT helping with growth. I’m involved in the tech and product calls, but since I’m not a developer I wasn’t able to get hands on and build the cool stuff I knew was possible. It was INFURIATING. That’s why I was super excited when I discovered the low-code tech stack I used for this project. More on that later.
So how would I test this fitness data theory?
I would take the STRONG workout app, add some extra features, and create it in a way where I could connect it to other apps at a later stage. To do this I would use the toolkit built by OPENFORMAT.
Since the data collected from the user was valuable, for every action or series of actions (called missions in OPENFORMAT lingo) the user would be rewarded. The on-chain token used to grant these rewards would be the same across the whole fitness app ecosystem. I called it the $FIT token (how original…).
Then after I’d tested this initial workout tracker app, I could add more apps and connect them together, or in an ideal world other people would be interested and want to create apps that connect together in this way too.
So what did I actually build?
I would have loved to set aside a few weeks and build out a mini fitness ecosystem with tonnes of different apps that were all connected, but alas I have a full time job (and an awesome one at that…).
Given the severe lack of time for this experiment, I set aside 5 hours to build the workout tracker, some social and reward based features and everything I needed as part of the infrastructure for the bigger fitness ecosystem.
The additional features included:
A tiered leaderboard with different leagues (similar to Duolingo)
An AI Fitness Coach (Jim the PT) that is only unlocked once the user reaches level 5 or purchases an access badge
A series of missions that allow the user to unlock badges after completing certain actions
A level-based progression system where different perks are unlocked as the user progresses to specific milestones
As well as the workout tracker, I found some extra time and built a very basic Parkrun app with a QR code scanner. This was connected by the same $FIT reward token, which was awarded when your QR code was scanned by a Parkrun volunteer.
Okay nice, so how did I build it?
Since I’m not a developer, building this experimental app was a very… interesting process. It involved using a pretty unique (and damn powerful) tech stack:
OPENFORMAT → to create the framework for the reward system that would turn my project from a basic app to the beginnings of an ecosystem
BuildShip → to take the Javascript code snippets and GraphQL queries provided in the OPENFORMAT Launchpad, and turn them into a REST API which can then interface with FlutterFlow
FlutterFlow → my no-code tool of choice for building the frontend and logic for apps
Firebase → to act as the backend database and store all the exercise information etc.
OpenAI → to create the AI Personal Trainer using their Assistant API endpoints
I’m pretty good with FlutterFlow (not to brag or anything…) so making the basic workout tracker app was a fairly quick and straight forward process, as was linking it to the Firebase backend.
Even creating the framework for the reward system - the badges, reward token and XP (Experience Points)- was a super quick process using the OPENFORMAT launchpad. I just had to create my ecosystem, the apps I wanted in it, and any badges and then I was good to go.
The time consuming process (the vast majority of my time and problems) came when creating the workflows using the OPENFORMAT code in BuildShip. I have a VERY basic understanding of Javascript, so it’s a miracle I managed to get this to work at all. The big positive here though, was that after the workflows had been created, they could be used in future apps in almost no time at all, by me or by others.
Each BuildShip workflow, which contained nodes with the relevant custom code, performed a specific task within the app, the workflows that were used within the workout tracker project were…
Claim Reward Token: This REST API was called within the app whenever a set of actions that would earn the user the $FIT token were completed. This could be anything from the user completing the ‘Finish Workout’ action 5 times, or lifting over 10000kg during the course of a session.
Check Reward Token Balance: This workflow included a GraphQL query where the users $FIT token balance was checked on the OPENFORMAT Subgraph and a value is returned.
Claim XP: This was very similar to the claim reward token workflow, except it rewarded the user with an XP (or experience points) token which could not be spent or traded and was simply used to record their progress and their interactions with the fitness ecosystem.
Level System: This was a relatively complex workflow with many nodes and was used to monitor the users progression according the how much XP they had earned. When they met a certain XP threshold, which was determined by a formula that was inputted when the API was called, the user would ‘level up’ and earn a badge to signify this new level. You can find out more about XP and the phsycology behind levelling up here.
Claim Badges: This awarded the user with an on-chain badge or achievement whenever the user completed a certain action or set of actions.
Check Badges: This was similar to the ‘check reward token balance’ workflow, except it made a GraphQL query to check the OPENFORMAT Subgraph and return a list of the badges that the user owns.
Tiered Leaderboard: This made a GraphQL query and returned the order of the users based on the amount of XP they held and the League they are currently in (which was represented by an on-chain badge)
Create Wallet: This created a Web3 wallet for the user when they created an account within the app, it returned the wallet address and private key which was stored in a database. This is not the ideal way to manage these wallets, but given the scope of the project I did not have time to integrate an embedded wallet or a self-custodial wallet option.
Once all these workflows were created, and once I’d thought through a very basic reward system for different actions, it was simply a matter of calling these API’s within FlutterFlow and sending the relevant information such as the users wallet address whenever they were required.
One interesting example of this is for token gating the AI assistant… I’ve seen a lot of companies recently try to monetise a very simple OpenAI based in-app assistant, they usually aren’t too expensive but do restrict what a free user can do within the app. I decided it’d be way more cool if you could either pay for access, or earn access by being a committed app user.
So in the workout app you can get access to Jim the AI PT in 2 ways, either work your way to level 5 and earn access, or pay £9.99 and get instant access. Without the level 5 badge or an access badge… no PT.
How do you see this cross-ecosystem data?
Well since everything up to now has involved an on-chain reward system, anyone can see the data and the actions your users are taking. If you had business lectures on defensibility and building a technical moat, that statement may have caused sirens to start blaring.
Everyone can see the data?
But that’s kind of the point, this opens up the potential for a profitable and collaborative open-source ecosystem. Others can use the data to create new apps, and in doing so they drive more traffic to your ecosystem, you can even get into some interesting ways to profit from this, say you take a % cut on every transaction.
There is a little caveat to the whole anyone can see the data point though, right now the on-chain data would look something like this:
Yes the data is there, but it’s a little hard to make out what the h*ll is going on.
That’s where the OPENFORMAT Launchpad comes in handy. In the same place that you would create your apps and badges, you can see all of the actions that are happening across your apps and ecosystem (or as we call them→ constellations). This activity feed makes it a bit easier to make sense of what’s going on, but you could easily build your own activity dashboard if you wanted, that’s the beauty of the blockchain, the data is there for you to use how you please.
Right now this is pretty simple and just shows the activities from the workout app, but as more apps are added to the ecosystem this could show the data from all across the ecosystem, and in the process opening up countless opportunities for really interesting value creation.
Say you were a scout looking for potential Triathlon talent, you could look for users who had recently earned the ‘sub 17 minute 5k’ badge in the Parkrun app and the ‘1 mile magician’ badge in the Swimming app then give them free access to your next event.
Or if you were starting a sportswear shop, you could offer a limited edition hoodie for everyone in the Diamond League of the workout app. The shop benefits by tapping into the userbase of the workout app, and the workout app benefits because their is a clear incentive for users to spend time on their app and earn the hoodie. WIN WIN.
What comes next for this little ecosystem then?
Since the barebones of a fitness ‘super app’ are already in place, what comes next is a pretty exciting question, especially given the ease with which you could wrap this reward system around an existing app. Plus, with every app that is added to the ecosystem, there is more incentive to build another one, and more scope for super interesting interactions between the different apps.
Personally I’ve been working with my housemate on an app for a Taekwondo club he is launching in the near future, I’ll definitely be bringing this into the Fitness Ecosystem.
Hopefully some of you guys will be feeling inspired too and want to get in on the action… if you do, feel free to shoot me a message on Linkedin or hop in our Discord.
Regardless of what happens next though, the most exciting part for me is that as someone who is by no means a developer, OPENFORMAT has allowed me to build something genuinely cool.
I can only imagine what someone with years of development experience could do with this.