This is a simple Flicker Single Activity application Showcase. It has been structured in a multi-module fashion, with semantics guided by Clean Architecture; this means that high-level modules don't know anything about low-level ones.
In order to avoid writing architecture boilerplate I have used one of my personal libraries: ArchitectureBoilerplateGenerator
- Create an account on Flicker Developer Console
- On your
local.properties
file, create a variable and fill it up with your flicker public api key.
publicKey = "YOUR_PUBLIC_KEY"
- Search a tag
- Tag search history
- List photos of the searched tag
- Infinite pagination
- Support offline
- Memory efficient
- Swipe to refresh and invalidate cache
As I mentioned before, it was guided by Clean Architecture, which means that we have at least three layers:
-
Domain It is a whole kotlin module, without Android dependencies, where we can find every Business Logic like
interactions
orUseCases
. EveryUseCase
is guided by a Result state pattern to make sure that an unexpected issue doesn't happen -
Data It is an Android module, with all data logic, which means that it has the whole orchestration of Data Sources like Database, Memory Cache and Remote
-
Presentation It is an Android module, with all UI logic. MVVM is the architecture pattern used on the app. A Component State pattern is used to make it easier to be tested
I have covered initially 100% of domain
layer, ViewModel
implementations and Repositories
. But the whole code is easily testable.
Here you can check out the dependencies file. But basically these are the libraries used in this example: