tv-maniac
TvManiac is a personalized entertainment tracking and recommendation Multiplatform app. By utilizing TMDB, we can view shows, create a watchlist get statistics, and much more. This project aims to demonstrate KMP development capabilities. This is currently running on:
- Android: Compose
- iOS: SwiftUI
🚧 Under Heavy Development 🚧
This is my playground for learning Kotlin Multiplatform. With that said, I'm sure it's filled with bugs crawling everywhere, and I'm probably doing a couple of things wrong. So a lot is changing, but that shouldn't stop you from checking it out.
| Android | iOS |
|---|---|
[!IMPORTANT]
API Keys & Configuration Setup
The app requires both TMDB and Trakt API credentials to function properly.
1. TMDB API Key
- Create a TMDB API app and generate an API key
2. Trakt OAuth Credentials
- Create a Trakt API app
- Set the Redirect URI to:
tvmaniac://callback- Copy your Client ID and Client Secret
3. Add to local.properties
Create a
local.propertiesfile in the project root (if it doesn't exist) and add your credentials:TMDB_API_KEY=your_tmdb_api_key_here TRAKT_CLIENT_ID=your_trakt_client_id_here TRAKT_CLIENT_SECRET=your_trakt_client_secret_here TRAKT_REDIRECT_URI=tvmaniac://callbackFor CI/CD: Set these as environment variables with the same names.
🖥 Project Setup & Environment
Requirements
- Zulu Java 21
- You require the latest Android Studio release to be able to build the app.
- Install KMM Plugin. Checkout this setup guide.
Opening iOS Project
- Navigate to the ios directory & open
.xcodeproj
Git Hooks
The project uses Git hooks to enforce code quality checks before commits. To install the hooks, run:
./scripts/install-git-hooks.sh
This will install the following hooks:
- pre-commit: Runs code formatting checks using Spotless before allowing a commit. If the checks fail, the commit will be aborted.
Architecture Overview
- [ ] TODO: Add detail architecture
Gradle Convention Plugins
The project uses custom Gradle convention plugins to maintain consistent build configurations across modules. These plugins help standardize dependencies, compiler settings, and build logic throughout the codebase. For an in-depth guide on how these convention plugins are created, structured, and published to Maven Central, check out the article: Publishing Gradle Convention Plugins.
Libraries Used
Android
- Accompanist
- Android-youtube-player - Youtube Player
- AppAuth - AppAuth for Android is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
- Compose Lints - Custom lint checks for Jetpack Compose.
- Jetpack Compose
- Coil - Image loading
- KenBurnsView - Immersive image.
- Leakcanary - Memory leak detection.
Kmp - Common
- Coroutines - Concurrency & Threading
- DataStore Preferences - Data storage
- DateTime - Date & Time
- Decompose - Kotlin Multiplatform library for breaking down your code into lifecycle-aware business logic components (aka BLoC).
- Kermit - Logging
- kotlin-inject-anvil - Dependency Injection library.
- Kotlinx Serialization - De/Serializing JSON
- Ktor - Networking
- Kotest Assertions - Testing
- Multiplatform Paging A library that adds additional Kotlin/Multiplatform targets to AndroidX Paging, and provides UI components to use Paging on iOS.
- SQLDelight - Local storage
- Coroutines Extensions Consume queries as Flow
- Paging -
iOS
- AppAuth - OAuth 2.0 and OpenID Connect client SDK for iOS
- SDWebImage - Async image downloader.
- Youtube PlayerKit - Swift Youtube Player
Roadmap
Android
- [x] Implement Watchlist
- [x] Add
Morescreen. Shows GridView - [x] Recommended Shows
- [x] Implement pagination.
- [x] Add Settings panel.
- Dynamic theme change.
- [x] Add Seasons UI
- [x] Implement trakt auth & sign in
- [x] Migrate to Material3
- [x] Implement Paging
- [x] Implement Search
- [ ] Add Episode detail screen
- [ ] Create Design System
iOS
- [x] Add HomeScreen: Tabs & Empty UI
- [x] Implement Discover UI
- [x] Show Detail Screen
- [x] Add Settings panel.
- [x] Implement trakt auth & sign in
- [x] Update show detail UI
- [x] Add Seasons Detail UI
- [x] Implement Paging
- [x] Implement Search
- [ ] Add Episode detail screen
Shared
- [x] Use SQLDelight extensions to consume queries as Flow
- [x] Refactor interactor implementation.
- [x] Use koin for injection
- [x] Modularize
sharedmodule - [x] Try out Flow-Redux
- [x] Add test cases.
- [x] Migrate to BuildConfig for unified configuration
- [ ] Implement Trakt tracking
- [ ] Track Shows
- [ ] Track Episodes
- [ ] Fix paging
- [ ] Improve error handling.
References & Inspiration
License
Copyright 2021 Thomas Kioko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
