Giter Club home page Giter Club logo

stock-browser's Introduction

Stock Browser - Android App

DISCLAIMER: Work in progress

This project demonstrates how to write a modern android app in 2023. The main goal is to make the app robust, testable, and maintainable using minimal set of well-known libraries and following best practices.

The app itself is very simple. It loads market data from multiple 3rd party APIs and stores them in a local database. Then it allows users to search, browse and mark favorite items.

Architecture

Architecture follows principles of separation of concerns. App is divided into 3 main layers, every one with its own responsibilities.

  • UI Layer displays application data on screen using Jetpack Compose. It also holds the state of simple components as text fields.
  • Domain Layer is responsible for encapsulating complex business logic, or simple business logic that is used by multiple ViewModels.
  • Data Layer contains application data and business logic.

App uses MVI (Model View Intent) architecture pattern, implemented using Orbit-MVI library. Each screen has a matching ViewModel and ScreenState. ViewModel represents the source of truth for the screen. It handles all user input and returns the corresponding UI state that is displayed on the screen. In addition to state, ViewModel can also produce side effects used mainly for navigation between screens. ViewModel calls different use cases to get data to be displayed to the user. The logic for loading and saving data from different resources is implemented by repositories and data sources.

App Architecture

Libraries

  • Room - Abstraction layer over SQLite database
  • Jetpack Compose - Android’s recommended modern toolkit for building native UI
  • Compose Navigation - The Navigation component provides support for Jetpack Compose applications.
  • DataStore - Solution that allows you to store key-value pairs or typed objects
  • Retrofit 2 - A type-safe HTTP client for Android and Java.
  • kotlinx.serialization - Kotlin multiplatform / multi-format reflectionless serialization
  • Hilt - Provides a standard way to incorporate Dagger dependency injection into an Android application.
  • Orbit-MVI - Redux/MVI-like library - but without the baggage
  • mockito - Tasty mocking framework for unit tests in Java

CI/CD

  • GitHub Actions - CI/CD platform that allows you to automate your build, test, and deployment pipeline.

Screenshots

screenshot screenshot screenshot
screenshot screenshot screenshot

Video

device-2022-11-29-162543.mp4
device-2022-11-29-162404.mp4

stock-browser's People

Contributors

jurajkusnier avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.