$ show prof18/feed-flow
FeedFlow is a cross-platform RSS feed reader built with Kotlin Multiplatform and Compose Multiplatform, targeting Android, iOS, macOS, Windows, and Linux. It provides a rich reading experience with customizable layouts, reader mode with article extraction, offline content prefetching, and OPML/CSV import/export. The application emphasizes reliability through extensive unit testing, Maestro-based E2E tests for both mobile platforms, and a sophisticated cloud synchronization system supporting Dropbox, Google Drive, iCloud, FreshRSS, Miniflux, Feedbin, and BazQux. The architecture follows MVVM with clean separation of concerns (domain, data, presentation layers), uses Koin for dependency injection, SQLDelight for local persistence, and Ktor for networking. Platform-specific adaptations exist for background sync (Android WorkManager, iOS background tasks), widget support, and UI components (Compose Multiplatform for Android/Desktop, SwiftUI for iOS). The codebase demonstrates high craftsmanship with modular design, reusable abstractions (DataResult, content direction detection, image extraction, HTTP caching), and thorough test coverage including cloud sync conflict scenarios.
The LLM identified 4 files worth highlighting for reuse:
A generic sealed class for wrapping success/failure results, used pervasively across the domain layer. It provides extension functions like `map`, `fold`, `onError`, and `getOrDefault`, and is fully platform-independent. Could be extracted as a standalone utility library for any Kotlin project needing typed error handling without exceptions.
A feed refresh scheduler that computes optimal next fetch timestamps using HTTP cache-control (max-age, s-maxage, Expires) and heuristic freshness (via Last-Modified/Date), with retry-after backoff and minimum/maximum thresholds. It is fully isolated, with no internal module dependencies beyond Kotlin stdlib and kotlinx-datetime. Could be reused in any cache-aware polling system.
A utility that detects text direction (LTR/RTL) using Unicode Bidi character ranges and strong direction markers. It handles multi-line text by analyzing the majority of lines and falls back to neutral detection. Purely algorithmic and stateless, it can be extracted for any application needing per-paragraph direction detection without relying on platform APIs.
A sealed class hierarchy that determines whether a given URL is eligible for reader mode extraction. It checks for direct media URLs, known non-HTML host patterns (YouTube, Telegram, PDF, etc.), and custom overrides. The logic is purely functional and depends only on Kotlin stdlib. Could be reused as a URL categorization utility in any reader or content-processing pipeline.