Skip to content

J-cart/Unsplash_Images

Repository files navigation

Unsplash Images

📷🖼 View all images of interest from Unsplash


Demo

You can check out the app here Appetize.io

Download

Coming Soon .....

Tech stack & Open-source libraries

  • Minimum SDK level 24
  • Kotlin based, Coroutines + Flow for asynchronous.
  • Jetpack
    • Lifecycle: Observe Android lifecycles and handle UI states upon the lifecycle changes.
    • ViewModel: Manages UI-related data holder and lifecycle aware. Allows data to survive configuration changes such as screen rotations.
    • View Binding: Binds UI components in your layouts to data sources in your app using a declarative format rather than programmatically.
    • Room: Constructs Database by providing an abstraction layer over SQLite to allow fluent database access.
    • Hilt: for dependency injection.
  • Architecture
    • MVVM Architecture (View - View Binding - ViewModel - Model)
    • Repository Pattern
  • Retrofit2 & OkHttp3: Construct the REST APIs and paging network data.
  • Moshi: A modern JSON library for Kotlin and Java.
  • Gson: Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object.
  • ksp: Kotlin Symbol Processing API.
  • Material-Components: Material design components for building ripple animation, and CardView.
  • Paging Library and Remote Mediator: The Paging library helps you load and display pages of data from a larger dataset from local storage or over network. This approach allows your app to use both network bandwidth and system resources more efficiently.
  • Coil: Loading images from network.
  • API
    • Unsplash Api: Official Unsplash API. Create with the largest open collection of high-quality photos.

Architecture

Unsplash Images is based on the MVVM architecture and the Repository pattern, which follows the Google's official architecture guidance.

The overrall architecture of Unsplash Images is composed of two layers; the UI layer and the data layer. Each layer has dedicated components and they have each different responsibilities, as defined below:

Unsplash Images was built with Guide to app architecture, so it would be a great sample to show how the architecture works in real-world projects.

Architecture Overview

  • Each layer follows unidirectional event/data flow; the UI layer emits user events to the data layer, and the data layer exposes data as a stream to other layers.
  • The data layer is designed to work independently from other layers and must be pure, which means it doesn't have any dependencies on the other layers.

With this loosely coupled architecture, you can increase the reusability of components and scalability of your app.

UI Layer

The UI layer consists of UI elements to configure screens that could interact with users and ViewModel that holds app states and restores data when configuration changes.

  • UI elements observe the data flow via View Binding, which is the most essential part of the MVVM architecture.

Data Layer

The data Layer consists of repositories, which include business logic, such as querying data from the local database and requesting remote data from the network. It is implemented as an offline-first source of business logic and follows the single source of truth principle.

Unsplash Images is an offline functional app that is able to perform some all of its core functionality without access to the internet. Users might need to be updated on network resources to get up to date info and access some other functionalities too. It relies heavily on the remote mediator of the paging library paging3-base-lifecycle For further information, you can check out Page from network and database.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages