Skip to content

Sample app showcasing best practices used for App Architecture using latest technology stack

Notifications You must be signed in to change notification settings

ankitsingh08/Clean-Architecture-MVVM-Kotlin-flow-Architecture-components-HILT

Repository files navigation

SampleApp

Features Implemented

  • Search star war characters based on user input.
  • Display details like name, birth year, height, species, planet, films, opening moview crawl for selected star war character

Unit Test Cases

Unit test cases are included for the following:

  • ViewModel
  • UseCases

Project Characteristics

  • 100% Kotlin
  • Architecture (Clean Architecture, MVVM)
  • Dependency Injection(Using HILT)
  • Coroutines
  • Kotlin Flow
  • Architecture Components(LiveData, ViewModel)
  • GSON for parsing
  • Navigation
  • Extension Functions
  • Unit Testing(Junit, Mockito)

App Architecture Details:

Untitled Diagram (1)

View

This layer mainly deals with the UI of the application and has its own presentation models.

Components

  • Activity/Fragment: Presents data on the screen and pass user interaction to viewmodel
  • ViewModel: Executes use cases based on user interaction and updates ui using LiveData

Domain

Contains all the business logic for the application.Domain layers is independent of other layers, has its own models, so that changes in other layers will have no effect on domain layer.

Components

  • UseCase : Handles business logic
  • Domain Models: Represents structure of response data
  • Repository Interface: To keep domain layer independent from data layer.

Data

Manages application data and exposes data to domain layer

components

  • Repository : Gets the requested data using api service ans exposes data to domain layer.
  • Mapper : Used to map data models to domains models to keep domain independent of data layer.
  • DataModel : Structure for data retrieved from remote data source.

Screenshots

About

Sample app showcasing best practices used for App Architecture using latest technology stack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages