Skip to content

A modular android app that show kittens implemented with Jetpack Compose, Hilt, Navigation Compose, Clean Architecture, MVVM, and has test cases, also support dark-light theme switch and use https://api.thecatapi.com api.

Notifications You must be signed in to change notification settings

sepehrsadri/KittenAppComposeUI

Repository files navigation

KittenAppComposeUI

The KittenAppComposeUI consuming a Kitten Api to display kittens. it has been built with Modular and Clean Architecture principles, Repository Pattern, and MVVM pattern as well as Architecture Components also utilized with Android Jetpack contains: Compose, Hilt, Navigation and ...

This app shows the usage of the new Android Jetpack and Architecture Components.

kitten.mp4

App features:

  • List of Kittens Category
  • Detail of each Kittens Category
  • Light / Dark theme switch

Architecture

Uses concepts of the notorious Uncle Bob's architecture called Clean Architecture .

  • Better separation of concerns. Each module has a clear API., Feature related classes life in different modules and can't be referenced without explicit module dependency.
  • Features can be developed in parallel eg. by different teams
  • Each feature can be developed in isolation, independently from other features
  • faster compile time

Modules:

Modules Dependency

  • app - It uses all the components and classes related to Android Framework. It gets the data from other modules and shows on UI. (access all the modules)
  • features-category - this feature module contains kittens category and shows different category of kittens use API
  • features-kitten - - this feature module shows kittens of different category use API
  • shared - contains business logic of application and implemented in clean architecture (almost shared between other modules)
  • test-utils - contains test utils for other modules test cases (other modules use this module as testImplementation)

Tests

This project has been covered with some Local Unit Test to passing view model, repository and useCases.

Tech stack - Library:

  • Kotlin - Kotlin is a cross-platform, statically typed, general-purpose programming language with type inference. Kotlin is designed to interoperate fully with Java, and the JVM version of Kotlin's standard library depends on the Java Class Library, but type inference allows its syntax to be more concise.
  • Coroutines - A coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously
  • Dagger-Hilt - for dependency injection.
  • JetPack
    • Compose - Jetpack Compose is Android’s recommended modern toolkit for building native UI. It simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs.
    • Lifecycle - Used get lifecyle event of an activity or fragment and performs some action in response to change
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • Navigation - Used to navigate between fragments
  • Material-Components - Material design components.
  • Retrofit - Used for REST api communication.
  • OkHttp - HTTP client that's efficient by default: HTTP/2 support allows all requests to the same host to share a socket
  • Gson - Used to convert Java Objects into their JSON representation and vice versa.
  • Coil - An image loading library for Android backed by Kotlin Coroutines.
  • Timber - This is a logger with a small, extensible API which provides utility on top of Android's normal Log class.

Future Road Map

  • Unit test cases are note complete and more test cases for critical components needs to be added such as mappers and viewModelStateTest cases.
  • UI test for screens
  • Offline first implementation
  • improve performance issue on loading images
  • use lottie animation for better UI/UX
  • more features to be implemented

About

A modular android app that show kittens implemented with Jetpack Compose, Hilt, Navigation Compose, Clean Architecture, MVVM, and has test cases, also support dark-light theme switch and use https://api.thecatapi.com api.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages