{"id":17994365,"url":"https://github.com/anandwana001/catchflicks","last_synced_at":"2025-08-13T15:38:24.492Z","repository":{"id":94555757,"uuid":"229725618","full_name":"anandwana001/catchflicks","owner":"anandwana001","description":"🎬 Kitchen sink project for learning android concepts 🎬","archived":false,"fork":false,"pushed_at":"2023-07-24T09:09:23.000Z","size":3633,"stargazers_count":12,"open_issues_count":7,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T01:41:34.731Z","etag":null,"topics":["android","component-architecture","dagger2","databinding","dependency-injection","glide","jetpack","kotlin","lifecycle","material-ui","mvvm-architecture","palette-generation","retrofit2","room","rxjava","viewmodel","viewmodelfactory"],"latest_commit_sha":null,"homepage":"https://anandwana001.github.io/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anandwana001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-23T10:02:32.000Z","updated_at":"2022-10-31T04:21:05.000Z","dependencies_parsed_at":"2023-09-04T10:16:40.560Z","dependency_job_id":null,"html_url":"https://github.com/anandwana001/catchflicks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anandwana001%2Fcatchflicks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anandwana001%2Fcatchflicks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anandwana001%2Fcatchflicks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anandwana001%2Fcatchflicks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anandwana001","download_url":"https://codeload.github.com/anandwana001/catchflicks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245576526,"owners_count":20638125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","component-architecture","dagger2","databinding","dependency-injection","glide","jetpack","kotlin","lifecycle","material-ui","mvvm-architecture","palette-generation","retrofit2","room","rxjava","viewmodel","viewmodelfactory"],"created_at":"2024-10-29T20:15:03.659Z","updated_at":"2025-03-26T02:30:58.604Z","avatar_url":"https://github.com/anandwana001.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Catchflicks 🎬\n\n[![CircleCI](https://circleci.com/gh/anandwana001/catchflicks.svg?style=svg\u0026branch=master)](https://app.circleci.com/pipelines/github/anandwana001/catchflicks)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/780e812d7e2e4d0aa46e9d1da8038c84)](https://app.codacy.com/manual/anandwana001/catchflicks?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=anandwana001/catchflicks\u0026utm_campaign=Badge_Grade_Dashboard)\n\n[![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/anandwana001/catchflicks.svg?style=social\u0026label=Star\u0026maxAge=2592000)](https://GitHub.com/anandwana001/catchflicks/stargazers/)\n[![GitHub forks](https://img.shields.io/github/forks/anandwana001/catchflicks.svg?style=social\u0026label=Fork\u0026maxAge=2592000)](https://GitHub.com/anandwana001/catchflicks/network)\n[![GitHub watchers](https://img.shields.io/github/watchers/anandwana001/catchflicks.svg?style=social\u0026label=Watch\u0026maxAge=2592000)](https://GitHub.com/anandwana001/catchflicks/watchers)\n[![GitHub followers](https://img.shields.io/github/followers/anandwana001.svg?style=social\u0026label=Follow\u0026maxAge=2592000)](https://github.com/anandwana001?tab=followers)\n![Twitter Follow](https://img.shields.io/twitter/follow/akshay81844?label=Follow\u0026style=social)\n\n\n**Catchflicks** is a sample project after completing [Android Development Online Course For Professionals by MindOrks](https://bootcamp.mindorks.com/). \n\nThis app shows the popular movies, upcoming movies and the ongoing movies in theatre from the movie db API.\nThe goal of this sample project is to implement most of the learning from the Bootcamp. Also, this project works as a kitchen sink project where anyone can play with any new Android API's and concepts.\n\n\n## Screenshot 📱\n\u003cp float=\"left\"\u003e\n\u003cimg src=\"https://raw.github.com/anandwana001/catchflicks/master/screenshot/update_screenshot.jpg\" width=\"200\" height=\"400\" /\u003e\n\u003cimg src=\"https://raw.github.com/anandwana001/catchflicks/master/screenshot/detail_screen.jpg\" width=\"200\" height=\"400\" /\u003e\n\u003cimg src=\"https://raw.github.com/anandwana001/catchflicks/master/screenshot/search_frag.jpg\" width=\"200\" height=\"400\" /\u003e\n\u003cimg src=\"https://raw.github.com/anandwana001/catchflicks/master/screenshot/search_result.jpg\" width=\"200\" height=\"400\" /\u003e\n\u003c/p\u003e\n\n\n## Architecture\nProject consist of multiple packages in order to achieve MVVM architecture.\n* data\n* di\n* ui\n* utils\n\n\n## Tech-stack 🛠\nThis project use multiple libraries to bring easy way of implementation\n- [Dagger2](https://dagger.dev/) - Dependency Injection Framework\n- [Retrofit](https://square.github.io/retrofit/) - Used for Networking\n- [Timber](https://github.com/JakeWharton/timber) - Helps in logging \n- [Glide](https://github.com/bumptech/glide) - use to load image\n- [RxJava](https://github.com/ReactiveX/RxJava) - to perform asynchronous work\n- [GSON](https://github.com/google/gson) - use to serialize and deserialize Java objects to JSON\n- [Lifecycle](https://developer.android.com/topic/libraries/architecture/lifecycle) - manage activity and fragment lifecycle\n- [LiveData](https://developer.android.com/topic/libraries/architecture/livedata) - observable data holder\n- [AndroidX](https://developer.android.com/jetpack/androidx) - android library for core functionalities\n- [ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel) - manage data in lifecycle aware fashion\n- [Material Components for Android](https://github.com/material-components/material-components-android) - Modular and customizable Material Design UI components for Android\n- [Data Binding](https://developer.android.com/topic/libraries/data-binding) - helps to bind UI with data source\n- [Palette API](https://developer.android.com/training/material/palette-colors) - dynamically change app color scheme\n\n\n## Development Setup ⚙️\nThis project uses the [TMDb API](https://developers.themoviedb.org/4/getting-started) to fetch movies data.\u003cbr\u003e\nTo begin with the setup, firstly you need to create an API key. \n\n1. Create an account at [themoviedb.org](https://www.themoviedb.org/documentation/api)\n1. Go to settings from the profile icon\n1. Click on API\n1. Click on create\n\n```\n# Insert at ~/.gradle/gradle.properties or catchflicks/gradle.properties\nAPI_KEY=\u003cinsert\u003e\n```\nThis project uses the Dagger2 for dependency Injection. After opening this project in your Android Studio you might get some error which is due unavailability of few classes. You need to `make project` or try to build the project, this will generate all the required classes for dagger. \n\n\n## Custom ViewModelProviderFactory 🦾🦿\nI had created a custom `ViewModelProviderFactory` class because I need to pass arguments in my View Model class constructor. \n\n- Default -\u003e `ViewModelProviders.of(this).get(MyViewModel.class);`\n- `ViewModelProviders.of`, this depends upon a `ViewModelStore` and a `ViewModelFactory`\n- `return new ViewModelProvider(activity.getViewModelStore(), factory);`\n- `getViewModelStore()` under the hood uses `onRetainNonConfigurationInstance()` method and `SavedStateRegistryController` class which calls `performRestore()` and `performSave()` method of `SavedStateRegistry` class. \n- `ViewModelStore` store view model using `HashMap\u003cString, ViewModel\u003e`\n- So, if we have arguments in our view model class constructor then we create custom `ViewModelProviderFactory`.\n\n\u003cbr\u003e\n\n```\nclass ViewModelProviderFactory\u003cT : ViewModel\u003e(\n    private val kClass: KClass\u003cT\u003e,\n    private val creator: () -\u003e T\n) : ViewModelProvider.NewInstanceFactory() {\n\n    @Suppress(\"UNCHECKED_CAST\")\n    @Throws(IllegalArgumentException::class)\n    override fun \u003cT : ViewModel\u003e create(modelClass: Class\u003cT\u003e): T {\n        if (modelClass.isAssignableFrom(kClass.java)) return creator() as T\n        throw IllegalArgumentException(\"Unknown class name\")\n    }\n}\n```\n\n```\n    ViewModelProviders.of(activity, ViewModelProviderFactory(MainViewModel::class){\n            // MainViewModel(PARAM_1,PARAM_2)\n        }).get(MainViewModel::class.java)\n```\n\n- We are extending our custom class with `ViewModelProvider.NewInstanceFactory()`.\n- This is used to create the instance of the given class. \n- This by default returns class object with empty argument list. `return modelClass.newInstance();`\n- **KClass** is the holder of a class of type ViewModel that needs to be injected.\n- Instances of **KClass** class are obtainable by the `::class` syntax.\n- This is the Lambda function, this is provided by the ActivityModule/FragmentModule, when creator lambda is called then that module creates and return the instance of ViewModel.\n\n\n## Work in Progress 🚧🛠🚧\n- [ ] Search feature\n- [ ] Unit Testing\n- [ ] UI Testing, using espresso and mockito\n- [ ] Update Region option\n- [ ] Update Language option\n- [ ] Try Pagination API\n- [ ] Dark Mode\n- [ ] Try Navigation Component\n- [ ] Coroutine\n- [ ] Better UI\n- [ ] Bookmark Movie\n\n\n## Contact 🔗\nLet's connect here -\u003e [anandwana001.github.io](https://anandwana001.github.io/)\n\n\n## License 📝\n```\nMIT License\n\nCopyright (c) 2020 Akshay Nandwana\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandwana001%2Fcatchflicks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanandwana001%2Fcatchflicks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandwana001%2Fcatchflicks/lists"}