An Intelligent Fitness App

An robotic humanoid fitness coach standing on a rooftop against the backdrop of a warm sunsetting city skyline

Motivations

Since I was 16, maintaining my fitness has been an important part of my lifestyle. I didn’t have a personal trainer or a coach to guide me through my fitness journey in my early years of training. I certainly would have been open to having a coach, but I couldn’t afford it. However, I could afford used equipment and managed to find an A-frame, bench press, plates, dumbbells and a couple of barbells on Gumtree. Lo and behold, I had a home gym with everything I needed to start my training. It was one of the most memorable days of my life. I loved the process of cleaning the garage, laying down the foam floor tiles, and setting up the equipment. I can remember how proud and inspired I was when I had finished.

I loved basketball in my early years, and like many young hoopers, I had dreams of playing in the NBA. My physical training was focused on goals conducive to developing my athleticism for basketball. I was motivated to become a little better every day, which drove my desire to gain knowledge and apply it in training and practice. I searched for articles and videos on developing jumping ability. These programs were often composed of plyometrics and resistance exercises to develop the legs and core. I would often download a PDF and follow it for 6-8 weeks, and at the end of the program, re-evaluate. I generally followed this pattern of: set a goal > research appropriate training > apply training > re-evaluate over the years. In the process, I learned how to do basic programming. I had taken a class in physical sciences in education in high school and was introduced to basic exercise science and progressive overloading principles, which I applied to my own training, then evaluated the results after consistent application.

I’m now 34 turning 35, and while I feel I got a lot of things right in my knowledge of fitness and training in general, there was a lot I got wrong too, and I paid the price. I’ve over-trained more often than not, and I feel the wear and tear today. I didn’t value recovery as much as training, and given my youth and natural athleticism, I was of the mindset that pushing through the pain made me stronger and my body would eventually adapt. While there is some truth to this, I essentially ignored the signals my body sent when rest was necessary.

Looking back, it’s clear that if I had a coach from the beginning, I likely wouldn’t have accumulated as many injuries as I have. My overall fitness and body would be at a higher level, and perhaps I wouldn’t be staring down potential joint issues as I head into my 40s, 50s, and beyond. But here’s the thing - I know I can’t change the past. But what I can do is apply everything I’ve learned to create something better for the future.

Over the past few months, I’ve been more motivated and consistent with my training than I’ve been in years. I started running 5km three times per week, took up boxing to improve my cardiovascular fitness, and set ambitious goals: hit 75kg and 11% body fat. At the time of writing this, I’m 79kg, down from 91kg in February 2025, and I estimate I’m around 22% body fat.

Maybe it’s age granting me a little more wisdom, or maybe it’s finally understanding the value of taking a measured, scientific approach to training. For the first time in my life, I’ve focused on consistency in logging, tracking, and collecting data on my training, nutrition, and recovery. As a software engineer and computer science enthusiast, I began to wonder: could I approach these training using data to dynamically program my training, nutrition, and recovery on a day-to-day basis? Could I develop an intelligent fitness coach that would not only contribute to my chances of success but improve the quality of the outcome?

This question has been something I think about daily over the last few months.

The Problem with Static Programs

Here’s what I’ve noticed after nearly two decades of following fitness programs: they’re all fundamentally shotgun approaches. Not because they don’t work - many do - but because they treat everyone like they’re the same person on the same day, feeling the same way, with the same recovery capacity and life circumstances.

I thought about what I was really doing at the time. I download a 12-week program, and it tells me that on Week 3, Day 2, I should do 4 sets of 8 reps at 75% of your 1RM. But what if I had terrible sleep that night? What if my stress levels are slightly elevated because of work? What if I am actually recovering faster than the program expects and could handle more volume? The program doesn’t know, and it doesn’t care.

In constrast, on the off chance I had money for a session here and there, I worked with personal trainers in the past and the adjustments were reactive and infrequent. We’d meet once or twice a week, they’d ask how I felt, maybe adjust the weight or reps, but there was no systematic way to capture and respond to the dozens (maybe even hundreds) of variables that actually impact training outcomes.

Maybe what I was looking for wasn’t another program to follow - maybe it was a program that could follow me.

Building A Digital Coach

The concept is straightforward in theory: develope a system that continuously monitors my progress, aggregates data and signals from devices, analyzes patterns in my data, and adapts my training program in real-time. Instead of following a predetermined path, the system would create the path as I walk it.

Alas simple concepts often hide complex execution, and this project has been no exception.

I started by identifying what data actually matters. After researching everything from heart rate variability to sleep quality metrics, I settled on four core yet simple categories that would form the foundation of a digital coach.

First, the basics: weight, body fat percentage, waist circumference, and other key measurements taken weekly. These are my destination markers - they tell me if I’m heading in the right direction overall.

Second, performance data: how much I can lift, how fast I can run, how high I can jump. These metrics indicate whether my training is actually improving my physical capabilities or just making me tired.

Third, recovery indicators: heart rate variability, sleep quality, subjective energy levels, and how sore I feel. These became the most important category because they determine everything else - I can’t progress if I don’t recover effectively.

Finally, nutrition tracking: calories, macronutrients, meal timing, hydration. I used to think nutrition was about willpower and restraint, but now I see it as data that directly impacts everything else I’m measuring.

The beauty of tracking these metrics consistently is that patterns emerge. I discovered my HRV drops significantly two days before I usually feel overtrained. My sleep quality directly correlates with my lifting performance 48 hours later. My body fat percentage measurements are most accurate on Tuesday mornings after two days of consistent hydration.

These insights wouldn’t be possible without systematic data collection, and they’ve already changed how I approach training and nutrition.

The Algorithm

Creating an intelligent fitness coach meant solving several interconnected problems, each requiring its own algorithmic approach.

The first challenge was adaptive progressive overload. Traditional programs follow linear progression - add 5 pounds every week, increase reps every session. But real adaptation isn’t linear. Some weeks you can handle more stress, others you need to pull back. My requirement is my system monitors both performance improvements and recovery metrics to determine when and how to increase training stimulus.

If my recovery scores are high but I’m not seeing performance gains, the algorithm increases intensity or volume. If my recovery is poor but strength is still improving, it maintains the training load but adds extra rest days. If both recovery and performance are declining, it triggers a deload week automatically.

The second piece was nutrition synchronization. Instead of eating the same macros every day, the system adjusts my nutrition based on training demands. Heavy lifting days get more carbs timed around workouts. Recovery days emphasize protein and micronutrients. The day before long runs, it automatically increases my carb intake and reminds me to hydrate more aggressively.

Recovery optimization became the third algorithmic challenge. The system doesn’t just track recovery - it prescribes specific recovery protocols based on the data. Poor HRV triggers reminders for extra sleep and meditation. Mobility restrictions detected through movement screens generate targeted stretching routines. High stress levels from work automatically reduce training intensity and increase recovery work.

Finally, I built in goal trajectory prediction. By analyzing my rate of progress across all metrics, the system can estimate when I’ll reach my targets and identify potential plateaus before they happen. This forward-looking approach lets me make adjustments proactively rather than reactively.

The Tech Stack

I wanted to build something robust but practical.

For data collection, I’m using a combination of wearable devices and manual inputs. My Garmin Forerunner 265S strap tracks HRV, sleep, and overall strain. It also handles my running metrics. The data is aggregated and uploaded as csv dumps in my cloud where I have deployed some data pipelines to process and store in my databases.

I’m writing in Go for the backend services and MySQL as the primary database for storing user data and workout history. The interesting part is the machine learning layer - I’m leveraging OpenSearch as a vector database to power both the ML models and recommendation engine. This setup lets me store workout patterns, recovery profiles, and user preferences as high-dimensional vectors, making it incredibly fast to find similar training scenarios and recommend appropriate adaptations. I started with simple similarity searches and gradually built more sophisticated recommendation algorithms as my dataset grew. The vector approach means I can quickly identify users with similar physiology and training responses, then adapt their successful patterns to my current situation.

For the frontend, I’m maintaining the pragmatic attitude to get this system working quickly while planning for the long term. I get React is the more popular and “mature” framework but I’m going with Svelte for the proof-of-concept and demo version - its reactive nature and lightweight footprint is appealing to me for rapidly prototyping the dynamic charts and data visualizations I’d like to validate whether this approach actually works. Svelte’s simplicity allows me focus on the core functionality rather than wrestling with framework complexity while I’m still figuring out the user experience. Once I’ve proven the concept and refined the workflows, my plan is to migrate everything to Kotlin Multiplatform for the full version. KMP will give me native performance across mobile and desktop, shared business logic, and the ability to create seamless experiences whether I’m logging a workout on my phone or analyzing trends on my laptop. For now though, Svelte gets me from idea to working prototype fastest and get into the iteration cycle sooner rather than later.

Finally, a modular design is important and front of mind. As I discover new data sources or develop better algorithms, I can plug them into the existing system without rebuilding everything from scratch.

Development Roadmap and Next Steps

While I’m still in the early stages of building this system, I think I have development roadmap for the next 2-3 months that balances rapid prototyping with sustainable architecture.

Phase 1: Data Pipeline Foundation (Weeks 1-4)

My first priority is establishing reliable data ingestion and storage. I’m starting with my Garmin data exports, building the Go services to process CSV dumps, and setting up the MySQL schema for core metrics. The goal isn’t perfection - it’s getting data flowing consistently so I can start identifying patterns manually before automating the analysis.

Phase 2: Basic Analytics and Visualization (Weeks 5-8)

Once data is flowing, I’ll build the Svelte frontend to visualize trends and correlations. This phase focuses on proving the concept - can I actually see meaningful patterns in my training, recovery, and performance data? I’m planning simple charts and dashboards that let me explore relationships between variables without sophisticated algorithms.

Phase 3: Initial Recommendation Engine (Weeks 9-12)

The final phase introduces the OpenSearch vector database and basic ML components. I’ll start with simple similarity matching - finding historical training sessions with similar recovery profiles and seeing what worked then. The recommendation engine will be basic initially, but it’s where the system starts becoming truly intelligent rather than just a tracking tool.

Key Technical Milestones

  • Automated Garmin data processing and storage
  • Real-time dashboard showing progress toward my 75kg/11% body fat goals
  • Basic pattern recognition for recovery-performance correlations
  • Simple workout recommendations based on current metrics
  • Mobile-responsive interface for daily logging and quick insights

The beauty of this phased approach is that each stage can be delivered independently. Even without machine learning, better data visualization will improve my training decisions. And even basic recommendations will be more personalized than any static program I’ve followed before.

Anticipated Challenges and Risk Mitigation

While I’m optimistic about this project, I’m also realistic about the obstacles ahead. What I have in my head is likely a complex system with a difficulty curve at odds with anything I’ve built before, but I like challenges, so let’s get on with it.

The Data Quality Challenge

My biggest concern is ensuring data accuracy and consistency. Garmin devices are reliable, but they’re not perfect. Heart rate variability can be influenced by factors unrelated to training recovery - caffeine, stress, even how tightly I wear the watch or long periods when I have taken the watch off. I’m planning to address this by tracking multiple recovery indicators and looking for convergent signals rather than relying on single metrics recorded over time.

Signal vs. Noise in Small Datasets

With just myself as a subject, distinguishing meaningful patterns from random variations will be difficult. My mitigation strategy is starting with well-established correlations from sports science research, then gradually identifying personal patterns as my dataset grows. I’m also planning to incorporate external validation where possible - if the system suggests I should feel recovered, does that actually match my subjective experience?

Technical Complexity vs. Daily Usability

The temptation will be to over-engineer the ML components early, creating a system that’s sophisticated but unusable. I’m combating this by prioritizing the user experience in every development phase. If I won’t actually use a feature daily, it doesn’t belong in the initial versions.

Scope Creep and Feature Bloat

As patterns emerge, I’ll want to track everything and optimize for every variable. My plan is maintaining strict focus on my core goals - reaching 75kg and 11% body fat - and only adding features that directly support those objectives. Future enhancements can wait until the foundation is solid.

Integration and Deployment Complexity

Moving from prototype to production-ready system introduces infrastructure challenges I haven’t solved yet. I’m mitigating this risk by designing for simplicity from the start and planning cloud deployment early in the process rather than as an afterthought. The key is staying focused on building something I’ll actually use rather than something that looks impressive in a portfolio. If this system doesn’t improve my training outcomes, all the technical sophistication in the world won’t matter.

Where This Goes In The Medium-Term

Environmental factors represent the next frontier. I want to incorporate weather data (my running performance varies significantly with temperature and humidity), work stress levels, and other external variables that impact training capacity. The challenge is finding reliable ways to quantify these subjective experiences.

Pattern recognition will improve as my dataset grows. I’m particularly interested in identifying personal patterns that might not apply to the general population but are crucial for my individual response to training. These insights could be the difference between a good program and a dynamically tailored program.

I’m also exploring ways to make this system useful for others. The current implementation is highly personalized, but the underlying principles could be adapted for different goals, experience levels, and preferences. I envision a more accessible interface that could integrate with existing fitness platforms and wearable devices.

From a research perspective, I’m documenting everything in a way that might contribute to the broader understanding of personalized training approaches. While n=1 studies have obvious limitations, the detailed data collection and systematic approach could provide insights for future research.

The Bigger Picture

This project represents more than a technical challenge or a way to optimize my workouts. It’s the culmination of nearly two decades of learning what doesn’t work, combined with finally having the skills to build what might.

The 16-year-old setting up his garage gym followed programs with religious devotion, believing that discipline and consistency were everything. He wasn’t wrong - those qualities matter enormously. But he was incomplete in his understanding. The 34-year-old ne recognizes that intelligence and adaptability often matter more than raw determination.

What I’m building now is the coach I needed then but couldn’t afford - one that would have taught me to listen to my body instead of just pushing through pain. One that would have helped me understand that recovery isn’t weakness, it’s strategy. One that would have prevented years of overtraining and the injuries I’m still dealing with today.

But maybe that’s the point. Maybe I needed to make those mistakes to understand why this approach matters. The wisdom to build something truly useful comes from understanding what you actually need, not just what sounds theoretically optimal. As I work through the next few months of development, I’m not just building software - I’m applying everything I’ve learned about training, recovery, and the importance of systematic thinking. Whether I reach my 75kg and 11% body fat goals matters less than proving that a data-driven, adaptive approach can work better than anything I’ve tried before.

The intersection of technology and human performance is fascinating territory, and I suspect we’re just beginning to explore what’s possible when you combine good engineering with hard-won wisdom. The future of fitness isn’t about finding the perfect program - it’s about creating systems intelligent enough to become adaptable to you.

If you’re interested in following along with this experiment, I’ll be documenting everything: the technical challenges, the training insights, the failures and breakthroughs. Because the most interesting projects are the ones where you’re not entirely sure what you’ll discover along the way.

Publish on 2027-02-05,Update on 2025-05-26