Skip to content

An Android app written in Kotlin that demonstrates a clean architecture with MVVM, websockets using WebScoket client Scarlet, and RxAndroid/RxKotlin.

Notifications You must be signed in to change notification settings

gs-ts/BitfinexClient

Repository files navigation

BitfinexClient

An android app that showing the details of the BTC/USD currency pair, at real-time:

  • a summary (current price, price change, volume, low, high) - ticker
  • a table with the order book

MVVM pattern with Clean architecture developed with Kotlin.

Clean architecture consists of three layers:

  • Data, includes data objects, databases, network clients, repositories.
  • Domain, includes use cases of business logic. This layer orchestrates the flow of data from Data Layer to Presentation and the other way.
  • Presentation, includes UI related components, such as ViewModels, Fragments, Activities.

Each layer has its own entities/models which are specific to that package. Mapper is used for conversion of one layer to another.

Android Jetpack Components used:
  • Activity
  • Fragment
  • ViewModel
  • LiveData
  • View Binding (used to replace findViewById and synthetic binding)
  • Data Binding (used for Layouts and binding expressions), example: binding expression
  • ActivityScenario, for instrumentation test (part of AndroidX Test)
  • Espresso
Libraries:
  • Koin, an easy-to-use DI framework. Nice comparison with Dagger

  • RxKotlin / RxAndroid, RxJava bindings for Kotlin / Android

  • Scarlet, a Retrofit inspired WebSocket client, manages the client-server connection for you. It makes use of a StateMachine to handle WebSocket connection correctly. Developed by Tinder, and has been in production for more than one year.

  • OkHttp, an HTTP client for Android and Java applications

  • moshi, JSON library for Kotlin and Java

  • Timber, a logger which provides utility on top of Android’s Log class

Screenshots:

Sources:

Releases

No releases published

Packages

No packages published

Languages