Blog

Coding with Claude

I was lucky enough to take a week off work in March over the kid’s spring break. We didn’t really have awesome weather during my week off in Vancouver so we spent quite a bit of time inside. During our movie and chill time I finally got a chance to use Claude Code to solve a real-world problem that I had and it was pretty impressive to see how much AI coding tools and agents have evolved in the past few months.

My goal was to create a publicly visible dashboard of my cycling and health data beyond the systems that I store this information in. I thought this would be cool to share with folks who aren’t on Strava or other fitness apps to get a glimpse of the data I track. The dashboard pulls data from my private Strava account as well as Intervals.icu for which I use to plan my training.

Stack

  • Next.js 16 (App Router) with React 19 and TypeScript 5

  • Tailwind CSS 4 for styling, Recharts 3 for data visualization

  • HLS.js for streaming activity videos, date-fns for date handling

  • Hosted on Vercel with standard Next.js deployment; no database required

Data Sources

The dashboard pulls from two APIs:

  • Strava API (OAuth 2.0 refresh token flow): Recent activities and activity photos/videos

  • intervals.icu API (Basic Auth): Wellness metrics (HRV, resting HR, sleep, mood, stress, fatigue, soreness, hydration), fitness modeling (CTL/ATL/TSB), HR zone data and upcoming race events

Architecture

All data fetching happens server-side in a single page component. API calls to Strava and intervals.icu run in parallel using Promise.allSettled(), so a failure in one source doesn't take down the whole page. Interactive components (charts, carousels, rolling-window toggles) are client components that receive data as props.

Caching is handled through Next.js Incremental Static Regeneration (ISR) with a 1-hour revalidation window so the page is statically generated and refreshed in the background hourly. Strava OAuth tokens are cached in-memory with deduplication to prevent concurrent refresh races.

Look & Feel

I was able to prompt Claude to match the look & feel of my website here and it did a fairly good job of matching the template style and colours on the site. It’s not perfect but it does integrate nicely and also stands alone at activity.dylanhansen.ca.

At the time of writing I have probably put about 4 hours of work into this dashboard which would have taken me weeks in the past. It’s been a fun challenge to learn how to prompt an AI system to build this and also have a simple pipeline for deployment (Claude Code to GitHub to Vercel). I’m looking forward to continuing to tinker with this in my (limited) free time as a way to advance my knowledge of AI coding assistants!

Dylan Hansen
Looking Ahead to 2026

As it gets closer to the end of 2025, I’m excited to start looking ahead to next year! This has been another busy year for our family and a lot of personal goals and achievements:

  • I was able to achieve my yearly goal of biking 365 hours this year! I could have easily gone way past it but ended up separating my shoulder at the end of August and was generally burnt out from cycling heading into December.

  • I took on a really awesome and challenging new role at work which I have written about, which continually allows me to leverage my strengths while also making a significant impact on the company’s future direction.

  • Spent a lot of great time with the family including some trips to San Diego (last US family trip for a while), back to the Comox Valley and Vancouver Island and a lot of exploring around Metro Vancouver. We have also been spending a lot of time at home now that we have been in our house for a few years.

As I look forward to 2026, I’m really excited about the new year for a bunch of really awesome reasons:

  • I recently went through a number of medical tests which all came back positive which I’m really grateful for!

  • I’m changing my cycling goals to focus on completing 4 large cycling events throughout the year. I have already registered for 3 and I’m looking forward to more focused training/riding this year, while also including more recovery time in my routine.

  • I’m focusing on “going with the flow” more in my life and developing balance, while also leveraging the structure that I have used to maintain my busy lifestyle.

Here’s to an exciting 2026 for everyone and wishing y’all a Happy New Year!

Dylan Hansen
Mid-Year Goals Checkpoint

It’s hard to believe that we’re over the half-way point of 2025! As I reflect back on my goals and focus areas that I defined earlier in the year, it’s incredible to see the progress that I have made and the pivots that some aspects of my life have changed. It’s been a hell of a year so far, but I’m also really excited to share that I have been doubling-down on my key focus areas for the year and not trying to change them too much.

Family

My boys are 9 and 7 years old, respectively! It’s been a wonderful year to see them grow and complete another school year. We’re really lucky that we have been able to have some good family trips so far this year (San Diego over Spring Break, Victoria over Easter and Vancouver Island to start the summer break). We front-loaded a ton of our trips, so the remainder of the year we will be spent locally in Vancouver which is something we are looking forward to. I have been working really hard to try to spend more time with the kids off devices, whether that be playing video games, reading or getting outside with them. Engaging with growing children doesn’t come without it’s own challenges, so I’m looking forward to continuing my growth in this area.

Cycling

I’m well on my way of exceeding my goal of 365 hours of cycling this year! At time of writing, I’m about ~20h ahead of my goal which is expected during the summer months. I’m hoping to bank a number of hours this summer so that I’m not playing catch-up on Zwift during the winter. I am also proud that I completed my first ever gravel event (Goodride Gravel) and my first GranFondo (Valley GranFondo)! These events challenged me physically and mentally which I really enjoyed. Unfortunately, due to poor planning I won't have any other events this year as I won’t be attending the Whistler GranFondo. I will be planning ahead more next year for this. In the meantime, I’m excited to continue to do lots of rides to meet my time goal this year - solo rides, family rides and club rides!

Work

Finally, the most dynamic part of my life so far this year has been my work and role. Back in November of last year I took on a new opportunity that moved me back into people management and in an engineering leadership role again. While I was super excited for this role and spent an amazing ~6 months with the team, I’m proud to share that I have joined Salesforce’s newly formed Office of the Chief Architect (OCA)! This is a new function within the Technology organization and I’m responsible for bootstrapping the organization, operations, programs - basically a little bit of everything to get this new team going. I’m really excited for this opportunity and it’s breathing some fresh life back into my career at Salesforce and setting me up for success in the future.

That’s it! It’s been great to spend a bit of time writing on my blog, but now I need to get back to working towards my goals this year!

Dylan Hansen