$ show euzu/tuliprox
Tuliprox is a production-grade IPTV streaming proxy and DVR system written in Rust, with a WebAssembly frontend in Yew. It aggregates IPTV sources from M3U, Xtream, Stalker, HDHomeRun, and media servers (Plex/Emby/Jellyfin) and presents them as a unified streaming backend via multiple protocols (HLS, Xtream, M3U, HDHomeRun). The system provides advanced features: HLS caching and segment repair, recording with conflict resolution and retention policies, RBAC with per-user connection limits and GeoIP filtering, EPG with smart matching, playlist transformation with a DSL-based mapping engine, and comprehensive notification channels (Discord, Telegram, Slack, etc.). The architecture is modular with many loosely-coupled crates (auth, session, hls, dvr, parser, repository, messaging) sharing a common model crate (`shared`), which enforces type safety and prevents configuration drift between frontend and backend. The frontend is a rich single-page application with real-time dashboards, source/playlist editors, user management, and a setup wizard. The codebase demonstrates high craftsmanship in its custom B+Tree storage engine, HLS state machine, notification channel trait, and frontend form management macros. It is actively maintained with CI/CD, Docker deployment, and clear separation of concerns, though some dependency version pinning and large enum variants indicate areas for cleanup.
The LLM identified 4 files worth highlighting for reuse:
A custom B+Tree storage engine with WAL, compression, sorted-index sidecar, and versioned migrations. Provides transactional key-value storage with async I/O and memory-mapped files. Used as the primary persistence layer for playlists, EPG, and QoS snapshots. The implementation is cleanly separated into versioned modules (v2, v3) with a common codec, and exposes a 'test-support' feature for dependent crates. This component is fully extractable for any project needing a performant embedded database with ACID-like guarantees.
A notification channel abstraction using a trait-based `Channel` enum with static dispatch. Each channel (Discord, Gotify, Ntfy, Pushover, REST, Slack, Telegram) implements the same `NotificationChannel` trait, supporting retry, rate-limit parsing, and a standardized `Delivery` outcome enum (Delivered, Retry, Permanent, Skipped). The pattern is cleanly separated from the rest of the messaging crate and can be reused in any application needing multi-channel notification delivery with consistent error handling.
A fully-fledged HLS reverse proxy implementation with manifest fetching, acceptance logic, segment repair, backpressure control, and state machine for terminal cutover. It includes sub-modules for pricing/quality selection, recovery timing, session management, and QoS metering. The code is highly modular (manifest_fetch, refresh, availability, etc.) and uses an event-driven approach with extensive test coverage. This component can be extracted as a standalone HLS proxy library for any streaming system.
A complex form editor for IPTV source configuration that uses a custom `generate_form_reducer!` macro to manage state for deeply nested configuration objects (M3U, Xtream, Stalker, HDHomeRun, library sources). It demonstrates a reusable pattern for building form-heavy UIs in Yew: each source type has a dedicated input form component, and the reducer pattern separates state updates from rendering. The source editor also includes a DSL-based rules editor for playlist mapping. This component is a well-crafted example of form management in a WASM application.