Skip to content

A sleek, modern Android sample project using Jetpack Compose and Hilt, following Google's NowInAndroid architecture for efficient item listing and detailed item information retrieval.

Notifications You must be signed in to change notification settings

rishabharora3/FetchLister

Repository files navigation

FetchLister

Image 1        Image 2

List Screen    |    Detail Screen

FetchLister is a dynamic Android project that leverages the latest technologies for efficient item listing and detailed item information retrieval. This ongoing sample project adheres to Google's recommended nowinandroid architecture. It harnesses the power of Jetpack Compose to deliver a sleek and user-friendly interface. The project is built with Hilt for dependency injection and Room for managing local database operations. FetchLister seamlessly blends modern architectural principles with cutting-edge tools, including Retrofit2 & OkHttp3 for GraphQL APIs, to provide a seamless item management experience.

Technology Stack

  • Android Studio
  • Android Platform
    • Minimum SDK level 24
    • Target SDK level 33
  • Kotlin (no Java or Groovy!)
  • Jetpack Compose
  • Activity
  • Coil - Image loading library for Android backed by Kotlin Coroutines.
  • StateFlow for sharing states
  • Hilt for dependency injection
  • Retrofit2 & OkHttp3 - construct the REST APIs
  • Room for local database
  • MVVM/Clean Architecture
  • Github
  • GraphQL APIs

Features

Character Listing

The home screen of the app displays a list of 20 Rick and Morty characters. Each item in the list includes the character's name, status, and species.

Character Detail

Upon tapping on a character, the app navigates to a detailed screen. Here, the character's image and comprehensive information about their location is displayed. This includes the name, type, dimension, and number of residents in that location.

Goals and requirements

The goals for the app architecture are:

  • Readability: The code is designed to be easily comprehensible at a glance.
  • Maintainability: The codebase is structured in a way that makes it straightforward to work on, even in the future.
  • Extensibility: The architecture allows for the seamless addition of new features or making design adjustments.
  • Follow the official architecture guidance as closely as possible.
  • Easy for developers to understand, nothing too experimental.
  • Support multiple developers working on the same codebase.
  • Minimize build times.

Architecture overview

The app follows the Offline-First architecture, ensuring that once data is loaded, it's cached locally. This approach prioritizes displaying cached data first, followed by fetching the latest data from the remote source. Additionally, the app provides offline access for browsing, and it alerts the user with a snackbar when there is no internet connection.

The app architecture has three layers: a data layer, a domain layer and a UI layer.

Image 1

The architecture follows a reactive programming model with unidirectional data flow. With the data layer at the bottom, the key concepts are:

  • Higher layers react to changes in lower layers.
  • Events flow down.
  • Data flows up.

The data flow is achieved using streams, implemented using Kotlin Flows.

Read more here:

Video Demo

fetch_lister.webm

Open API

FetchLister using the Rick and Morty API for constructing GraphQL API.

About

A sleek, modern Android sample project using Jetpack Compose and Hilt, following Google's NowInAndroid architecture for efficient item listing and detailed item information retrieval.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published