DogNet is a simple two-screen Android app built with Jetpack Compose. It demonstrates clean architecture, Hilt DI, error handling, and good Compose practices.
- Lists all dog breeds from Dog API
- On selecting a breed, shows 10 random images of that breed
- Clean MVVM architecture
- Uses Hilt for dependency injection
- Navigation with Compose
- Image loading with Coil
- Proper loading/error states
- Jetpack Compose
- Hilt
- Retrofit + Gson
- Coil
- Kotlin Coroutines + StateFlow
- MVVM
- Material 3
- Clone or download the project
- Open in Android Studio
- Sync Gradle and Run
Includes a unit tests for BreedListViewModel
and BreedImagesViewModelTest
using a fake repository.
This app is designed to be robust, modular and readable. Future enhancements
- Isolate business logic from ViewModels for better testing and maintainability.
- Minimize API calls and allow offline access.
- Avoid downloading large image sets all at once using Paging 3 or manual pagination with LazyColumn.
- Right now errors are generic. Classify them:
- Network Error
- API Error
- Timeout
- Empty Data
- UX: Show meaningful messages or retry options.
- Skeleton loading with Accompanist Placeholder
- Lottie animations for empty/error states
- Swipe to refresh
- Smooth image fade-in animations
- Add UI tests with ComposeTestRule
- Mock network calls using MockWebServer
- Add coverage reports (e.g. Jacoco)
- GitHub Actions or Bitrise for:
- Build + Unit Test
- Lint + Static Analysis (Detekt)
- Test Coverage Reports
Split into feature-based modules:
- :core
- :feature-breedlist
- :feature-breedimages
- :data, :domain
Improves scalability, build speed, testability.
- Add proper support for dynamic colors
- Let user switch themes via settings screen
- Tap an image → open fullscreen with zoom
- Show image metadata if available