TrailTrace is a web application designed for runners who want a single place to plan routes, export runs to Strava, and track nutrition in a way that supports training goals. The project brings together mapping, fitness-platform integration, and food data into one streamlined workflow: draw a route, generate a clean runnable path, upload it as an activity, and log what you eat (or plan to eat) using barcode-based nutrition lookup and context-aware scoring.

At its core, TrailTrace focuses on two connected problems runners face: route creation and fueling decisions. On the route side, the app provides an interactive map experience where users can create routes using multiple drawing methods (including freehand-style input and structured map drawing). Those inputs are translated into waypoints and converted into realistic roads-and-trails routes using a routing engine, then visualized clearly with route lines and markers. The system also includes route optimization and smoothing so routes feel natural and usable rather than jagged or overly complex.

TrailTrace also integrates directly with Strava using an OAuth 2.0 flow, securely managing user tokens and supporting GPX-based activity uploads. This allows users to take a route they created inside TrailTrace and move it into a platform they already use for training history and social accountability.

On the nutrition side, TrailTrace includes MacroScanner, a barcode-driven nutrition tracker built for speed and practicality. Users can enter or scan a barcode, normalize formats (handling common UPC/EAN variations), and retrieve nutrition data from public food databases with fallback behavior when one source lacks coverage. Items can be managed in a multi-item list with servings adjustments, and the app displays nutrition in a familiar “label-style” format along with derived metrics (like energy density and sugar ratios). A key differentiator is a context-aware scoring system that evaluates foods differently depending on when they’re used—pre-run, during-run, or post-run—so the feedback matches real training needs.

Technically, TrailTrace is built with a modern TypeScript-first stack (Next.js + typed validation), integrates Firebase for authentication/session handling and secure user data storage, and uses reliable third-party APIs for maps, routing, nutrition, and fitness activity export. The end result is a cohesive runner-focused tool that connects planning, execution, and recovery into one product experience.

Built With

Share this project:

Updates