How chrisbanes/tivi works
High-Level Architecture Components
• Client Layer | | Domain Layer | | Data Layer |
• (UI Modules) | --> | (Use Cases) | --> | (Repositories)|
Platform-Specific Components
Create three parallel tracks for different platforms:
Android App iOS App Desktop App
• ↓ ↓ ↓
Shared Kotlin Multiplatform Code Base
Core Components Breakdown
a) UI Layer (common/ui/*)
• UI Modules |
• Account |
• Search |
• Show Details |
• Episodes |
• Settings |
b) Data Layer
• Data Sources |
• Trakt.tv API |
• TMDb API |
• Local Database |
Key Architectural Features
• UI Components | --> | Presenters | --> | Domain Layer |
• (Compose UI) | | (Circuit) | | (Interactors)|
• ↑ ↓
• Platform UI | --> | Shared State | <-- | Repositories |
• Components | | Management | | & Data Sources|
Data Flow Patterns
Flow:
User Action → Presenter → Interactor → Repository → Data Source
• ↑ ↓ ↓ ↓ ↓
UI State ← State Update ← Result ← Transformed Data ← Raw Data
Cross-Cutting Concerns
Shared services:
• Common Services |
• Analytics |
• Logging |
• Authentication |
• Image Loading |
• Notifications |
Important Implementation Details
• Kotlin Multiplatform shared code
• Compose Multiplatform UI
• SQLDelight database
• Platform-specific implementations
• Dependency injection structure