Home is a small application that lets you search for dogs by breed, and click a dog to see some details about it.
- 100% Kotlin
- Modern architecture (Multi-module setup, MVI, Single-Activity, Compose, Hilt)
- Gradle convention plugins
- The Square buffet
Home relies on Gradle Convention Plugins to make it easy to add new modules. You can start in the build-logic
module to see how this works.
The core-common
module has some shared functionality that can be used across the app, core-model
is where the domain models live, core-network
is where all the Remote data plumbing lives.
library-data
is where you'll see some work being done. The BreedRemoteSource
lives there, which you can use to perform network requests.
library-analytics
is where analytics wrappers live. Currently, only Timber is added to this project.
feature-list
is a UI module. It has the Search/List feature that you see when you first open the app, and its UI is written in XML.
feature-detail
is a UI module. It has the detail view that you're taken to when you select a search result, and its UI is written fully in Jetpack Compose.
This is a live document, so these thoughts might change in the future.
- I'd like to split the
core-common
module into smaller modules. Currently, logic inside it is separated by package, which is good enough at the moment, but can be worth revisiting in the future. - I'd like to explore making this app work offline
- Add UI / Snapshot tests
- Explore more complex UIs in Compose
- Add animations for transitions from List to Detail
- I should do some interactive rebasing to make the commit history look better since it's quite unorganized at the moment
Some aspects of the code are inspired by open source community contributions and blog posts.
- The tooling and
build-logic
is inspired by both this blog post and NowInAndroid - The
core-network
module takes inspiration from this library - The use of Dagger multibinding to wire up the
library-analytics
module is inspired by this blog post
Copyright 2022 Adam Ahmed
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.