This project implements the Fetch Rewards Mobile Coding Challenge, which involves fetching and displaying a list of items from a given API. The app retrieves data, filters out invalid entries, and presents a grouped and sorted list in a user-friendly UI. The requirements are outlined in https://fetch-hiring.s3.amazonaws.com/mobile.html.
This is a multi-module project using Gradle convention plugins that share logic between modules. More can be learned from:
- https://docs.gradle.org/current/samples/sample_convention_plugins.html
- https://developer.squareup.com/blog/herding-elephants/
- https://developer.android.com/topic/modularization
NOTE: This project is overengineered on purpose (multi-modules, Room, etc) just to showcase my expertise in these areas. In a project this small, these technologies are very much overkill.
- Fetch data from the provided API.
- Filter out items with blank or null names.
- Group items by
listId. - Sort items first by
listIdand then byname. - Display the processed list in a clean UI.
- Stores data in Room database
- Search by
namein list - Pull to refresh
- Robust error handling with Snackbars based upon different error scenarios (http errors, storage error, etc.)
- Kotlin for development.
- Jetpack Compose for UI.
- Hilt for Dependency Injection.
- Retrofit for API calls.
- Room for local caching.
- Navigation for screen routing.
- Multi-Module for separation of concerns
- Coroutines & Flow for asynchronous operations.
- JUnit & Mockito for unit testing.
Many of the classes are united tested including ViewModels, Repositories, and others.
To run unit tests, execute:
./gradlew testDebugUnitTest- Implement pagination for large datasets.
- Improve UI/UX with animations and Material Design elements.