Inspiration

Most fitness and workout apps make a fundamental mistake: they treat everyone like a beginner who needs hand-holding through ten generic pre-recorded workouts, locked behind expensive paywalls or heavy video streams.

Experienced, self-directed athletes—whether practicing calisthenics, powerlifting, yoga, or HIIT—already know their routines. They don't need a virtual trainer telling them how to do a push-up. They need a smart, distraction-free companion that keeps the score, respects their rest days, loops their personal form-check videos, and works flawlessly offline.

We built Kinetiq with a simple philosophy: "Your routine. Your rules. We keep the score."


What it does

Kinetiq is a modular, offline-first workout and yoga companion designed for self-directed athletes and coaches:

  • Custom Interval & Rep Timers: Build flexible routines with per-exercise work/rest intervals, auto-advancing timers, or manual "Done/Next" reps tracking.
  • In-App Video Loop Guidance: Attach your own $\le 5\text{s}$ video clips or curated stock loops that play seamlessly during work intervals to keep your form locked in without buffering or streaming.
  • Yoga & Breathwork Audio Bed: Zen audio cues, audio transitions (inhale/exhale), and text-to-speech guidance that dynamically yields when exercise media contains audio.
  • Realistic Streaks & Rest Days: Scheduled rest days protect your streak instead of penalizing you for recovering. If life happens, sensible streak-recovery options keep you motivated.
  • Accurate MET Calorie Estimation: Estimates calories burned summed per exercise using the ACSM formula based on individual exercise intensity tiers: $$\text{kcal/min} = \text{MET} \times 3.5 \times \frac{\text{Body Weight (kg)}}{200}$$
  • Shared Classrooms (Offline-First): Instructors and coaches publish routines to a classroom. Members join using a 6-character Crockford Base32 code (e.g. kinetiq://join?code=...) or link. Routines are mirrored locally so members can train with zero network access.
  • Smart Learned Reminders: Instead of nagging at arbitrary times, Kinetiq computes the statistical mode of your last 20 training sessions to remind you at your natural workout time.
  • Re-Play Timelapse Progress: Daily progress photos with a 20% ghosted camera overlay of your previous pose. When ready, export an H.264 MP4 timelapse video directly to your gallery—100% locally with all EXIF/GPS data stripped for privacy.
  • Rich Android Home Widgets: Real-time home-screen widgets for Streaks, Weekly Activity, Calories, and Quick-Start.

How we built it

  • Mobile Architecture: Built with Flutter & Dart (Android-first) utilizing Riverpod for declarative, predictable state management following a strict domain/, application/, and presentation/ layered architecture.
  • Deterministic Timer Engine: A pure Dart finite-state machine with wall-clock time anchoring (clock.now()). Time is fed into the engine with carry-over across boundaries, ensuring zero drift even if the OS throttles background execution.
  • Local-First Database: Powered by Drift (SQLite) (Schema v11). We enforced a strict architectural separation:
    • exercise_structure: lightweight JSON containing interval structure, MET intensity, and TTS cues.
    • exercise_media: local file references and trim window offsets $[t_{\text{start}}, t_{\text{end}}]$.
  • Classroom Backend: Lightweight Supabase (PostgreSQL) backend managing classroom memberships and versioned JSON routine sheets (kinetiq_sheet: 2), paired with passwordless Email OTP authentication.
  • Zero-FFmpeg Native Video Pipeline: To avoid adding heavy $\sim 30\text{ MB}$ FFmpeg binaries, we engineered a custom Android native MediaCodec + MediaMuxer encoder in Kotlin that renders canvas frames into hardware-accelerated $720 \times 960$ 30 FPS H.264 MP4 timelapses.
  • Background Isolation & Widgets: Android home screen widgets run through Kotlin RemoteViews bound to Dart snapshots and periodically refreshed via Android WorkManager background isolates.

Challenges we ran into

  1. Background Timer Throttling: Modern mobile operating systems heavily throttle background processes and tickers. Standard timers drift significantly when the screen is locked. We solved this by anchoring our timer engine to real elapsed wall-clock intervals, catching up deterministically on resume while maintaining a continuous Android foreground service.
  2. Video Trimming Without FFmpeg Bloat: Trimming video clips on mobile usually requires bulky FFmpeg forks that bloat APK sizes and drag in licensing baggage. We treated video trimming as a playback window model (TrimWindow) looping directly inside video_player, bypassing re-encoding entirely until export.
  3. Hardware Video Encoding: Building our own native MediaCodec + MediaMuxer pipeline required handling hardware color spaces (I420 planar format with BT.709 color matrices), padding plane strides, and handling 16-pixel alignment across varying GPU chipsets.
  4. Offline-First Data Isolation: Blending shared cloud classrooms into a local SQLite database meant instructor routines could accidentally collide with a user's personal exercise library. We implemented strict query isolation (classroomId IS NULL) and resilient cascading rules so members never lose their personal workout history or streak if a classroom is removed.
  5. Drift Watch Streams in Widget Tests: Open reactive watch streams in widget tests caused Flutter's test runner to hang indefinitely. We learned to isolate persistence testing to pure-Dart memory database suites and mock reactive streams with fakes in UI widget tests.

Accomplishments that we're proud of

  • True Offline-First Reliability: Every core feature—interval tracking, voice cues, video loops, streaks, and photo timelapses—operates 100% offline. Zero spinners, zero buffering in the gym or yoga studio.
  • Sub-Millisecond Engine Precision: An exhaustively tested, deterministic timer and streak engine with high test coverage and zero visual jitter.
  • Lightweight Native Media Stack: A bespoke, lightweight video loop and H.264 timelapse generation pipeline without external media bloat.
  • Crafted Design System: Built-in high contrast dark-mode design tokens (KqColors, KqType, KqSpace), fluid transitions, and zen ambience sound beds that make training feel immersive.

What we learned

  • Pure State Machines Beat UI-Driven Timers: Isolating domain logic into a pure Dart state machine decoupled from Flutter widgets made time travel testing, pause/resume, and background recovery completely rock-solid.
  • The Discipline of Offline-First: Designing schemas with client UUIDs, server version stamps, and local cache mirrors from day one prevents costly architectural rewrites when scaling from single-player to multi-user experiences.
  • Privacy by Default: Stripping EXIF/GPS metadata and keeping body metrics, photos, and training logs stored exclusively on device provides unmatched user trust.

What's next for Kinetiq: Workout Planner

  • Health Connect Integration: Syncing active workout sessions, heart rate, and step counts with Android Health Connect.
  • Universal App Links & Web Previews: Enabling https://kinetiq.app/join deep links with web previews for instructors sharing routines across Instagram, TikTok, and YouTube.
  • Creator Marketplace: Allowing verified fitness trainers and yoga instructors to publish and monetize routine packs and specialized coaching programs.
  • iOS Release: Bringing the exact same offline-first fluidity and custom video loops to Apple devices.

Built With

Share this project:

Updates

Submission history