<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged cloudflarechallenge</title>
<link>https://coderlegion.com/tag/cloudflarechallenge</link>
<description>Powered by Question2Answer</description>
<item>
<title>I built a streaming app with 7,000+ downloads at ₹0/month — here's the exact architecture</title>
<link>https://coderlegion.com/19611/i-built-a-streaming-app-with-7-000-downloads-at-0-month-heres-the-exact-architecture</link>
<description>&lt;p&gt;I'm Wasey, a solo developer from Varanasi, India. I built DramaHub — &lt;br&gt;
a fully live OTT streaming app on Google Play Store. 7,000+ downloads, &lt;br&gt;
1,000+ daily active users, sub-1% crash rate, ₹0/month infrastructure.&lt;/p&gt;
&lt;p&gt;Here's the exact architecture that makes it possible.&lt;/p&gt;
&lt;h3 id=&quot;the-problem&quot;&gt;The Problem&lt;/h3&gt;
&lt;p&gt;I had zero budget for servers. A typical OTT backend needs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A backend server (₹3,000–15,000/month)&lt;/li&gt;
&lt;li&gt;A database (₹1,500+/month)&lt;/li&gt;
&lt;li&gt;A CDN (₹500+/month)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I had ₹0. So I had to think differently.&lt;/p&gt;
&lt;h3 id=&quot;github-as-the-database&quot;&gt;GitHub as the Database&lt;/h3&gt;
&lt;p&gt;All drama content, episode metadata, and app config live as JSON files &lt;br&gt;
in a public GitHub repository. Free. Unlimited. Versioned automatically.&lt;/p&gt;
&lt;p&gt;Every drama looks like this in JSON:&lt;/p&gt;
&lt;p&gt;{&lt;br&gt;
  &quot;id&quot;: &quot;drama_001&quot;,&lt;br&gt;
  &quot;title&quot;: &quot;Drama Title&quot;,&lt;br&gt;
  &quot;thumbnail&quot;: &quot;&lt;a rel=&quot;nofollow&quot; href=&quot;https://cdn.jsdelivr.net/&quot;&gt;https://cdn.jsdelivr.net/&lt;/a&gt;...&quot;,&lt;br&gt;
  &quot;episodes&quot;: [&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;ep&quot;: 1,
  &quot;title&quot;: &quot;Episode 1&quot;,
  &quot;source&quot;: &quot;youtube_id_here&quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;  ]&lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;The app fetches this JSON on launch, caches it locally, and serves &lt;br&gt;
content instantly on subsequent opens.&lt;/p&gt;
&lt;h3 id=&quot;cloudflare-workers-as-the-cdn-proxy&quot;&gt;Cloudflare Workers as the CDN Proxy&lt;/h3&gt;
&lt;p&gt;Hitting GitHub raw URLs directly has rate limits. So I built a &lt;br&gt;
Cloudflare Worker that sits in front of GitHub:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Caches all JSON responses at the edge globally&lt;/li&gt;
&lt;li&gt;Handles unlimited traffic&lt;/li&gt;
&lt;li&gt;Auto-invalidates when content version changes&lt;/li&gt;
&lt;li&gt;Cost: ₹0&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Architecture: Flutter app → Cloudflare Worker → GitHub raw JSON&lt;/p&gt;
&lt;h3 id=&quot;the-dual-player-system&quot;&gt;The Dual Player System&lt;/h3&gt;
&lt;p&gt;DramaHub runs two video players:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Primary — YouTube WebView player&lt;/strong&gt;&lt;br&gt;
Most content is sourced from YouTube. The app uses a WebView-based &lt;br&gt;
player with custom controls and a URL whitelist for security.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Secondary — Custom video player with Cloudflare R2&lt;/strong&gt;&lt;br&gt;
For self-hosted content, I use a custom player backed by &lt;br&gt;
Cloudflare R2 storage.&lt;/p&gt;
&lt;p&gt;Both players are switchable instantly from the admin panel via &lt;br&gt;
remote JSON config. No APK update needed — ever.&lt;/p&gt;
&lt;h3 id=&quot;the-admin-panel&quot;&gt;The Admin Panel&lt;/h3&gt;
&lt;p&gt;This is the most important part of the architecture.&lt;/p&gt;
&lt;p&gt;The admin panel is a Flutter Web app that communicates directly &lt;br&gt;
with the GitHub REST API using Base64 encoding and SHA-based &lt;br&gt;
conflict detection. From the admin panel I can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add/edit/delete dramas and episodes&lt;/li&gt;
&lt;li&gt;Toggle ads per screen with cooldown timers&lt;/li&gt;
&lt;li&gt;Switch between YouTube and custom player instantly&lt;/li&gt;
&lt;li&gt;Change CDN URLs without any release&lt;/li&gt;
&lt;li&gt;Force update all users&lt;/li&gt;
&lt;li&gt;Control app config globally&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Everything is remote. Everything is instant. No app store review cycle.&lt;/p&gt;
&lt;h3 id=&quot;the-crash-that-taught-me-everything&quot;&gt;The Crash That Taught Me Everything&lt;/h3&gt;
&lt;p&gt;One day the app went completely down. Every user got a crash on launch.&lt;/p&gt;
&lt;p&gt;The reason: my Cloudflare Worker wasn't caching properly. Every request &lt;br&gt;
was hitting GitHub directly and I burned through the API rate limit &lt;br&gt;
in minutes.&lt;/p&gt;
&lt;p&gt;I fixed the Worker caching. Then I built a full backup system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Direct GitHub raw URL as fallback&lt;/li&gt;
&lt;li&gt;Backup Worker as secondary fallback&lt;/li&gt;
&lt;li&gt;Switchable from admin panel in under 60 seconds&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No APK release needed. I built that entire system in one night.&lt;/p&gt;
&lt;h3 id=&quot;firebase-integration&quot;&gt;Firebase Integration&lt;/h3&gt;
&lt;p&gt;Even with zero backend cost, I use Firebase for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Anonymous Auth&lt;/li&gt;
&lt;li&gt;FCM push notifications with deep links&lt;/li&gt;
&lt;li&gt;Crashlytics for real-time crash monitoring&lt;/li&gt;
&lt;li&gt;Analytics with 7 custom tracked events&lt;/li&gt;
&lt;li&gt;Atomic view counter increments via Firestore REST API&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;results-after-18-months&quot;&gt;Results After 18 Months&lt;/h3&gt;
&lt;p&gt; 7,000+ downloads&lt;br&gt;
 1,000+ daily active users&lt;br&gt;
 Sub-1% crash rate&lt;br&gt;
 ₹0/month infrastructure cost&lt;br&gt;
 Live on Google Play Store&lt;/p&gt;
&lt;h3 id=&quot;key-lesson&quot;&gt;Key Lesson&lt;/h3&gt;
&lt;p&gt;Build your admin panel first. Remote config is not a feature — &lt;br&gt;
it's survival. The ability to change anything without a new release &lt;br&gt;
has saved me dozens of times.&lt;/p&gt;
&lt;p&gt;GitHub as a database works at production scale if you architect &lt;br&gt;
the caching layer correctly.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;GitHub: github.com/waseyjamal/dramahub&lt;br&gt;
Play Store: &lt;a rel=&quot;nofollow&quot; href=&quot;https://play.google.com/store/apps/details?id=com.dramahub.drama_hub&quot;&gt;https://play.google.com/store/apps/details?id=com.dramahub.drama_hub&lt;/a&gt;&lt;br&gt;
Twitter: @waseybuilds&lt;/p&gt;
&lt;p&gt;Happy to answer any questions about the architecture.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/19611/i-built-a-streaming-app-with-7-000-downloads-at-0-month-heres-the-exact-architecture</guid>
<pubDate>Wed, 03 Jun 2026 20:39:43 +0000</pubDate>
</item>
</channel>
</rss>