Skip to content
Architecture hub

FormAI — Fitness Koçu · Edge ML & Mobile

How FormAI works.

The opposite of the cloud-first instinct. Real-time pose detection at 30 fps runs entirely on the device's NPU — the camera frame never leaves the phone. Four steps from Flutter client to RevenueCat-managed subscriptions, with only the metadata going to Supabase.

  1. Step 01 · Flutter 3.22

    The edge client.

    A native Flutter app, single codebase for iOS and Android, state managed by flutter_riverpod 3.3. The home-screen widget and iOS Live Activity surface the current workout without opening the app. Cached network images + shimmer skeletons keep perceived perf snappy.

    WORKOUT 0415REPS LEFTNEXT SETiOSAndroid
  2. Step 02 · Google ML Kit

    The neural engine.

    Google ML Kit's pose-detection model runs on the device's NPU at 30 fps, tracking 33 body landmarks per frame. The app computes joint angles locally and evaluates rep quality against reference biomechanics — incorrect form triggers corrective audio cues via flutter_tts. Zero network round-trips per frame: the cloud never sees the camera.

    30 FPS · ON-DEVICE
  3. Step 03 · Supabase

    The sync layer.

    Supabase carries auth + a real-time Postgres backend. Workout history, programme state, and meal tracking sync in the background; the app stays usable offline and reconciles on reconnect. Sentry collects crash reports, PostHog the funnel — both opt-in, edge-instrumented.

    CLIENTSUPABASEpostgresREAL-TIME
  4. Step 04 · RevenueCat

    The monetization layer.

    RevenueCat fronts the subscription paywall, unifying App Store + Play Store entitlements behind one entitlements API. The app reads the active tier from a single source of truth instead of duplicating receipt validation per platform; receipt-mode is the same on day-one as on day-one-thousand.

    SIXPACK AI · PRO$9.99/ month Unlimited workout programmes Real-time form correction Nutrition + macro trackingREVENUECAT