How we built a fitness subscription app with on-demand and live video classes, workout tracking, and offline mode — serving 80K+ subscribers, 2M+ workouts logged, and a 4.8 app store rating.
Fitness App · Live & On-Demand
A fitness brand with a loyal following wanted to transition from in-person studio classes to a digital subscription model. They had a library of recorded workouts and plans to add live classes with real-time instructor interaction. Their existing app was a simple video player — no workout tracking, no progress history, and no offline support. Subscribers complained about buffering during peak hours and the inability to workout in gyms or outdoors without Wi‑Fi.
They needed a React Native app with high-quality video streaming (on-demand and live), workout tracking that synced progress across devices, subscription management via Stripe with trials and upgrades, and an offline mode that let users download classes for use without connectivity. The app had to feel native — smooth scrolling, quick load times, and a 4.8+ rating target. Live classes required low-latency streaming; we evaluated Agora and Twilio for real-time video.
On-demand videos buffered during morning and evening rush. Live classes had 5–10 second latency — by the time users saw the move, the instructor was already on the next one. No adaptive bitrate for varying connections.
Users logged workouts on one device and switched to another — progress didn't follow. No cross-device history. Recommended “next workout” logic didn't account for completed sessions.
Trials, monthly, and annual plans lived in separate flows. Upgrades and cancellations required support. Webhook handling was incomplete — some cancellations didn't revoke access promptly.
Many users worked out in gyms with poor cell service or ran outdoors without data. There was no way to download classes. The app was unusable without connectivity — a major churn driver.
We built a React Native app with a Node.js backend. On-demand video uses HLS via AWS MediaConvert and CloudFront; we added adaptive bitrate so mobile users get lower quality during slow connections. Live classes use Agora (with Twilio fallback) for sub-second latency. Workout tracking stores completed sessions in PostgreSQL and syncs via a REST API with conflict resolution. Stripe powers subscriptions with a single webhook handler that updates access and triggers in-app notifications. Offline mode downloads encrypted video segments to local storage; the app checks entitlement before playback.
Offline mode was the most complex piece. We built a download manager that fetches HLS segments, stores them encrypted, and registers them in a local SQLite index. The video player checks the index first — if segments exist locally, playback is from disk. Entitlement is checked at download time and at playback; expired subscribers lose access to downloaded content. We added a 48-hour grace period for subscriptions that failed to renew, reducing involuntary churn.
Audited existing video library and live class requirements. Evaluated Agora vs. Twilio for live streaming. Designed HLS pipeline and offline download architecture. Defined workout tracking schema and sync protocol.
Built React Native app with video player (HLS.js / exo). Implemented Node.js API for content and auth. Integrated Stripe subscriptions with webhooks. Added workout tracking and sync.
Integrated Agora for live streaming. Built offline download manager with encrypted storage. Added subscription grace period and entitlement checks. Optimized for performance and battery.
Beta with 2K users. Fixed playback and sync edge cases. Launched to 80K+ subscribers. Monitored retention and churn. Achieved 4.8 app store rating and 2M+ workouts logged.
Fitness apps live or die by video quality and offline support. Users work out in environments with unreliable connectivity — gyms, parks, hotels. Adaptive bitrate HLS eliminated buffering complaints. Offline downloads were a top feature request; we built a background download manager that respects storage limits and battery. Users can queue classes before a trip and watch without data. That drove significant retention improvement.
Live classes needed sub-second latency. Pre-recorded HLS has 10–30 second delay, which is fine for on-demand but unusable for live. Agora gave us real-time streaming with interactive features (chat, reactions). We added Twilio as fallback for regions where Agora has issues. The live class adoption exceeded expectations — 30% of subscribers joined at least one live session per week.
Workout sync had to be seamless. Users switch between phone and tablet; progress must follow. We use last-write-wins with server timestamps — conflicts are rare (same user, same workout) but we handle them gracefully. The “next workout” recommendations use completed sessions to avoid repetition and encourage variety. That drove engagement: users who tracked 5+ workouts had 2x retention vs. those who didn't.
We help health & wellness brands build subscription apps with video, tracking, and offline. Let's talk about your architecture.