Kuzgun
Kuzgun: A Personal Media Streaming App That Flies on Its Own Terms
Every project has a spark moment. For Kuzgun, it was the question: "Why can't I just stream my own content from my own server?"
Today I'd like to introduce a project I've been developing for a while: Kuzgun an Android application that lets you manage your personal media library and securely stream your content from anywhere. You can check out the landing page at app.kuzgun.tr.
Why Kuzgun?
There are dozens of media servers and streaming apps out there. Plex, Jellyfin, Emby... They all do their job well. But they share common pain points: either the Android experience falls short, there's no torrent integration, or the management side is overly complicated.
Kuzgun was born to solve these gaps in a single app. The goal is simple: watch your videos, manage your downloads, adjust your subtitles — all from one place.
Architecture: Kotlin + Rust
Kuzgun consists of two main components:
Android Client: Written from scratch in Kotlin with Jetpack Compose. The entire UI is 100% declarative Compose, following Material Design 3 principles with Samsung OneUI 8 compatibility. Video playback is powered by ExoPlayer (androidx.media3).
Rust Backend: The server side is built with the Actix-web 4 framework in Rust. It features PostgreSQL for data persistence, Argon2 password hashing, JWT-based authentication, and qBittorrent API integration. Rust's memory safety and performance characteristics enable low resource consumption with high concurrency.
Communication between these components happens entirely over REST API, secured with SSL encryption.
Key Features
Video Player
Kuzgun's video player is far from ordinary. Built on top of ExoPlayer, it includes custom-designed controls:
Gesture-based controls: Vertical drag on the left side of the screen adjusts brightness, right side adjusts volume. Horizontal drag controls seeking.
Double-tap seeking: Double-tap right for +10 seconds, left for -10 seconds.
Subtitle support: A custom parser was written to handle SRT, VTT, and ASS/SSA formats. Subtitles are automatically loaded from the server or can be picked from the device. For synchronization issues, manual adjustment with ±0.1 second precision is available.
Picture-in-Picture (PiP): On Android 12+ devices, the app automatically enters PiP mode when minimized. Playback controls are also shown on the lock screen.
Watch history: Videos automatically resume where you left off. Watch positions are stored server-side, meaning you can switch devices and continue right where you stopped.
Download Management
Kuzgun isn't just a video player — it's also a powerful download manager:
Torrent support: Paste a magnet link to add a torrent. The torrent is initially sent to qBittorrent in a paused state, allowing you to select which files to download before starting. Once you've made your selection, the download begins. Real-time speed, seed/peer counts, and progress information are tracked.
HTTP downloads: Direct file downloads via URL. Pause, resume, and progress tracking are built in. Automatic filename extraction from Content-Disposition headers is supported.
Admin Panel
A comprehensive management panel is available for admin users:
User management: Create accounts, delete them, or reset passwords. Each user is assigned a dedicated root folder, ensuring they can only access their own files.
Activity tracking: Login/logout events, IP addresses, and all user actions are logged with timestamps.
System-wide monitoring: All users' torrent and HTTP downloads can be viewed from a single screen.
Auto Updates
Kuzgun stays up to date with its built-in update system. On app launch, the latest version on the server is checked. If an update is available, the downloaded APK's SHA-256 hash is verified before installation begins. Release notes entered during deployment are displayed to users along with the update prompt.
Security Approach
Kuzgun operates on a closed membership system. There's no public registration page; users can only be created by an admin. JWT-based authentication, Argon2-hashed passwords, and per-user folder isolation form the cornerstones of security.
On the deployment side, APK uploads and version registrations are protected by a build secret. On the client side, every downloaded APK undergoes SHA-256 verification before installation.
Technical Stack
For those interested in the technical details:
Android: Kotlin, Jetpack Compose, ExoPlayer 1.9.0, Retrofit 2.11.0, OkHTTP 4.12.0, Coil 3.0.4. Min SDK 26 (Android 8.0), Target SDK 35 (Android 15).
Backend: Rust, Actix-web 4, SQLx (async PostgreSQL), jsonwebtoken, Argon2. qBittorrent API integration.
Database: PostgreSQL with 9 migrations covering: users, activity logs, download tracking, torrent management, watch progress, and app versions.
Deployment: Automated deploy script (build, hash, upload, register, verify) enables one-command releases.
Infrastructure: Nginx reverse proxy, Let's Encrypt SSL, systemd service management.
Conclusion
Kuzgun provides an end-to-end solution for personal media management. Video streaming, torrent and HTTP downloads, subtitle support, PiP mode, watch history, and an admin panel — all in a single app. The Kotlin + Rust combination delivers a modern, performant, and secure experience on both the client and server sides.
The project operates on an invite-only closed membership basis, but those curious can explore the app's landing page.
Landing page: https://app.kuzgun.tr

