Solution App using Guide to app architecture, in 100% Kotlin, using Android Jetpack Components.
Before running this app, you need to add your Github Personal Access Token, in your local.properties
file:
GITHUB_TOKEN="xxxx-xxxx-xxx"
Before every commit, make sure you run the following bash script:
./codeAnalysis
Develop an application that uses Github REST APIs to achieve the following features:
- Search for a user profile on Github and display his account details, including, but not limited to, image, bio, username and number of repositories.
- Have the ability to display the user followers, and following lists. (the accounts that the user is following, and the accounts that are followed by the selected user)
- Display a detail page of the user's repositories and display the repository details, including, but not limited to, name, stars and description.
- This information should be saved in the database for offline use
-
Tech-stack
- Kotlin - a cross-platform, statically typed, general-purpose programming language with type inference.
- Coroutines - perform background operations.
- Flow - handle the stream of data asynchronously that executes sequentially.
- KOIN - a pragmatic lightweight dependency injection framework.
- Retrofit - A type-safe HTTP client for Android and the JVM
- Chuck - An in-app HTTP inspector for Android OkHttp clients
- Jetpack
- Timber - a highly extensible android logger.
- Leak Canary - a memory leak detection library for Android.
-
Architecture
- Clean architecture with ViewModel, UseCases and Repositories
-
Tests
- Unit Tests (JUnit) - a simple framework to write repeatable tests.
- MockK - mocking library for Kotlin
- Kluent - Fluent Assertion-Library for Kotlin
- Kakao - Nice and simple DSL for Espresso in Kotlin
-
Gradle
- Gradle Kotlin DSL - For reference purposes, here's an article explaining the migration.
- Plugins
- Ktlint - creates convenient tasks in your Gradle project that run ktlint checks or do code auto format.
- Detekt - a static code analysis tool for the Kotlin programming language.
- Spotless - format java, groovy, markdown and license headers using gradle.
- Dokka - a documentation engine for Kotlin, performing the same function as javadoc for Java.
- jacoco - a Code Coverage Library