Norris

Norris is a showcase for modern and well-crafted Android code.

Here you will find a codebase powered by tests in all semantic levels (unit, integration, acceptance) as well an architectural design that promotes discipline over state, using Kotlin Coroutines as foundation for a pragmatic unidirectional dataflow implementation.

Project Overview

This project leverages on api.chucknorris.io as remote data source to implement the following use cases

  • User can search for Chuck Norris facts and share them
  • Related categories are fetched in the application boostraped and cached
  • Application will offer suggestions for queries based on categories names and track query terms provided by user as well

The code is structured in a multi-module fashion, with semantics guided by Clean Architecure; this means that high level modules (like facts or search) don't know anything about low-level ones (like networking or persistance).

The domain module defines the core protocols to be implemented by low level details, while aggregates them in high level policies like FetchFacts

Building and Running

If you want a simple run emulating the PR pipeline, just use the companion script

./emulate-pr-build.sh

It will

  • Run static analysers (Ktlint and Detekt)
  • Run all unit tests and generate all JaCoCo reports
  • Assemble the debug APK
  • Run Espresso tests

Please note that an online emulator is required to run this script sucessfully.

GitHub