Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thecodemonks/topcorn2

A minimalistic movie listing app to browse IMDB's top 250 movies, built to demonstrate MVVM with Jetpack Compose.
https://github.com/thecodemonks/topcorn2

android-mvvm jetpack-compose jetpack-navigation retrofit2-kotlin

Last synced: 2 months ago
JSON representation

A minimalistic movie listing app to browse IMDB's top 250 movies, built to demonstrate MVVM with Jetpack Compose.

Awesome Lists containing this project

README

        

![GitHub Cards Preview](https://github.com/TheCodeMonks/topcorn2/blob/master/extras/topcorn2_coverart.jpg?raw=true)

# TopCorn 2 🍿

A minimalistic movie listing app to browse IMDB's top 250 movies,
built to *demonstrate MVVM with Jetpack Compose*.

[![GitHub issues](https://img.shields.io/github/issues/TheCodeMonks/topcorn2)](https://github.com/TheCodeMonks/topcorn2/issues)
[![GitHub forks](https://img.shields.io/github/forks/TheCodeMonks/topcorn2)](https://github.com/TheCodeMonks/topcorn2/network)
[![GitHub stars](https://img.shields.io/github/stars/TheCodeMonks/topcorn2)](https://github.com/TheCodeMonks/topcorn2/stargazers)
[![GitHub license](https://img.shields.io/github/license/TheCodeMonks/topcorn2)](https://github.com/TheCodeMonks/topcorn2/blob/master/LICENSE)
[![Twitter](https://img.shields.io/twitter/url?style=social)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2FTheCodeMonks%2Ftopcorn2)

***Try latest TopCorn2 app apk from below πŸ‘‡***

[![TopCorn2](https://img.shields.io/badge/TopCorn2🍿-APK-black.svg?style=for-the-badge&logo=android)](https://github.com/TheCodeMonks/topcorn2/releases/latest/download/app-debug.apk)


## Designs - Dark Mode Available πŸŒ™
![dark_screenshots](extras/screenshot_light.png)
![dark_screenshots](extras/screenshot_dark.png)


## Built With πŸ› 

- [Kotlin](https://kotlinlang.org/) - First class and official programming language for Android development.
- [Coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html) - For asynchronous and more..
- [Flow](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/) - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.
- [Compose](https://developer.android.com/jetpack/compose) - Android’s modern toolkit for building native UI.
- [Navigation](https://developer.android.com/guide/navigation) - A set of libraries, a plugin, and tooling that simplifies Android navigation.
- [Android Architecture Components](https://developer.android.com/topic/libraries/architecture) - Collection of libraries that help you design robust, testable, and maintainable apps.
- [LiveData](https://developer.android.com/topic/libraries/architecture/livedata) - Data objects that notify views when the underlying database changes.
- [ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel) - Stores UI-related data that isn't destroyed on UI changes.
- [Room](https://developer.android.com/topic/libraries/architecture/room) - SQLite object mapping library.
- [Hilt](https://dagger.dev/hilt/) - Dependency Injection Framework
- [Retrofit](https://square.github.io/retrofit/) - A type-safe HTTP client for Android and Java.
- [Moshi](https://github.com/square/moshi) - A modern JSON library for Kotlin and Java.
- [Moshi Converter](https://github.com/square/retrofit/tree/master/retrofit-converters/moshi) - A Converter which uses Moshi for serialization to and from JSON.
- [Coil](https://github.com/chrisbanes/accompanist/blob/main/coil/README.md) - An image loading library for Android.
- [Material Components for Android](https://github.com/material-components/material-components-android) - Modular and customizable Material Design UI components for Android.


## Architecture πŸ—Ό

This project follows the famous MVVM architecture and best practices from Google's [GithubBrowserSample](https://github.com/android/architecture-components-samples/tree/master/GithubBrowserSample)

![](extras/arch.jpg)


## Project Structure πŸ“‚

```
β”œβ”€β”€ App.kt
β”œβ”€β”€ data
β”‚Β Β  β”œβ”€β”€ local
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ AppDatabase.kt
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Converters.kt
β”‚Β Β  β”‚Β Β  └── daos
β”‚Β Β  β”‚Β Β  └── MoviesDao.kt
β”‚Β Β  β”œβ”€β”€ remote
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ ApiInterface.kt
β”‚Β Β  β”‚Β Β  └── Movie.kt
β”‚Β Β  └── repo
β”‚Β Β  └── MoviesRepo.kt
β”œβ”€β”€ di
β”‚Β Β  └── modules
β”‚Β Β  β”œβ”€β”€ DatabaseModule.kt
β”‚Β Β  β”œβ”€β”€ NetworkModule.kt
β”‚Β Β  └── PreferenceModule.kt
β”œβ”€β”€ model
β”‚Β Β  └── Category.kt
β”œβ”€β”€ ui
β”‚Β Β  β”œβ”€β”€ common
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Fakes.kt
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Poster.kt
β”‚Β Β  β”‚Β Β  └── RetryMessage.kt
β”‚Β Β  β”œβ”€β”€ main
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ MainActivity.kt
β”‚Β Β  β”‚Β Β  └── MainViewModel.kt
β”‚Β Β  β”œβ”€β”€ screen
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ detail
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ MovieDetailFragment.kt
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ MovieDetailScreen.kt
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── MovieDetailViewModel.kt
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ movies
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ MoviesFragment.kt
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ MoviesScreen.kt
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── MoviesViewModel.kt
β”‚Β Β  β”‚Β Β  └── splash
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ SplashFragment.kt
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ SplashScreen.kt
β”‚Β Β  β”‚Β Β  └── SplashViewModel.kt
β”‚Β Β  β”œβ”€β”€ test
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ TestActivity.kt
β”‚Β Β  β”‚Β Β  └── TestViewModel.kt
β”‚Β Β  └── theme
β”‚Β Β  β”œβ”€β”€ Theme.kt
β”‚Β Β  └── Typography.kt
└── utils
β”œβ”€β”€ calladapter
β”‚Β Β  └── flow
β”‚Β Β  β”œβ”€β”€ FlowResourceCallAdapterFactory.kt
β”‚Β Β  β”œβ”€β”€ FlowResourceCallAdapter.kt
β”‚Β Β  └── Resource.kt
β”œβ”€β”€ flow
β”‚Β Β  └── EventFlow.kt
└── NetworkBoundResource.kt

21 directories, 34 files
```

## Ohh you hate Compose? NP 🀷

Well, we've XML version here, The [TopCorn 1](https://github.com/theapache64/topcorn)

## Credits πŸ€—

- πŸ€“ Icons are from [flaticon.com](https://www.flaticon.com/)
- πŸ–ŒοΈ Design inspired from [AnimeXStream](https://github.com/mukul500/AnimeXStream)
- πŸ’½ Data from [top250 API](https://github.com/theapache64/top250)
- πŸ“„ Thanks [Foodium](https://github.com/patilshreyas/Foodium)


## TODO πŸ—’οΈ

- [ ] Improve algorithms and code review
- [ ] Add test cases