TvManiac
TvManiac is a Multiplatform app (Android & iOS) for viewing TV Shows information from TMDB. The aim of this project is do demonstrate KMM development capabilities.
You can Install and test latest android app from below
🚧 Under Heavy Development 🚧
This is my playground for learning Kotlin Multiplatform. With that said, I'm sure it's filled bugs are 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 Screenshots
🔆 iOS Screenshots
🖥 Project Setup & Environment
Api Keys
You need to add API keys from Trakt.tv & TMDb. To do so:
- Create
local.properties
inroot
dir - Add the following
TMDB_API_URL=https://api.themoviedb.org/3/ TMDB_API_KEY=ENTER_URI TRAKT_CLIENT_ID=ENTER_KEY TRAKT_CLIENT_SECRET=ENTER_KEY TRAKT_REDIRECT_URI=ENTER_KEY
- Run
./gradlew generateBuildKonfig
Android
- Java 11
- You require the latest Android Studio Dolphin release to be able to build the app.
- Install Kmm Plugin. Checkout this setup guide.
Opening iOS Project
- Navigate to ios directory & open
.xcworkspace
& not.xcodeproj
Genereating Swift Package Locally
In case you make changes to the shared
module and want to test out the changes, you can generate the swift package locally by:
- Execute
./gradle createSwiftPackage
. This will generate a swift package outside the root directory. - Add the generated package in XCode.
Project Structure & Architecture
I wrote an article, Going Modular — The Kotlin Multiplatform Way detailing the modularization process and thinking behind the structure of the shared module.
Libraries Used
Android
- Jetpack Compose
- Coil - Image loading
- Navigation - Navigation
- ViewModel UI related data holder, lifecycle aware.
- WorkManager Handle persistent work
- Accompanist
- Dagger Hilt - dependency injection.
- KenBurnsView - Immersive image.
- Leakcanary - Memory leak detection.
- Android-youtube-player - Youtube Player
- AppAuth - AppAuth for Android is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
Kmp - Common
- Ktor - Networking
- Kotlinx Serialization - De/Serializing JSON
- Coroutines - Concurrency & Threading
- DateTime - Date & Time
- SQLDelight - Local storage
- Coroutines Extensions Consume queries as Flow
- Napier - Logging
- Mockk - mocking library for Kotlin.
- koin - Injection library.
iOS
- Kingfisher - Image library.
- TvManiac - TvManiac SwiftPackage.
Roadmap
Android
- Implement Watchlist
- Add
More
screen. Shows GridView - Recommended Shows
- Implement pagination.
- Add Settings panel.
- Dynamic theme change.
- Add Seasons UI
- Implement trakt auth & sign in
- UI State improvement.
- Add Episode detail screen
- Add Watchlist
- Implement Search
iOS
- Add HomeScreen: Tabs & Empty UI
- Implement Discover UI
- Show Detail Screen
- Implement trakt auth & sign in
- Add Seasons UI
- Implement Search UI
- Implement Watchlist UI
- Implement Load more
Shared
- Use SQLDelight extensions to consume queries as Flow
- Refactor interactor implementation.
- Use koin for injection
- Modularize
shared
module - Try out Flow-Redux
- Improve error handling, add retry.
- Add test cases.
- Fix paging
- Better MVI implementation
- Observe Internet connection
- Android
- iOS
References
License
Copyright 2022 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.