A technical overview of the streaming engine, proxy servers, and Flutter architecture powering the NovaFlix media client.
We take immense pride in our engineering. However, to comply with strict safety guidelines, protect our intellectual property from malicious cloning, and secure our API integrations, the raw source code of NovaFlix remains closed-source.
We are, however, thrilled to share the architectural blueprint and advanced networking techniques that power the application below.
Instead of relying on expensive traditional backend servers (like AWS or Firebase), NovaFlix ingeniously utilizes the official Telegram API (via the C++ TDLib engine) as an infinite, encrypted cloud storage database. By authenticating users securely, the app indexes channels, files, and media metadata instantly without centralized server costs.
This is the core engineering masterpiece of NovaFlix. To achieve seamless video scrubbing without downloading entire files, the app spins up a pure memory-piped micro-server on 127.0.0.1:8080. This custom proxy intercepts media requests, handles precise Accept-Ranges: bytes headers, and dynamically streams sparse-file data chunks straight from TDLib to the video player in real-time.
Playback is powered by the highly performant media_kit engine (based on mpv), providing vast codec support natively. The UI is fully immersive with custom gesture controls for brightness and volume, PiP (Picture-in-Picture) triggered via native Android/iOS method channels, and integrated Google Cast support to push streams to Smart TVs.
User data, watch history, last-loaded channels, and exact video resume positions are tracked locally using SharedPreferences. The app also features a robust Downloads Manager that handles background threading, allowing users to safely cancel streams, clear cache, or commit media to offline persistent storage.
To prevent Telegram API rate-limiting, all search inputs are shielded behind Timer-based debouncers. The UI relies on highly efficient Flutter widgets like ListenableBuilder and AnimatedBuilder to react instantly to proxy network states, ensuring the UI thread is never blocked during heavy byte-streaming.