Inspiration

An Apple Watch alert may have saved my life. After cardiac ablation, I began using ChatGPT to help understand my recovery, but supplying enough accurate health and workout context was painfully manual.

That experience led me to build Trendwell, initially as a private tool for myself. Trendwell turns Apple Health recovery and workout data into structured, transparent reports that help users understand what their data shows over time.

Before Build Week, Trendwell could already find workout routes stored in Apple Health and export them as GPX files. Technically, that worked, but the experience still required exporting a file, switching to another navigation app, and then returning to Trendwell for analysis. That is unnecessary friction, especially for the older users Trendwell is designed around.

For OpenAI Build Week, I asked a simple question: could Trendwell make the entire repeat-route experience self-contained?

What it does

Route Replay lets users select a previous walking, hiking, running, or cycling workout and follow the same recorded track directly inside Trendwell.

It provides:

  • a complete MapKit route preview with Start and Finish clearly visible;
  • directions to the saved route's starting point;
  • live route progress and remaining distance;
  • geometric turn guidance appropriate to the activity;
  • sustained off-route detection and automatic rejoin handling;
  • foreground haptics;
  • a Lock Screen and Dynamic Island Live Activity;
  • private, on-device processing without uploading routes or Health data.

Turn guidance stays in the Live Activity instead of producing a notification for every maneuver. Notifications are reserved for meaningful changes such as going off-route, rejoining, and completing the route.

After the new workout, Same Route Comparison closes the loop. Trendwell aligns both workouts by distance along the reference track and compares:

  • moving and elapsed time;
  • speed;
  • heart rate;
  • elevation and terrain;
  • matched-route coverage;
  • complete valley-to-crest climbs.

This creates a cleaner comparison than placing unrelated workouts with different hills, distances, and stopping points side by side. Results remain descriptive and transparent. Trendwell does not generate a recovery score, medical conclusion, diagnosis, or behavioral recommendation.

The submitted Route Replay and Same Route Comparison features do not require a subscription.

What existed before Build Week

Trendwell was already a working iPhone app before the competition. It already supported Apple Health workout and recovery analysis, route discovery, and GPX export.

The repository contains an immutable pre-feature baseline:

build-week-baseline-2026-07-16

The Build Week branch and dated commit history clearly separate the new Route Replay, Same Route Comparison, Live Activity, route-overview, testing, and documentation work from the existing product.

How I built it

Trendwell is a native iPhone app written in Swift and SwiftUI. The Build Week implementation uses HealthKit, MapKit, Core Location, ActivityKit, WidgetKit, Apple Charts, and UserNotifications.

I used one primary Codex session running GPT-5.6 Sol with High reasoning as my main development environment.

I defined the product requirements, privacy boundaries, intended user experience, and real-world acceptance criteria. Codex then helped:

  • inspect and package the existing repository;
  • design projected route matching around loops and self-intersections;
  • implement off-route hysteresis and rejoin handling;
  • derive turn guidance from track geometry;
  • reuse Trendwell's existing terrain and elevation logic;
  • align repeated workouts by route distance;
  • design transparent climb segmentation;
  • integrate SwiftUI, MapKit, Core Location, Charts, ActivityKit, and WidgetKit;
  • create deterministic regression tests;
  • diagnose compiler, UI, and real-world route-following problems;
  • refine the implementation from physical-iPhone feedback.

I repeatedly tested the app on my iPhone and returned real-world bugs and regressions to the same Codex session for correction.

GPT-5.6 and Codex are meaningful development tools for this project. They are not runtime dependencies in the shipping app.

Challenges

Historical tracks are not road-aware navigation data. They contain GPS noise, crossings, nearby parallel legs, gaps, and sometimes multiple route segments. A nearest-point algorithm could jump to the wrong part of a loop, falsely increase progress, or generate incorrect turns.

The implementation therefore combines projected matching with continuity protection, off-route hysteresis, explicit rejoin behavior, and honest limitations. It never claims to understand street names, roundabouts, closures, legal restrictions, or dynamic rerouting.

Another challenge was comparing climbs fairly. A short steep core can misrepresent a longer rolling ascent. Trendwell uses the steep section to identify a climb, then expands the published comparison to the complete valley-to-crest ascent and recomputes its distance, elevation gain, and average gradient.

Screen-off behavior also required careful boundaries. The Live Activity presents the authoritative in-app Route Replay state. It performs no independent tracking, stores no coordinates, and uses no server or push channel.

What I learned

The biggest improvement was not adding more analysis. It was removing friction between navigation, exercise, and recovery understanding.

I also learned that route comparison becomes much more meaningful when both workouts are aligned to the same distance and terrain instead of being reduced to unrelated averages.

Finally, testing on a real path mattered as much as deterministic tests. Map visibility, notification frequency, HealthKit synchronization, and Lock Screen behavior all required physical-iPhone feedback.

Accomplishments

  • A working Route Replay experience inside the existing Trendwell app.
  • Same Route Comparison using genuine route-aligned workout data.
  • A local Live Activity for the Lock Screen and Dynamic Island.
  • A preserved and pushed pre-feature baseline.
  • Dated Build Week implementation commits.
  • 38 deterministic Swift package tests passing.
  • Workout Routes, background navigation, Live Activity, privacy, and GPX regression harnesses passing.
  • Complete functionality verified on a physical iPhone.

What's next

Future work could explore reverse-route guidance and Apple Watch presentation while preserving the same privacy and honesty boundaries.

The immediate goal is simpler: help people repeat the same route, compare the same hills, and understand how their measured response changes over time.

Built With

  • 2
  • activitykit
  • apple
  • charts
  • codex
  • core
  • gpt-5.6
  • health
  • healthkit
  • ios
  • location
  • manager
  • mapkit
  • package
  • storekit
  • swift
  • swiftui
  • usernotifications
  • watch
  • widgetkit
  • xcode
  • xctest
Share this project:

Updates