jlainog / swift-mercadolibre-example

Challenge - Mercado Libre

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mercado Libre Example

A simple example app that uses MercadoLibre API to search for products.

gif

Architecture

It uses the architectural pattern MVVM + Vanilla Combine for the bindings. The UI is as dumb as posible displaying the state from the ViewModel and sending actions to it. This allow to a easy migration to Redux like architecture like TCA

UT Coverage

coverage_app coverage_client

Tests are separeted on 3 sides:

Dependencies

The proyect uses SPM for the dependencies

  • Combine Schedulers Powerful abstraction tha makes your life easier when testing combine asynchronous operations.

  • Snapshot Testing Snapshot anything, this allow you to improve your tests by doing thing like:

    • snapshot the entire view hierarchy as a text to easily spot differences.
    • snapshot the view state to visually check you UI.
  • Codable Utils A personal package that leverage type inference when working with codable.

TODO Next

  • Show an alert when an error occurs. (right now the VM gets the error but is not displayed in UI)
  • Improve UI by using UICollectionView + CompositionalLayout + DiffableDataSource
  • Cookup Previews for Search and Detail ViewControllers

About

Challenge - Mercado Libre

License:MIT License


Languages

Language:Swift 100.0%