IProcureTest

Mobile App that that enables users to manager product listing (in and e-commerce environment) IProcure Ltd Android Engineer role interview solution

Tech-stack

  • Tech-stack

    • Kotlin – a cross-platform, statically typed, general-purpose programming language with type inference.
    • Coroutines – lightweight threads to perfom asynchronous tasks.
    • Flow – a type of stream of data that emit multiple values sequentially.
    • StateFlow – Flow APIs that enables flows to optimmaly emit state updated and emit values to multiple consumers.
    • Koin – a pragmatic lightweight dependency injection framework.
    • Jetpack
      • LiveData – is an observable data holder.
      • Lifecycle – perform action when lifecycle state changes.
      • ViewModel – store and manage UI-related data in a lifecycle conscious fashion.
  • Architecture

    • MVVM – Model View View Model
  • Tests

    • Unit Tests (JUnit) – a simple framework to write repeatable tests.
    • MockK – mocking library for Kotlin
    • Kakao – A nice and simple DSL for Espresso in Kotlin
  • Gradle

Testing

Unit tests that the data layer

Unit tests testing presentation layer

App Architecture

A well planned architecture is extremely important for an app to scale and all architectures have one common goal- to manage complexity of your app. This isn’t something to be worried about in smaller apps however it may prove very useful when working on apps with longer development lifecycle and a bigger team.

Read more about clean architecture here The app uses clean architecture with the following modules

1. Domain

This is the core layer of the application. The domain layer is independent of any other layers thus ] domain models and business logic can be independent from other layers.This means that changes in other layers will have no effect on domain layer eg. screen UI (presentation layer) or changing database (data layer) will not result in any code change withing domain layer. Components of domain layer

  • Models: Defines the core structure of the data that will be used within the application.

  • Repositories: Interfaces used by the use cases. Implemented in the data layer.

2. Data

The data layer is responsibile for selecting the proper data source for the domain layer (In this case it contains only local source). It contains the implementations of the repositories declared in the domain layer.

  • Repositories: Responsible for exposing data to the domain layer.

  • Mappers: They perform data transformation between domain, dto and entity models.

  • Sources: Responsible for deciding which data source (network or cache) will be used when fetching data.

3. Presentation

The presentation layer contains components involved in rendering information to the user. The main part of this layer are the views(Fragment, Activities Composables) and viewModels.

App Screenshots

Add Product

Dashboars

GitHub

View Github