This app is a simple application that retrieves a list of restaurants from a json file located in the assets folder in the provider module.
- Allow user to favorite a restaurant
- Sort the restaurant Listing by sort values
- Filter a restaurant by name.
- Favorite a restaurant.
-
Android Studio 4.1.1+
-
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.
- Room - SQLite object mapping library.
- Navigation - Android Navigation Component
- 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.
-
- Hilt-Dagger - Standard library to incorporate Dagger dependency injection into an Android application.
- Hilt-ViewModel - DI for injecting
ViewModel
.
- This app uses MVVM (Model View View-Model) architecture, repository pattern and clean architecture.
- In line with the clean architechure, this project is divided into different modules:
- App (This is the main entry of the application)
- Cache (This module handles everything concerning the Room database)
- Core ( This is an abstraction of the essentials of the app)
- Data (This includes the domain layer. It implements the interface exposed by the domain layer and dispenses data to the app.
- Domain (This contains the business Logic of the Application)
- Provider (This provides an abstraction for the data source i.e. Json File)
- Restaurants (This is main UI layer)
- Clone this repo and run on an android device.
- This app requires a minimum sdk of 24
- For unit Tests, you can either run a project wide test using
./gradlew test
or go to theApp
,Cache
andRestaurants
Modules to run them individually. - For Instrumentation/UI test, you can also run
./gradlew connectedAndroidTest
or locate theRestuarantActivityTest.kt
file in the androidTest directory in the restaurant module