{"id":3735,"url":"https://github.com/patrickyin/clean-architecture-android-kotlin","last_synced_at":"2025-06-13T02:30:20.123Z","repository":{"id":48214569,"uuid":"125701011","full_name":"patrickyin/clean-architecture-android-kotlin","owner":"patrickyin","description":"Using Uncle Bob's clean architecture with Kotlin language and the latest Android technologies(Rx, Dagger2 etc.).","archived":false,"fork":false,"pushed_at":"2019-04-18T00:06:53.000Z","size":417,"stargazers_count":330,"open_issues_count":4,"forks_count":45,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-12-07T07:33:52.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrickyin.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}},"created_at":"2018-03-18T07:08:56.000Z","updated_at":"2024-09-26T16:15:16.000Z","dependencies_parsed_at":"2022-08-24T18:41:35.723Z","dependency_job_id":null,"html_url":"https://github.com/patrickyin/clean-architecture-android-kotlin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/patrickyin/clean-architecture-android-kotlin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickyin%2Fclean-architecture-android-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickyin%2Fclean-architecture-android-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickyin%2Fclean-architecture-android-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickyin%2Fclean-architecture-android-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickyin","download_url":"https://codeload.github.com/patrickyin/clean-architecture-android-kotlin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickyin%2Fclean-architecture-android-kotlin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259566872,"owners_count":22877605,"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":[],"created_at":"2024-01-05T20:16:49.933Z","updated_at":"2025-06-13T02:30:20.074Z","avatar_url":"https://github.com/patrickyin.png","language":"Kotlin","funding_links":[],"categories":["Uncategorized","Development Alternatives"],"sub_categories":["Uncategorized","Kotlin"],"readme":"# Android Clean Architecture - Kotlin\n\n[![Build Status](https://travis-ci.org/patrickyin/clean-architecture-android-kotlin.svg?branch=master)](https://travis-ci.org/patrickyin/clean-architecture-android-kotlin) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-clean--architecture--android--kotlin-green.svg?style=flat )]( https://android-arsenal.com/details/1/6851)\n\n***This is an Android Clean Architecture base project using 100% Kotlin including Unit tests!***\n\nYou could use it as the base project when you create a new Android project. This architecture optimized the Clean Architecture and MVP for the Android Kotlin project. When using this architecture, you could isolate the UI, business logic and data sources, and also making the unit test easier. It uses latest and most popular technologies e.g. Dagger2, RxJava etc.\n\n## Benefit\n\n* Makes your new project clean\n* Isolates UI, business logic and data sources' responsibilities\n* Testable\n* Avoids multi-threading problems\n\n## Approach of Clean Architecture for Android\nThere are 3 layers in the project: Data, Domain and Presentation(UI), and the UI layer contains view and presenters.\n\n![Approach of Clean Architecture for Android - Patrick Yin](./clean_architecture_pyin.png)\n\n## Multi-threading\nBase `UseCase` class handles the thread of Rx chains, it puts  whole chain on IO thread, and then changes back to Android main thread(UI thread) for the steps after use case execution. That means when you write the project based on this project, then you don't have to worry about any multi-threading issue.\n\n## Requirements \u0026amp; configurations\n#### Requirements\n- JDK 8\n- Android SDK API 26\n- Kotlin Gradle plugin 1.2.30 *(it will be installed automatically when this project is synced)*\n\n#### Configurations\n- minSdkVersion=21\n- targetSdkVersion=26\n\n## Language\n*   [Kotlin](https://kotlinlang.org/)\n\n## Libraries\n*   [AndroidX](https://developer.android.com/jetpack/androidx)\n*   [Dagger 2](https://google.github.io/dagger/)\n*   [RxJava2](https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0)\n*   [RxAndroid](https://github.com/ReactiveX/RxAndroid)\n*   [OkHttp](http://square.github.io/okhttp/)\n*   [Retrofit](http://square.github.io/retrofit/)\n*   [Gson](https://github.com/google/gson)\n*   [JUnit 4](https://junit.org/junit4/)\n*   [Mockito](http://site.mockito.org/)\n*   [PowerMock](https://github.com/powermock/powermock/)\n*   [Espresso](https://developer.android.com/training/testing/espresso/index.html)\n\n## More about The Clean Architecture\n\n[The Clean Architecture](https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html)\n\n[S.O.L.I.D Principle](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))\n\n\nMore articles available on my blog: \u003chttps://medium.com/@pyin001\u003e\n\n## TODO\n\n\n## Bugs and Feedback\n\nFor bugs, feature requests, and discussion please use  [GitHub Issues](https://github.com/patrickyin/clean-architecture-android-kotlin/issues). For general usage questions please use the  [StackOverflow](https://stackoverflow.com/questions/tagged/clean-architecture%20\u0026%20android%20\u0026%20kotlin).\n\n## License\n\n```\nCopyright 2017 Patrick Yin\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickyin%2Fclean-architecture-android-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickyin%2Fclean-architecture-android-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickyin%2Fclean-architecture-android-kotlin/lists"}