https://github.com/nikialeksey/image-search
Another android app architecture sample
https://github.com/nikialeksey/image-search
android android-app android-application android-sdk jetpack jetpack-android jetpack-lifecycle-components jetpack-navigation jetpack-pagination multimodule mvvm mvvm-android
Last synced: 25 days ago
JSON representation
Another android app architecture sample
- Host: GitHub
- URL: https://github.com/nikialeksey/image-search
- Owner: nikialeksey
- License: mit
- Created: 2019-12-14T09:58:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-09T11:03:35.000Z (about 2 years ago)
- Last Synced: 2025-03-21T18:16:39.339Z (about 1 year ago)
- Topics: android, android-app, android-application, android-sdk, jetpack, jetpack-android, jetpack-lifecycle-components, jetpack-navigation, jetpack-pagination, multimodule, mvvm, mvvm-android
- Language: Kotlin
- Homepage:
- Size: 10.4 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://codecov.io/gh/nikialeksey/image-search)
[](https://github.com/nikialeksey/image-search/blob/master/LICENSE)
## How to build and run
### Flickr images
You should create `local.properties` file if you have not yet and add
there `flickr.api.key` field with [flickr api key](https://www.flickr.com/services/api/misc.api_keys.html):
```properties
flickr.api.key=
```
Then, install it:
```bash
./gradlew installDebug
```
### Fake images
```bash
./gradlew installInstrumented
```
## Architecture aspects
### Code base conventions
Project uses feature modules approach. Every feature has at least two modules: `api`
module and primary `implementation` module. For example, `images` feature has three
modules:
- `api` - API module
- `flickr` - primary implementation
- `fake` - additional implementation with providing images from assets for
testing purposes
There is `app` module which contains entry points for application. There
are several entry points with different code base:
- [`debug`](https://github.com/nikialeksey/image-search/blob/master/app/src/debug/java/com/nikialeksey/interview/imagesearch/Application.kt)
with primary code base (flickr images provider)
- [`release`](https://github.com/nikialeksey/image-search/blob/master/app/src/release/java/com/nikialeksey/interview/imagesearch/Application.kt)
with primary code base (flickr images provider)
- [`instrumented`](https://github.com/nikialeksey/image-search/blob/master/app/src/instrumented/java/com/nikialeksey/interview/imagesearch/Application.kt)
entry point without flickr images provider, but with fakes for images
So when you run:
```bash
./gradlew installInstrumented
```
you build and install only the code with `:images:fake` and without `:images:flickr`
module.
### Requirements protocol
Project does not use any [`DI` framework](https://en.wikipedia.org/wiki/Dependency_injection#Dependency_injection_frameworks).
When a feature-module needs for external communication, it describes the
requirements in `api` module, and `app` module must implement it in an
entry point, which use the feature.
## Thanks
Icons from [flaticon.com](https://www.flaticon.com/packs/multimedia-collection)