Tv-Maniac is a Multiplatform app (Android & iOS) for viewing TV Shows information from TMDB.
- Create
local.properties
inroot
dir - Add the following
TMDB_API_URL=https://api.themoviedb.org/3/
- Run
./gradlew generateBuildKonfig
- Java 11
- You require the latest Android Studio BumbleBee release to be able to build the app.
- Install Kmm Plugin. Checkout this setup guide.
- Navigate to ios directory & open
.xcworkspace
& not.xcodeproj
Tvmainic has 3 main directories. I'll break down each module/directory below.
- app: Anrdoid Code
- ios: iOS Workspace
- shared: Kotlin multiplatform code.
- app: This contains the entry point to the android app.
MainActivity
. There are various modules that are used across the app.- app-common: This contaions common code used in features.
- compose: Common jetpack compose components and code used by every feature. eg
theme
,colors
,ui-components
e.t.c - navigation: Core navigation logic
- annotation: Coroutine scope and dispatcher annotation used in feature modules.
- compose: Common jetpack compose components and code used by every feature. eg
- app-feature: This
module
contains feature module of the Android app. Each feature has 3 main classesFeatureNavigationFactory
: Allows us to add the screen to the navGraphComposableScreen
: UI Screen built using composeViewmodule
: Allows us to manage UI related data
- app-common: This contaions common code used in features.
- ios: This directory contains the iOS workspace.
- shared: This is where the realm of the shared logic. It contains both iOS and Android implementation. I also used a modular architecture in the shared module. This prevents us from having a huge shared module. It also becomes easy to modify and add more feature. Here's an overview of how shared is modularised.
- core: Contains common classes & functions or utility classes that are used but other modules.
- core-test: Contains test util classes. We then add this module to each module that has tests.
- database: Contains SQLDelight implementation & Sql files.
- remote: Contails Ktor implementation
- domain: This module uses a feature like approach. So we can have
domain-discover
with has two modules:api
: Contains domain interfaces/abstract classes. This module is also exported for iOS and what android feature modules depend on.implementation
: Contains domain implementation logic e.g fetch & cache data.
- interactors: This is more of a limbo module of interactor classes that don't have complete features. I didn't want to have them in the Android feature modules that why this exists. As we improve on the app, we will move these classes to the domain module and get rid of this module.
TvManiac uses two different dependencies Dagger Hilt for Android and koin for the shared module. Using Koin in the shared module allows us to provide dependencies in the iOS app.
I'll keep updating & changing things as I learn. ๐ค
- Jetpack Compose
- Coil - Image loading
- Navigation - Navigation
- ViewModel UI related data holder, lifecycle aware.
- Accompanist
- Dagger Hilt - dependency injection.
- KenBurnsView - Immersive image.
- Leakcanary - Memory leak detection.
- 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.
Android
- Implement Watchlist
- Add
More
screen. Shows GridView - Implement Search
- Recommended Shows
- Implement pagination.
- Add Settings panel.
- Dynamic theme change.
- Observe Internet connection
iOS
- Add HomeScreen: Tabs & Empty UI
- Implement Discover UI
- Show Detail Screen
- 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 -
Better MVI implementation
[ ] Have
shared-core
module have most of the implementation. [ ] Improve error state, add retry.
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.