PoCCryptoTracker

This is a toy project meant to learn SwiftUI, Combine and Core Data. It is based on this YouTube course by Swiftful Thinking.

This project uses MVVM (Model-View-ViewModel) design pattern to separate business login to UI logic. To get UI responsive to business login is used Combine framework.

Code architecture

The application architecture is based on _MVVM_architecture pattern.

This means that User Interface (UI) objects are separated from Login Components. The main views are:

  • Coin details
  • Home
  • Settings

Coin details

This view shows more information on a particular crypto coin. It has one more subview, ChartView, representing a line chart object. As every view, all the data that this view shows are managed by a ViewModel class: downloading data for the selected coin, transform downloaded data and pass them to the view.

Home

Home is the first view and it shows the 250 coins with the greatest capitalization.

This view could show user's portfolio, where user can see its portfolio and make operations on it (e.g. add, sell partially o completely a coin).

In this two views is present a Search bar where user can search a coin on the list.

Lists can be sorted by every column that are present.

Settings

Settings view shows some application and API information, without edit it.

Combine

All data is downloaded using Publisher-Subscriber pattern (built in Combine framework). This means that the application responds immediately on every data change.

Lint

All code is linted during a build process using SwiftLint. Lint rules can be found here