04 / 04Product Engineering · Mobile · AI

A full fitness product built from workout tracking to AI, mobile, and subscriptions.

MuscleBot is a cross-platform fitness, nutrition, and recovery application combining workout logging, adaptive nutrition, AI coaching, Android Health Connect, push notifications, and subscription infrastructure.

PRIMARY PROOF:Product engineering, mobile, AI, monetization, product judgment
ReactCapacitorAIRevenueCat
01 / THE PROBLEM

Fragmented Fitness Tools & The Productization Challenge

Fitness users frequently juggle 3–4 disconnected applications: one for workout logging, one for calorie counting, one for wearable sleep/recovery metrics, and another for training advice.

  • Disjointed user experience across multiple single-purpose apps
  • Lack of unified recovery-aware workout progression
  • Manual, tedious food logging requiring exact grams and barcode scans
  • The product-engineering challenge of combining web, native Android, AI, and monetization

Can a small engineering effort turn a broad fitness concept into an actual cross-platform product with mobile integrations and monetization?

02 / WHAT I BUILT

System Overview & Capabilities

MuscleBot combined training, nutrition, wearable recovery, and AI coaching into a unified cross-platform product.

  • Training: 1,300+ exercises, structured set logging, rest timer, 14-muscle anatomical heatmap
  • Nutrition: Natural-language food parser, deterministic macro recalculation, adaptive TDEE trends
  • Recovery: Android Health Connect sleep and activity ingestion, 0–100 readiness engine
  • AI Coaching: Dual-model architecture (DeepSeek for reasoning + Groq for rapid parsing)
  • Mobile Packaging: Capacitor 8 Android app (v1.0.5, versionCode 25) with push notifications & native back handling
  • Subscriptions: RevenueCat + Google Play Billing with database-enforced feature tier limits
03 / SYSTEM ARCHITECTURE

Data Flow & Infrastructure

01React 19 + Vite Frontend
02TanStack Query (Offline-first persistence)
03Supabase Auth & PostgreSQL Data Layer
04AI Engine (DeepSeek + Groq / Llama 3.3 70B)
05Capacitor 8 Android Bridge
06Health Connect (Steps, Sleep Window, Calories)
07RevenueCat + Google Play Billing Subscriptions
08FCM HTTP v1 Push Notifications
PIPELINE ARCHITECTURE DIAGRAM
React 19 + Vite SPA (TanStack Query Offline Cache)
        ↓
Supabase Auth + PostgreSQL Database
        ↓
AI Pipelines (DeepSeek Reasoning + Groq Fast Parsing)
        ↓
Capacitor 8 Native Bridge (Android v1.0.5)
        ├── Android Health Connect (Sleep window 18:00+, steps, energy)
        ├── RevenueCat / Google Play Billing (Subscriptions)
        ├── FCM Push Notifications (Hourly Edge Functions)
        └── Native Haptics, Status Bar, Back Navigation
Core Technical Stack:
React 19ViteTypeScriptTailwindCSSCapacitor 8SupabasePostgreSQLTanStack QueryDeepSeekGroq / Llama 3.3 70BRevenueCatGoogle Play BillingAndroid Health ConnectFirebase Cloud Messaging (FCM)Cloudflare R2Vercel
04 / KEY ENGINEERING DECISION

Dual-Model AI Architecture & Deterministic Macro Calculation

Choosing the right model for the job and recalculating nutrition deterministically

MuscleBot deliberately separates AI workloads across two specialized providers: DeepSeek is utilized for conversational AI coaching, workout generation, and progress reports where reasoning depth matters; Groq (Llama 3.3 70B) is utilized for instant natural-language food parsing and meal plan recalculation.

Crucially, the application never trusts raw model calorie arithmetic. The LLM extracts food quantities and estimated macros (protein, carbs, fat), and the application deterministically calculates calories via: Calories = (Protein × 4) + (Carbs × 4) + (Fat × 9).

💡
Use a fast structured-model path for extraction-heavy operations and a more reasoning-oriented path for conversational or planning tasks, while keeping arithmetic deterministic.
05 / IMPLEMENTATION DEPTH

Engineering Details

14-Muscle Group Training Volume Engine

Exercises are mapped to primary and secondary muscle groups. Secondary muscles receive a 40% volume allocation relative to primary movement contribution, visualized via an anatomical heatmap.

  • Sets persisted as JSON (weight, reps, rpe, set_type).
  • Calculates cumulative volume load (Volume = weight × reps).
  • Visualizes fatigue and volume distributions across 14 muscle groups.

Deterministic Readiness Engine (40 / 35 / 25)

Generates a 0–100 daily readiness score combining wearable telemetry with workout history.

  • Sleep duration (40% weight): Sourced from Health Connect with overnight window starting at 18:00.
  • Recovery duration (35% weight): Days elapsed since last strenuous training session.
  • Volume strain (25% weight): Previous-day training volume relative to the 7-day rolling average.

Capacitor 8 Native Android Engineering

Reaching Android release v1.0.5 (versionCode 25) required solving platform-specific native behaviors.

  • Intercepting hardware back-button navigation to dismiss modals/drawers without exiting.
  • Managing software keyboard resize and viewport reflow during food logging.
  • Health Connect permissions handling and sleep session boundary queries.
  • RevenueCat subscription entitlement sync into Supabase with tiered feature limits.

FCM Push Notifications & Edge Functions

Firebase Cloud Messaging HTTP v1 integrated with Supabase Edge Functions running hourly cron jobs to deliver automated AI progress reports.

06 / INTERACTIVE VISUAL DEMONSTRATION

System Centerpiece & Inspection

Inspect the live execution state, benchmarks, security boundaries, and architectural guarantees.

GROQ / LLAMA 3.3 70BRAPID EXTRACTION
User Input:

“2 roti with chicken curry and a spoon of butter”

Model Decomposition:
  • Whole Wheat Roti (2 pcs): ~30g carbs, 6g protein
  • Chicken Curry (150g): ~28g protein, 10g fat
  • Butter (1 tbsp / 14g): ~11g fat
DETERMINISTIC CALORIE RECALCULATORP×4 + C×4 + F×9

The application does not trust raw model calorie arithmetic. Macros are extracted and recalculated deterministically:

Protein (4 kcal/g):45g (180 kcal)
Carbohydrates (4 kcal/g):60g (240 kcal)
Fat (9 kcal/g):18g (162 kcal)
TOTAL RECALCULATED ENERGY:582 kcal
07 / EVALUATION & VERIFICATION

Rigorous Verification Evidence

v1.0.5Android Release

versionCode 25 compiled & deployed

1,300+Exercises Catalog

Categorized with 14-muscle mappings

40/35/25Readiness Formula

Sleep (40%), rest (35%), volume (25%)

2 ProvidersAI Workloads

DeepSeek (reasoning) + Groq (parsing)

08 / CANONICAL SCENARIO

Natural Language Meal Parsing & Macro Balancing

OBSERVED INCIDENT / CONTEXT

User inputs conversational text: '2 roti with chicken curry and a spoon of butter'.

STEP-BY-STEP SYSTEM EXECUTION
1

Groq (Llama 3.3 70B) decomposes meal into individual ingredients and portions

2

Extracts estimated protein, carbohydrate, and fat values per item

3

Frontend clamps macro bounds and deterministically calculates calories (P×4 + C×4 + F×9)

4

User adjusts portions interactively in UI with instant arithmetic recalculation

5

Saves meal log to Supabase and updates daily calorie/macro budget bars

FINAL OUTCOME / DIAGNOSIS

Fast, frictionless nutrition logging with mathematically consistent calorie totals.

09 / DEMONSTRATED SKILLS

Engineering Capabilities Proven

Full-stack web and mobile product engineering
Capacitor 8 cross-platform Android packaging
Dual-model AI architecture (DeepSeek + Groq)
Native Android integrations (Health Connect, Google Sign-In, FCM)
Subscription infrastructure (RevenueCat + Google Play Billing)
Offline-first client data caching (TanStack Query)
Product experimentation and commercial validation judgment
10 / LIMITATIONS & SCOPE BOUNDARIES

Disciplined Technical Claims

Transparent Claims Discipline:
  • MuscleBot is a technically complete product experiment that was commercially discontinued after market evaluation.
  • The product does not claim a large user base, profitable SaaS revenue, or iOS application support.
  • Natural-language calorie estimation is an LLM estimation workflow, not a certified clinical nutritional database.
  • The codebase does not contain a dedicated automated unit/E2E test suite; evidence is based on working product architecture and Android release.
11 / LESSONS LEARNED

Engineering Retrospective

Building the product and validating the business are separate problems. Recognizing when additional engineering will not fix a weak commercial position is itself a critical engineering skill.

Feature Breadth Is Not Differentiation

A product can combine many technically impressive features and still resemble established products with superior distribution.

Distribution Dominates Consumer Software

In crowded consumer categories, engineering quality alone does not solve user acquisition against incumbents with proprietary databases.

Commercial Judgment

Deciding to discontinue commercial startup pursuit and open-source the codebase saved engineering focus for higher-leverage systems.

NEXT CASE STUDY (01 / 04)

TracePilot

Evidence-grounded AI incident investigation with hybrid retrieval, durable execution, and deterministic citation validation.

GET IN TOUCH

Have a system worth
building together?

I’m available for full-time engineering roles, high-impact contract builds, and applied AI systems. Send a direct inquiry below—messages are automatically delivered to my primary inbox.

SYSTEM INTAKE // DIRECT MESSAGE AUTOMATED INBOX DISPATCH
PROFESSIONAL NETWORK

LinkedIn Chat

Connect directly for professional opportunities, network conversations, and quick messaging.

OPEN SOURCE & CODE

GitHub Profile

Review codebases, architectural implementations, and public project repositories.