Engineering Logic: Building an Adaptive TDEE Tracker

Project

Adaptive TDEE Calculator

Category

Nutrition, Diet, Fitness

Tech Stack

React (Vite), TypeScript, Supabase, Tailwind CSS, Radix UI

About the project

The transition from managing content systems to building functional applications represents a deliberate expansion of my technical capability. While WordPress remains a core tool for business sites, certain problems, specifically those involving dynamic data require a more robust, logic-driven approach.

The Problem I Wanted to Solve

TDEE (Total Daily Energy Expenditure) calculators are everywhere. Punch in your age, weight, activity level, get a number. The issue? Those static formulas (Mifflin-St Jeor, Harris-Benedict) carry a 10-15% margin of error. For someone trying to bulk or cut precisely, that’s the difference between results and spinning wheels.

I wanted to build an adaptive TDEE tracker, one that learns your actual metabolic rate by analyzing the relationship between what you eat and how your weight changes. Physics, not formulas. First law of thermodynamics applied over time.

The Technical Challenge

This required capabilities WordPress couldn’t give me:

  • Real-time data processing across weeks of user entries
  • Rolling averages (4, 8, 12-week windows) to filter physiological noise
  • Complex validation logic (catching typos vs. legitimate outliers)
  • Secure, isolated user data at scale

Enter React, TypeScript, and Supabase.

What I Built

Over three years, transformed a failing website into a high-performing digital asset that supported 133% user growth and 138% session growth for one of the Middle East’s premier ultra-marathon events. Maintained 42-62% organic search dominance in the competitive ultra-running discovery space while ensuring zero downtime during peak registration periods. The 2025 complete redesign positioned ODM for continued international growth with modern architecture, improved SEO foundation, and seamless integration with off-site registration systems enabling the event to compete effectively against established global desert marathons for participant attention.

Frontend

React with TypeScript and Tailwind CSS. Server Components keep the calculation logic server-side. The interface is mobile-first because people log their weight in the gym, not at a desktop.

Data Layer

Supabase with Row-Level Security enforced at the database level. Your health data is isolated from every other user’s, not just in the application layer, but in the database itself.

The Math

Every entry gets converted to SI units (kg, cm, kJ) before storage to prevent floating-point errors and maintain formula integrity. The display layer converts back to whatever units you prefer, but the calculations happen in a standardized environment.

Smart Validation

The system knows the difference between a legitimate 3kg daily weight fluctuation (medical edge case) and a typo. Soft warnings for physiological extremes, hard stops for impossible values. Outliers get flagged but preserved and excluded from rolling averages to keep the signal clean.

What I Learned

TypeScript is unforgiving in the best way. It caught dozens of unit conversion errors during development that would have been silent bugs in JavaScript. Supabase’s RLS forced me to think about data security from the database up, not as an afterthought.

Technical Capabilities Gained

  • TypeScript for type-safe data handling across complex calculations
  • Server Components for logic protection
  • Database-level security implementation (RLS)
  • Complex state management (rolling averages, convergence analysis)
  • Mobile-first progressive disclosure UI patterns

Current Status

TDEE Tracker is live at tdeetracker.app. Free tier gives you daily logging and raw TDEE calculations. Premium tier (coming soon) unlocks rolling averages, body composition tracking, and convergence analysis that tells you when your data is stable enough to trust.

It’s not getting pushed hard yet—I’m still refining the convergence engine and testing edge cases. But it works, it’s fast, and it solves a real problem I had as someone who tracks nutrition seriously.

Need an application to solve a problem?

If your business requires simple, logic-heavy or custom-engineered applications, let’s discuss the architecture.

Cta bg h2
Cta bg h1

Enter your email for a free guide on how to choose a web agency that won’t disappear after launch

© 2026 Teedot Creative. All Rights Reserved.