Case Study • Health & Wellness Technology

Behavioral Science-Informed Caloric Tracking & Wellness Platform

How we built a progressive web application that rethinks personal nutrition tracking — replacing rigid meal-plan prescriptions with time-adjusted pacing algorithms, dynamic exercise-adjusted budgets, positive reinforcement architecture, and multi-temporal analytics.

Time-Adjusted Pacing
TDEE Engine
Behavioral Science
Exercise Integration
Multi-Temporal Analytics
Hydration Tracking
6
Core Entity Types
5
Pacing Status Levels
4
Temporal Analytics Views
60fps
Animation Performance

Inside the App

MinSkat Daily Dashboard screen built by Kompani

Daily Dashboard

Calories, activity, adjusted target and time-adjusted pacing at a glance.

MinSkat Hydration & Weight Progress screen built by Kompani

Hydration & Weight Progress

Paced hydration goals and weekly weigh-in tracking toward a goal weight.

The Problem

Why 60–70% of Calorie Tracking Apps Are Abandoned Within 7 Days

Existing calorie tracking applications suffer from well-documented usability and retention failures. Rigid meal databases force users into time-consuming food search workflows. Static daily targets ignore the temporal distribution of intake. And binary success/failure framing — red for over budget, green for under — creates shame-based feedback loops that undermine long-term adherence.

The client needed an application that would address each of these failure modes through a fundamentally different approach — one rooted in behavioral science, not calorie obsession. The goal: a tool people would actually keep using.

1
Rigid meal databases create friction → 60-70% abandon within 7 days
2
Static targets ignore time-of-day context entirely
3
No exercise credit discourages active lifestyles
4
Binary pass/fail framing creates shame-based feedback loops
5
No hydration tracking despite its critical role in health
6
Short-term weight fixation over long-term trend analysis
Executive Summary

Behavioral Sustainability Over Caloric Precision

◆ The Problem

A user who has consumed 800 kcal by 2:00 PM is in a fundamentally different position than one who has consumed 800 kcal by 9:00 PM — yet every major calorie tracking app treats these states identically. Combined with rigid databases, zero exercise credit, and shame-based feedback, most apps are abandoned within days.

◆ The Solution

We built a progressive web application with a time-adjusted pacing algorithm (minute-level granularity), dynamic TDEE calculation using the Mifflin-St Jeor equation, exercise-adjusted daily budgets, positive reinforcement architecture, integrated hydration monitoring, and four levels of temporal analytics — all designed around behavioral science principles that keep users engaged long-term.

Core Algorithm

TDEE Calculation Engine & Mifflin-St Jeor Implementation

The platform computes personalized Total Daily Energy Expenditure baselines using the Mifflin-St Jeor equation — the gold standard for BMR estimation — then augments this with real-time exercise adjustments.

BMR Computation

Mifflin-St Jeor equation with sex-specific formulas: (10 × weight_kg) + (6.25 × height_cm) − (5 × age) ± offset.

Sedentary Baseline

TDEE derived by applying a 1.2× sedentary multiplier to BMR. All additional physical activity is tracked and added separately.

Dynamic Budget Adjustment

When exercise is logged, estimated calories burned are added to the daily target in real-time — rewarding activity instead of penalizing intake.

Progressive Recalculation

As users log weight changes over time, the TDEE baseline automatically updates to reflect current body composition.

TDEE Engine

// Mifflin-St Jeor (Male)

BMR = (10 × weight) + (6.25 × height) − (5 × age) + 5

// Mifflin-St Jeor (Female)

BMR = (10 × weight) + (6.25 × height) − (5 × age) − 161

TDEE = BMR × 1.2 + Exercise Calories Burned

Technical Innovation

Time-Adjusted Pacing Algorithm

The platform's most technically distinctive feature: a real-time pacing system that contextualizes a user's caloric intake relative to the time of day — with minute-level granularity via linear interpolation between hourly markers.

Hourly Cumulative Intake Curve

Calibrated to typical eating patterns with linear interpolation providing minute-level precision between markers:

6:00 AM0%
8:00 AM5%
10:00 AM20%
12:00 PM30%
2:00 PM55%
6:00 PM75%
9:00 PM95%
11:00 PM100%

Five Pacing Status Classifications

The ratio of actual intake to time-adjusted expected intake yields five contextual statuses:

On TrackWithin ±10% of expected
Under Pace>10% below expected
Ahead of Pace>10% above expected
Well Ahead>30% above expected
Great StartEarly day, low intake

Hydration pacing follows an analogous system — tracking fluid intake against a weight-based goal of 33 ml per kg of body weight per day, with its own temporal distribution curve and real-time status indicators.

What We Built

Six Integrated Platform Modules

Each module addresses a specific dimension of health tracking — from caloric intake to exercise, hydration, weight, analytics, and behavioral reinforcement — all interconnected through a unified data model.

Caloric Intake Tracking

  • Flexible, user-driven logging (no rigid meal databases)
  • Timestamped entries with meal category tags
  • Quick-add modal with preset calorie increments
  • Saved meal templates for single-tap re-entry
  • Category-based filtering for contextual relevance
  • Unified chronological timeline with exercise entries

Exercise & Activity Tracking

  • Time-based activities using MET values × body weight × duration
  • Distance-based activities with per-mile/km multipliers
  • Intensity-adjusted calorie burn estimation
  • Dynamic daily budget recalculation on log
  • Color-coded timeline integration with intake entries
  • Activity type library with preset categories

Hydration Monitoring

  • Weight-based daily goal (33 ml/kg body weight)
  • Time-adjusted hydration pacing curve
  • Beverage type categorization
  • Volume tracking with common presets
  • Integrated logging alongside calorie entry
  • Real-time status indicators and progress bars

Weight Tracking & Progress

  • Goal progress calculation from start to target
  • Weekly weigh-in reminders
  • Chronological weight history display
  • Long-term trend emphasis over daily fluctuations
  • Intentional separation from calorie tracking
  • Privacy controls via opt-out preference flags

Multi-Temporal Analytics

  • Daily view: entry breakdown with time-adjusted pacing
  • Weekly view: 7-day summary excluding incomplete day
  • Monthly view: calendar breakdown with best-day recognition
  • Yearly view: monthly aggregation with consistency scores
  • All views exclude current in-progress day from averages
  • Achievement highlights and trend identification

Behavioral Reinforcement Engine

  • Positive reinforcement — zero shame-based feedback
  • Contextual praise based on daily/weekly/monthly trends
  • Daily Wins system recognizing positive behaviors
  • Celebration animations triggered by balanced days
  • Habituation-resistant messaging rotation
  • Achievement tracking: 3+ meals, target hit, hydration met
Behavioral Science Framework

Designed to Keep Users Engaged — Not Ashamed

Every UX decision was informed by behavioral science research on habit formation, positive reinforcement, and friction reduction — deliberately avoiding the shame-based patterns that cause most health apps to be abandoned.

Positive Reinforcement

Contextual encouragement based on balance, consistency, and trends — never punishment for going over budget.

Daily Wins System

Rule-based achievement identification: logging 3+ meals, hitting target, meeting hydration goals, completing exercise.

Friction Reduction

Saved meals for one-tap entry, preset calorie buttons, integrated hydration logging, and contextual category filtering.

Celebration Animations

Physics-based Framer Motion animations triggered by balanced days — creating positive dopamine associations with good habits.

Habituation Resistance

Rotating praise messaging system prevents the brain from 'tuning out' repetitive encouragement over time.

Weight Privacy Controls

Weight tracking intentionally separated from calorie tracking with opt-out flags — preventing unhealthy fixation on daily fluctuations.

User Experience

Progressive 5-Step Onboarding Wizard

New users complete a guided onboarding flow that collects biometric data and generates a personalized TDEE recommendation — getting them from signup to tracking in under 2 minutes.

1

Basics

Age & biological sex

2

Body

Height & current weight

3

Goal

Target weight setting

4

Target

TDEE recommendation

5

Confirm

Review & start tracking

Data Architecture

Six Core Entity Types

The application's data model is built around six interconnected entities — each serving a specific tracking dimension while contributing to unified cross-metric analytics.

User Profile

Biometric data, TDEE baseline, preferences, and onboarding state

Calorie Entry

Timestamped intake records with meal category tags and amounts

Exercise

Activity logs with type, duration/distance, intensity, and calorie burn

Hydration Entry

Fluid intake records with volume and beverage type classification

Weight Entry

Periodic weigh-in records with chronological history tracking

Saved Meal

User-defined meal templates for friction-free one-tap re-entry

Technical Architecture

Technology Stack & Performance

Frontend

React 18 with Vite build tool

Styling

Tailwind CSS utility-first responsive

Animations

Framer Motion (GPU-accelerated, 60fps)

UI Components

Shadcn/UI (Radix UI primitives)

State Management

TanStack React Query with optimistic updates

Backend

Base44 BaaS with real-time subscriptions

Authentication

Built-in auth with user management

Serverless

Deno-based backend functions

Design

Mobile-first (320px to 2560px)

Optimistic Updates

Instant UI feedback via TanStack React Query — no waiting for server confirmation

Scoped Queries

Date-range scoped data fetching to minimize transfer and maximize speed

Memoized Aggregates

Expensive statistical computations cached and recalculated only when inputs change

GPU Animations

Physics-based Framer Motion maintaining 60fps on mid-range mobile devices

Transformation

Conventional Tracking vs. This Platform

✗Static daily calorie target — identical regardless of time of day
✓Time-adjusted pacing with minute-level granularity and 5 status classifications
✗Rigid meal database requiring tedious food search per entry
✓Flexible user-driven logging with saved meals, presets, and quick-add modal
✗Exercise has no impact on daily calorie budget
✓Dynamic budget adjustment — MET-based burn estimation added to TDEE in real-time
✗Binary red/green feedback creating shame and abandonment
✓Positive reinforcement architecture with contextual praise and celebration animations
✗No hydration tracking despite its health importance
✓Weight-based hydration goals with time-adjusted pacing curve
✗Single daily view with no historical context
✓Four temporal analytics views: daily, weekly, monthly, yearly — all excluding incomplete days
Key Differentiators

What Makes This Platform Different

Minute-Level
Pacing Granularity
Linear interpolation between hourly markers
Dynamic
Exercise-Adjusted Targets
Budgets that reward physical activity
4 Views
Temporal Analytics
Daily, weekly, monthly, yearly
Zero
Shame-Based Feedback
Positive reinforcement only
5 Metrics
Integrated Tracking
Calories, exercise, hydration, weight, meals
< 2 min
Onboarding to First Log
5-step progressive wizard
Why This Matters For You

Your Health App Idea Deserves Behavioral Science, Not Just Features

Most health and wellness apps fail not because of missing features, but because of poor behavioral design. They punish instead of encourage. They track without context. They create friction where there should be flow.

This case study demonstrates what's possible when technical sophistication meets behavioral science: a platform where algorithms adapt to human patterns, feedback builds positive habits, and every interaction is designed to keep users coming back.

Whether you're building a nutrition tracker, fitness app, mental health tool, or any habit-forming platform, Kompani can help you design and build software that people actually keep using.

Science-backed TDEE and metabolic rate calculation engines
Time-adjusted algorithms that adapt to real-world behavior
Positive reinforcement systems that drive long-term retention
Multi-metric tracking with unified cross-metric analytics
Progressive onboarding that reduces time-to-first-value
Mobile-first performance with GPU-accelerated animations

Ready to Build a Health & Wellness App That Sticks?

Book a free discovery call to explore how behavioral science-informed design can make your health app one people actually keep using.

© 2026 Kompani.ai — AI Solutions with a Human Touch