Skip to content

Client Side

Mihály Dobos-Kovács edited this page Nov 29, 2020 · 3 revisions

This page contains the documentation of the Client side component.

General overview

The Client side application is an Android application that is capable of consuming the REST API of the server side application.

Architecture

The architecture of the Android application follows the RainbowCake architecture. The application uses the REST API of the server side application as a Data Source, and creates Views, ViewStates, ViewModels and Presenters for the users and the CAFFs. To quote the relevant part of the documentation of RainbowCake:

  • Views (Fragments or Activities) represent application screens. They observe immutable state from their respective ViewModels and display it on the UI. They also forward input events to the ViewModel, and may receive state updates or one-time events in return.
  • ViewModels store the current state of the UI, handle UI related logic, and update the state based on results received from presenters. They start coroutines for every task they have to perform (triggered by input events), and forward calls to their presenters.
  • Presenters put work on background threads and use interactors (one or more) to access business logic. Then, they transform the results to screen-specific presentation models for the ViewModels to store as state.
  • Interactors contain the core business logic of the application. They aggregate and manipulate data and perform computations. They are not tied to a single screen, but instead group functionality by the major features of the application.
  • Data sources provide the interactors with data from various origins - local database and file system, network locations, key-value stores, system APIs, resources, etc. It’s their responsibility to abstract away the underlying implementation from the domain layer, and to keep their stored data in a consistent state (i.e. not expose operations that can lead to inconsistency).

Security point of view

The application is only a frontend for the server side application that stores the sensitive data. The server side application is only releasing sensitive data to the client, if the client successfully authenticates and authorizes itself, so if the data is present on the client side, the user of the client is entitled to that data.

The most sensitive data the client side application handles is the passwords during login. To prevent the password falling into the wrong hands, the application does not store the passwords in the ViewStates to minimize the possibility of leaking it.

GUI

We designed a GUI that is easy to learn and intuitive. The following screenshots are showcasing some of the functions of the Android application, including the functionalities on the login screen and listing the CAFFs.

Clone this wiki locally