Skip to content

Bikcodeh/Meli-Challenge

Repository files navigation

kotlin Android API

Meli - Challenge

Main Branch: Build status

⭐ Features

  • Search products from the Mercado Libre API and display them in a list.
  • Show error screen if try to fetch the data and doesn't have network connection.
  • See the detail from a specific product.
  • Unit tests for domain, data and presentation(viewmodel) layers (100% coverage)
  • This app supports dark theme and keep state even if the device rotates

🏃 For run the app just clone the repository and execute the app on Android Studio.

📑 Requirements to install the app

  • Use phones with Android Api 26+
  • Having an internet connection
📂 This application was developed using Kotlin and uses the following components:
  • Jetpack compose
  • Coroutines
  • Clean architecture (Domain, Data, Presentation)
  • MVVM
  • App center
  • Repository pattern
  • Use cases
  • StateFlow
  • Mutable State
  • Jetpack navigation compose
  • Lottie animations
  • Timber (Logs)
  • Dagger Hilt (Dependency injection)
  • Coil (Load images)
  • Retrofit (HTTP requests)
  • Pagination
  • Unit testing (Mockk, Thruth, Coroutines tests)

Structure per module

App

Presentation

Data

Domain

Core test

🌞 Screenshots Light theme

Splash Home Loading Products Detail
Detail Description Detail quantity modal Detail quantity textfiel modal Error Pagination error

🌚 Screenshots Dark Mode

Splash Home Loading Products Detail
Detail Description Detail quantity modal Detail quantity textfiel modal Error Pagination error

✅ Code coverage

Unit testing for layers Domain, data and presentation (Viewmodels and Util class) with 100% coverage.

BaseViewModel DetailViewModel HomeViewModel MeliRepository
Product Description UC Search Products UC
Currency Util String extension

✅ UI Testing Report

Splash - Home - Detail

🎯 Architecture

The application is built using Clean Architeture pattern based on Architecture Components on Android. The application is divided into three layers:

Clean Arquitecture

  • Domain: This layer contains the business logic of the application, here we define the data models and the use cases.
  • Data: This layer contains the data layer of the application. It contains the database, network and the repository implementation.
  • Presentation: This layer contains the presentation layer of the application.

License

MIT

Bikcodeh