tracktor π΅οΈ
A GitHub user tracking app, inspired from below GIF π€·
Can be considered as a demo project to showcase MVVM with latest android development tools
Dark Mode Available π
Usage π±
There's this person. You admire him a lot because he's a very passionate programmer. You press the follow button but you're not satisfied with GitHub's feed, since it shows only minimal information about the person you follow. Then this app is for you π
How to use? π€
- Install the latest APK from releases π₯
- Add him/her to the list by entering the GitHub
username
- Done π
Now you can see whatever he does π
Built With π
Core π
- Kotlin - First class and official programming language for Android development.
- Coroutines - For asynchronous and more..
- Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.
- Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
- LiveData - Data objects that notify views when the underlying database changes.
- ViewModel - Stores UI-related data that isn't destroyed on UI changes.
- ViewBinding - Generates a binding class for each XML layout file present in that module and allows you to more easily write code that interacts with views.
- Room - SQLite object mapping library.
- Dagger 2 - Dependency Injection Framework
- Retrofit - A type-safe HTTP client for Android and Java.
- Moshi - A modern JSON library for Kotlin and Java.
- Moshi Converter - A Converter which uses Moshi for serialization to and from JSON.
- Glide - An image loading library for Android backed by Kotlin Coroutines.
- Material Components for Android - Modular and customizable Material Design UI components for Android.
- TwinKill - A simple library, a collection of utility classes wrapped around JetPack components
- MaterialColors - Android material color palettes
- Material Dialogs - A beautiful, fluid, and extensible dialogs API for Kotlin & Android.
Testing π₯Ό
- JUnit - A programmer-oriented testing framework for Java
- Mockito - Most popular Mocking framework for unit tests written in Java
- Mockito-kotlin - To use Mockito with Kotlin
- Expekt - BDD assertion library for Kotlin
- Android Arch Testing - To test android architectural components
- Kotlin Coroutines Test - Testing utilities for effectively testing coroutines.
- Robolectric - Android Unit Testing Framework
- DaggerMock - A JUnit rule to easily override Dagger 2 objects
Instrumentation Testing π‘οΈ
- Espresso - To write concise, beautiful, and reliable Android UI tests.
- Barista - To make espresso tests faster, easier and more predictable
Architecture πΌ
This project follows the famous MVVM architecture and best practices from Google's GithubBrowserSample
Project Structure π
.
βββ androidTest
β βββ java
β βββ com
β βββ theapache64
β βββ tracktor
β βββ ui
β β βββ activities
β β βββ splash
β β β βββ SplashActivityTest.kt
β β βββ userdetail
β β β βββ UserDetailActivityTest.kt
β β βββ users
β β βββ UsersActivityTest.kt
β βββ utils
β βββ DaggerMockRules.kt
βββ main
β βββ AndroidManifest.xml
β βββ ic_launcher-playstore.png
β βββ java
β β βββ com
β β βββ theapache64
β β βββ tracktor
β β βββ App.kt
β β βββ core
β β β βββ events
β β β βββ BaseEventSupport.kt
β β β βββ EventManager.kt
β β β βββ issuecomment
β β β β βββ IssueCommentEventPayload.kt
β β β β βββ IssueCommentEventSupport.kt
β β β βββ issues
β β β β βββ IssuesEventPayload.kt
β β β β βββ IssuesEventSupport.kt
β β β βββ push
β β β β βββ PushEventPayload.kt
β β β β βββ PushEventSupport.kt
β β β βββ watch
β β β βββ WatchEventSupport.kt
β β βββ data
β β β βββ local
β β β β βββ AppDatabase.kt
β β β β βββ daos
β β β β β βββ UserDao.kt
β β β β βββ entities
β β β β βββ UserEntity.kt
β β β βββ remote
β β β β βββ ApiInterface.kt
β β β β βββ events
β β β β β βββ Event.kt
β β β β βββ user
β β β β βββ User.kt
β β β βββ repositories
β β β βββ EventsRepo.kt
β β β βββ PrefRepo.kt
β β β βββ UserRepo.kt
β β βββ di
β β β βββ components
β β β β βββ AppComponent.kt
β β β βββ modules
β β β βββ ActivitiesBuilderModule.kt
β β β βββ AppModule.kt
β β β βββ DatabaseModule.kt
β β β βββ NetworkModule.kt
β β β βββ RepoModule.kt
β β β βββ ViewModelModule.kt
β β βββ models
β β β βββ UserEvent.kt
β β βββ ui
β β β βββ activities
β β β β βββ splash
β β β β β βββ SplashActivity.kt
β β β β β βββ SplashViewModel.kt
β β β β βββ userdetail
β β β β β βββ UserDetailActivity.kt
β β β β β βββ UserDetailViewModel.kt
β β β β βββ users
β β β β βββ UsersActivity.kt
β β β β βββ UsersViewModel.kt
β β β βββ adapters
β β β βββ EventDetailsAdapter.kt
β β β βββ UserEventsAdapter.kt
β β β βββ UsersAdapter.kt
β β βββ utils
β β βββ DateTimeUtils.kt
β β βββ EventRepoUtils.kt
β β βββ NightModeUtils.kt
β β βββ StringUtils.kt
β β βββ test
β β βββ OpenForTesting.kt
β βββ res
β βββ drawable
β β βββ ic_baseline_add_24.xml
β β βββ ic_baseline_close_24.xml
β β βββ ic_baseline_delete_outline_24.xml
β β βββ ic_hacker_100.xml
β β βββ ic_launcher_foreground.xml
β β βββ ic_night_mode_24.xml
β βββ drawable-night
β β βββ ic_night_mode_24.xml
β βββ layout
β β βββ activity_splash.xml
β β βββ activity_user_detail.xml
β β βββ activity_users.xml
β β βββ item_event_detail.xml
β β βββ item_user_event.xml
β β βββ item_user.xml
β βββ mipmap-anydpi-v26
β β βββ ic_launcher_round.xml
β β βββ ic_launcher.xml
β βββ mipmap-hdpi
β β βββ ic_launcher.png
β β βββ ic_launcher_round.png
β βββ mipmap-mdpi
β β βββ ic_launcher.png
β β βββ ic_launcher_round.png
β βββ mipmap-xhdpi
β β βββ ic_launcher.png
β β βββ ic_launcher_round.png
β βββ mipmap-xxhdpi
β β βββ ic_launcher.png
β β βββ ic_launcher_round.png
β βββ mipmap-xxxhdpi
β β βββ ic_launcher.png
β β βββ ic_launcher_round.png
β βββ values
β β βββ colors.xml
β β βββ dimens.xml
β β βββ ic_launcher_background.xml
β β βββ strings.xml
β β βββ styles.xml
β βββ values-night
β βββ colors.xml
β βββ styles.xml
βββ sharedTest
β βββ java
β βββ com
β βββ theapache64
β βββ tracktor
β βββ utils
β βββ test
β βββ observeForTesting.kt
βββ test
βββ java
β βββ com
β βββ theapache64
β βββ tracktor
β βββ data
β β βββ local
β β β βββ daos
β β β βββ UserDaoTest.kt
β β βββ repositories
β β βββ EventsRepoTest.kt
β βββ ui
β β βββ activities
β β βββ splash
β β β βββ SplashViewModelTest.kt
β β βββ userdetail
β β β βββ UserDetailViewModelTest.kt
β β βββ users
β β βββ UsersViewModelTest.kt
β βββ utils
β βββ DateTimeUtilsTest.kt
β βββ StringUtilsKtTest.kt
βββ resources
βββ robolectric.properties
77 directories, 88 files
Credits π€
- π€ Icons are from flaticon.com
- ποΈ Design inspired from AnimeXStream
- π½ Data from GitHub API v3
TODO ποΈ
- Support more GitHub events
- Add more test cases
Author βοΈ
- theapache64