Giter Site home page Giter Site logo

sepehrsadri / kittenappcomposeui Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 490 KB

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.

License: Apache License 2.0

Kotlin 100.00%
android clean-architecture hilt jetpack-android jetpack-compose modular modularization mvvm navigation-component

kittenappcomposeui's Introduction

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

kittenappcomposeui's People

Contributors

sepehrsadri avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.