Data Motivates

#fitness #data

What happens when a developer obsessed with GitHub contribution maps realizes that their Strava activity map is completely empty?

The answer is simple: you build your own application to confront yourself with reality and motivate yourself to change it.

For years I was consistent with training. The gym was part of my routine, workouts were sacred, and my body was grateful for it. But something changed when I decided to focus more on my career as a developer.

Suddenly, my day filled with commits, pull requests, and lines of code. My GitHub contribution map became a beautiful green garden, dense and consistent. It was addictive to see that daily progression, that visual evidence of productivity and professional growth.

But there was a silent trade-off happening: the greener my GitHub became, the emptier my physical activity log remained.

The irony couldn’t be more evident. I had exchanged a healthy obsession (exercise) for a less healthy one (being glued to the computer all day). And the worst part was that I didn’t have a clear visualization of this reality until I decided to do something about it.

”Fit” - a Personalized Fitness Dashboard

The idea arose from a combination of personal need and technical curiosity. If GitHub contribution maps motivated me so much to program, why not create something similar for fitness?

Thus Fit was born: a web application with Matrix aesthetics that integrates Strava and Hevy data to create an immersive visual experience that makes it impossible to ignore your current physical state.

Main Features

Real-Time Activity Monitoring: The application tracks running, cycling, swimming and walks with intelligent status indicators (EXCELLENT, WARNING, CRITICAL). There’s no way to escape the truth when you see “CRITICAL” in red.

365-Day Neural Mapping: An interactive heatmap that shows your annual activity patterns. It’s like GitHub’s contribution map, but for your physical health.

Strength Training Integration: Complete Hevy data for gym workout tracking.

Integrating Two Worlds - Strava and Hevy

Fit isn’t just about cardio; it’s about complete fitness. That’s why it integrates two fundamental APIs: Strava for cardiovascular activities (running, cycling, swimming) and Hevy for strength training in the gym.

Working with APIs isn’t new to me, but each one presented its own unique challenges. Strava with its complex OAuth2, and Hevy with its structured workout tracking system.

Strava Integration: The OAuth2 Challenge

Strava’s official documentation is good, but there are practical details you only learn by doing it. That’s why I created my own step-by-step guide that I now share:

1. Strava Configuration: The basics, create the app and get Client ID and Client Secret.

2. The Authorization URL: Here’s the first trick. You have to manually build a URL like:

https://www.strava.com/oauth/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=http://localhost:4321/exchange_token&approval_prompt=force&scope=activity:read_all

3. Code Exchange: This was the new part for me. After authorizing, Strava redirects you with a code in the URL that you have to manually extract and then use in a POST request:

Terminal window
curl -X POST https://www.strava.com/oauth/token \
-d client_id=YOUR_CLIENT_ID \
-d client_secret=YOUR_CLIENT_SECRET \
-d code=AUTH_CODE \
-d grant_type=authorization_code

4. Token Management: Access tokens expire every ~6 hours, so you need to implement an automatic refresh system using the refresh token.

What I liked most about this process was how methodical I had to be. There are no shortcuts; you have to follow each step in detail. It was very gratifying when it finally worked.

Hevy Integration: Strength Training Data

While Strava handles cardio, Hevy is the heart of weight training data. This integration was different but equally important.

Hevy tracks every complete workout: exercises, sets, repetitions, weight used, and progression over time. What’s interesting about working with this data is that it represents a different type of consistency - it’s not about distance or time, but about volume, intensity and progression.

Technology Stack

For this project I chose modern tools that allowed me rapid development and robust results:

The Psychological Impact: Data You Can’t Ignore

This is where the project becomes really interesting. It’s one thing to intellectually know that you haven’t trained in weeks; it’s quite another to see a dashboard that simultaneously shows you:

The application doesn’t lie, doesn’t soften reality, doesn’t leave you excuses. It’s brutally honest in the most visual way possible, combining both your cardiovascular activities and your strength training.

The Motivational Effect

The day I finished the application and saw my real data, I felt a mixture of shame and motivation. I didn’t want that data to represent me. I didn’t want others to see those empty numbers if I shared my dashboard.

That same afternoon I decided to go swimming. Not because someone told me to, but because I literally couldn’t tolerate seeing those red numbers on my own application.

And that’s the magic of the project: it confronts you with yourself using the language you understand best as a developer - data, visualizations, and system states.

Technical and Personal Lessons

About APIs and Data Integration

Working with Strava’s OAuth2 taught me the importance of detailed documentation, while integrating Hevy showed me how different types of fitness data require different visualization approaches.

Cardiovascular data is about frequency and distance; gym data is about consistency and progression. Both are crucial for a complete view of your physical state, and combining them in a single interface creates a much more honest picture of your fitness reality.

About Motivation and Gamification

Developers respond well to visual feedback systems. GitHub understood this with their contribution maps, and I simply applied the same principle to physical health.

The key isn’t just showing positive data, but also making negative data uncomfortably visible. Fit’s dashboard doesn’t just celebrate your achievements; it also confronts you with your negligence.

About Life-Code Balance

This project made me reflect on something many developers face: obsession with professional productivity at the cost of personal health. It’s easy to justify 12 hours in front of the computer as “investment in your career,” but at what cost?

Sports isn’t just physical health; it’s mental productivity, creativity, and balance. Some of my best programming insights have come during workouts, not in front of the screen.

The Result: A High-Definition Digital Mirror

Fit has become my most honest digital mirror. Every time I open the application, I immediately see:

I don’t want that data to be red. I don’t want to be at my computer all the time. I want everything to be green, for health and because I want to be more active, do more cardio, go out more.

Implementation and Open Source

For any developer interested in creating something similar, the code is completely available on GitHub. The setup is relatively straightforward if you follow the Strava documentation I created.

The deployment scripts work with any static hosting, and the application is optimized to be fast and responsive on both desktop and mobile.

Final Reflections: Code as a Tool for Self-Knowledge

This project showed me something powerful: our technical skills can be incredible tools for personal development, not just professional.

Fit isn’t just an application; it’s an experiment in personal accountability, a daily reminder that data doesn’t lie, and a constant invitation to be the most active and healthy version of myself.

Every time I see the dashboard, I have to make a decision: accept the red numbers or do something to change them. And that decision, multiplied by days and weeks, can completely change your physical and mental reality.

The next time you open your GitHub contribution map and feel that satisfaction from all those green squares, ask yourself: what does your physical activity map look like? And what are you going to do about it?