Git Product home page Git Product logo

notflix's Introduction

NotFlix

Notflix

🛠️Under constant refactor/development - Develop Branch

An android and iOS app built using Kotlin Multiplatforom that consumes TMDB API to display current trending, upcoming and popular movies🍿 and tvshows🎬.

Kotlin Multiplatform is a framework of Kotlin that allows for sharing of a single codebase for business logic across different targets/platforms. Some of the targets supported by kotlin are: Android, iOS, Kotlin/JVM, Kotlin/JS, Android NDK, Windows, Linux, macOS etc.

Compose Multiplatform is a UI framework maybe by Jetbrains that allow for simple and accelerated desktop application and web development using compose. Compose multiplatform also allows sharing compose UI code between diffrent platforms. eg android, iOS desktop(Windows, Linux, MacOS) and web.

Table Of Content

Screenshots

Android

iOS

Desktop

Prerequisite

// ToDo

Running

Set up the local.properties file in the project's root directory (if it doesn't already exist) by adding the following properties:

api_key=<YOUR TMDB API KEY>

Run with the following command:

./gradlew run

Libraries

Shared

  • Compose Multiplatform - Compose Multiplatform is a declarative framework for sharing UIs across multiple platforms with Kotlin based on Jetpack compose.
  • Koin - Kotin dependency injection library with multiplatform support.
  • Ktor - Provides multiplatform libraries required to make network calls to the REST API.
  • Multiplatform Settings - This is a Kotlin library for Multiplatform apps, so that common code can persist key-value data.
  • kotlinx.coroutines - Library support for Kotlin coroutines with multiplatform support.
  • kotlinx.serialization - Provides sets of libraries for various serialization formats eg. JSON, protocol buffers, CBOR etc.
  • kotlinx.datetime - A multiplatform Kotlin library for working with date and time.
  • Napier - Logger library for Kotlin Multiplatform.
  • BuildKonfig - Supports embedding values from gradle file.
  • Image Loader - Compose Image library for Kotlin Multiplatform

Related Resources

In this section I've included some resources ie. articles and GitHub repositories that i used to learn about kotlin multiplatform mobile:

Videos 📽️

Articles/Blogs 📖

Sample Projects 🤖

  • KMM Sample - A sample project for experiments with Kotlin Multiplatform mobile.
  • Fantasy Premier League - Kotlin Multiplatform project with Jetpack Compose, Compose for Desktop and SwiftUI clients (and using Ktor for remote API requests and Realm for persistence).
  • KaMPKit
  • People In Space - Minimal Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Compose for Wear OS, Compose for Desktop, Compose for Web, and Kotlin/JS + React clients along with Ktor backend.
  • Poetree - Poetree is a minimalistic poetry app that helps people freely access art from a global community full of poetry lovers.

Other Helpful Resources

In this section I've included resources that are not related to kotlin multiplatform mobile but were really helpful in learning other android components and tools:

Videos 📽️

  • ToDo

Articles/Blogs 📖

Sample Projects 🤖

notflix's People

Contributors

gabo-android avatar kagiri11 avatar ndiritumichael avatar tresat avatar victorkabata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

notflix's Issues

App Crash when accessing detailed movies

1/ Launch the App
2/ Select a movie on the home page to access to the detail page
3/ The view starts to display then crashes with this error message :
android.database.sqlite.SQLiteException: no such column: true (Sqlite code 1 SQLITE_ERROR): , while compiling: SELECT isFavorite FROM Movies Table WHERE id=? AND isFavorite=true, (OS error - 11:Try again)
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1030)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:637)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:610)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:66)
at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1482)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1452)
at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.query(FrameworkSQLiteDatabase.java:161)
at androidx.room.RoomDatabase.query(RoomDatabase.java:446)
at androidx.room.util.DBUtil.query(DBUtil.java:83)
at com.vickikbt.cache.daos.MoviesDao_Impl$10.call(MoviesDao_Impl.java:594)
at com.vickikbt.cache.daos.MoviesDao_Impl$10.call(MoviesDao_Impl.java:591)
at androidx.room.CoroutinesRoom$Companion$createFlow$1$1.invokeSuspend(CoroutinesRoom.kt:122)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:929)

Language changes is not affecting the app

I have changed the language to French however the sentences/presentation are still in english

PS : I have killed and relaunched the app same problem
Maybe the movies are stored on local database and not reloaded when the language changes ?

Building project

Faced with this issue when was building project in Android Studio, any ideas why this might have happened?

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':shared:podInstall' (type 'PodInstallTask').
  - In plugin 'org.jetbrains.kotlin.gradle.scripting.internal.ScriptingKotlinGradleSubplugin' type 'org.jetbrains.kotlin.gradle.targets.native.tasks.PodInstallTask' property 'podfile$kotlin_gradle_plugin_common' specifies file '~/Desktop/sandbox/Notflix/iOSNotflix/Podfile' which doesn't exist.
    
    Reason: An input file was expected to be present but it doesn't exist.
    
    Possible solutions:
      1. Make sure the file exists before the task is called.
      2. Make sure that the task which produces the file is declared as an input.

There was another one and I tried to find those classes and could not, are they really in com.vickikbt.shared.domain.utils?

> Task :shared:compileKotlinIOS FAILED
e: file:///Users/Andrei.Sheremeev/Desktop/sandbox/Notflix/shared/src/iOSMain/kotlin/com/vickikbt/shared/di/Module.kt:3:41 Unresolved reference: DatabaseDriverFactory
e: file:///Users/Andrei.Sheremeev/Desktop/sandbox/Notflix/shared/src/iOSMain/kotlin/com/vickikbt/shared/di/Module.kt:5:30 Unresolved reference: ios
e: file:///Users/Andrei.Sheremeev/Desktop/sandbox/Notflix/shared/src/iOSMain/kotlin/com/vickikbt/shared/di/Module.kt:10:14 Unresolved reference: DatabaseDriverFactory
e: file:///Users/Andrei.Sheremeev/Desktop/sandbox/Notflix/shared/src/iOSMain/kotlin/com/vickikbt/shared/di/Module.kt:13:14 Unresolved reference: Ios

Images not showing

Images don't load with the error message below

W/Glide: Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored

why RepositoryImpls are using flowOf()

I want to thank you first,
then I hope you answer my question, it is a question, not an issue 😃

All ApiService methods are returning suspend functions
suspend fun fetchMovieDetails(movieId: Int): MovieDetailsDto?

why are MovieDetailsRepositoryImpl methods had converted toflowOf ()
e.g

    override suspend fun getMovieDetails(movieId: Int): Flow<MovieDetails?> {
        val networkResponse = apiService.fetchMovieDetails(movieId = movieId)

        return flowOf(networkResponse?.toDomain())
    }

what are the benefits of making all repo methods in kotlin flow,
where consuming suspend fun is easier than flow?
also combing two suspend funs is much easier to combine two flows to create new usecases.

I see this pattern I would like to know the secret behind 😎

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.