Giter VIP home page Giter VIP logo

beer_pocket_challenge's Introduction

Beers Pocket ๐Ÿป

Android app challenge.

This app allows you to known and discover every Beer from PunkApi.

Getting started

Run:

./gradlew assembleDebug

##Install apk example_app
./gradlew installDebug

#Launch entry activity on example app
adb shell am start -n "com.santiihoyos.beerspocket/com.santiihoyos.beerspocket.ui.feature.home.HomeActivity" \
                   -a android.intent.action.MAIN \
                   -c android.intent.category.LAUNCHER

Features

  • Android Api > 21
  • Google apps architecture (latest)
  • 100% composable
  • Versions catalog
  • KTS for Gradle
  • Material desing 3 initial support
  • Koin as Dependency injector
  • Coil as image manager
  • Paging (android)
  • etc...

Architecture notes

There are 3 gradle modules 2 android (:app, :beers) and 1 kotlin standalone (:api)

In app module is main app logic like entry points and HomeScreen it depends on :beers feature module (witch contains all related code with beers feature) and :api (witch contains all related code to communicate with server by using Rest endpoints).

layers

By using Google's architecture definition there are:

UI

Only on :app and :beers module there are "Composables" each one has it ViewModel. (see ui packages). They implement UDF(Unidirectional data flow) patter states as source of truth from view models and Event system to notify user inputs from UI to ViewModels.

Domain

Contains app internal business logic entities and UseCases to reuse login on different ViewModels. Functions on UseCases are main thread safe. They speak with repositories and provides specific business app logic error management.

Data

All data business logic is in :api module, that module contains DataSources interfaces and implementations to connect with server Rest endpoints, those data sources are used by Repository witch exposes to domain layer all data functionality and manages data layer errors.

Testing

beer list flow is tested from ViewModel to DataSource you can see unit test packages in every module. Tests run by using mockito and coroutines test library.

Screenshots

->

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.