An Arabic and English strength-training application that computes deterministic progression and runs on-device XGBoost model inference directly inside the mobile runtime without cloud latency.
Most fitness applications rely on remote cloud APIs to generate workout recommendations. This introduces severe friction in real gym environments with poor reception, causes noticeable latency, and prevents workout tracking when offline.
GAIN was engineered around a core invariant: the smartphone is the sole source of truth. All core algorithms—from set-to-set adaptation to workout history persistence and Arabic right-to-left layout rendering—execute entirely on the device.
Rather than embedding heavy C++ runtimes or making network requests, a bundled XGBoost model is interpreted directly in TypeScript with strict float32 precision and missing-value traversal logic. Progression engine algorithms set baseline target ranges, while the model dynamically adapts the next set based on fatigue signals.
Expo SQLite persists all workout sessions, rep records, and equipment increments locally. Client-generated UUIDs, monotonic timestamps, and deletion markers support optional delta sync with Cloudflare Workers and D1 database instances.
The decision engine enforces discrete gym equipment increments (e.g., 2.5 kg plates or dumbell steps). The recommendation requires explicit user confirmation and immediately falls back to deterministic rule-based progression if inputs diverge from acceptable bounds.
Engineered with full bidirectional support (LTR and RTL), direction-aware UI components, localized muscle group terminologies, and Arabic text rendering tested across iOS and Android viewports.
Clean, high-contrast dark interface designed for fast set logging between exercises, available in native Arabic and English:


