Welcome 👋
NASA Pictures App is an android app that displays awesome pictures parsed from a json file.
It is written 100% in Kotlin with both unit and integrated tests.🙂
- Kotlin
- Android Support Libraries
- Coroutine
- Flow
- Room
- SharedPreferences
- Hilt
- Coil
- OkHttp
- Gson
- Timber
- Lottie
- LikeButton
- JUnit
- Mockito
- Robolectric
- JDK 1.8
- Android SDK
- Android 11 (API 30)
- Latest Android SDK Tools and build tools.
- To run this code, clone this repository using this command
git clone https://github.com/segunfrancis/NASA-Pictures-App.git
- Import into android studio
- Build the project and run on an android device or emulator
The architecture of the project follows the principles of Clean Architecture and MVVM. Here's how the project implements it:
The app when run will show you a simple list of awesome pictures parsed from a json file.
Let's look at each of the architecture layers and the role each one plays :)
This layer makes use of the Android Framework and is used to create all of our UI components to display inside of the Main Activity. This layer contains the views(activities and fragments) and the ViewModel. The ViewModel receives its data from the use cases of the domain layer and then supplies the views.
The domain layer responsibility is to simply contain the UseCase instance used to retrieve data from the Data layer and pass it onto the Presentation layer.
The Data layer is our access point to external data layers and is used to fetch data from multiple sources (examples are cache and network). In this case, it gets data from the local source only. It contains an implementation of the Repository.
The local layer contains the business logic that converts the JSON to a list of data that we can use. It contains Room database implementation for storing of pictures that has been added to bookmark. There is also a preference helper class that manages the entire shared preference of this application.
- Jed Nocum - Lottie Animation