A comprehensive Android application built with Clean Architecture, Modularization, and Jetpack Compose. This app integrates with the MusicBrainz API to search for artists, albums (release groups), and events.
For more details on the architectural approach, see the Medium article: Practical Guide to Building Powerful and Easy-to-Maintain Android Apps with Clean Architecture, Modularization
The app follows Clean Architecture principles with a modular structure:
┌─────────────────────────────────────────────────────────────┐
│ app │
│ (MainActivity, Navigation, Compose Screens, DI Modules) │
└─────────────────────────────────────────────────────────────┘
│
┌─────────────────────┼─────────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ artist-ui │ │ (future UI │ │ (future UI │
│ (Compose) │ │ modules) │ │ modules) │
└───────────────┘ └───────────────┘ └───────────────┘
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ presentation │ │ presentation │ │ presentation │
│ (ViewModels) │ │ (ViewModels) │ │ (ViewModels) │
└───────────────┘ └───────────────┘ └───────────────┘
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ domain │ │ domain │ │ domain │
│ (Use Cases) │ │ (Use Cases) │ │ (Use Cases) │
└───────────────┘ └───────────────┘ └───────────────┘
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ data │ │ data │ │ data │
│ (Repository) │ │ (Repository) │ │ (Repository) │
└───────────────┘ └───────────────┘ └───────────────┘
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ datasource │ │ datasource │ │ datasource │
│ (API/Remote) │ │ (API/Remote) │ │ (API/Remote) │
└───────────────┘ └───────────────┘ └───────────────┘
artist-domain- Domain models, repository interfaces, use casesartist-data- Repository implementations, data mappersartist-datasource- API service, remote data source, API modelsartist-presentation- ViewModels, presentation models, view statesartist-ui- Compose UI components, screens
event-domain- Event domain models and use casesevent-data- Event repository with in-memory cachingevent-datasource- MusicBrainz Event API integrationevent-presentation- Event ViewModel and presentation layer
release-group-domain- Release group domain modelsrelease-group-data- Release group repositoryrelease-group-datasource- MusicBrainz Release Group APIrelease-group-presentation- Release group ViewModel
app- Main application, DI modules, Compose navigation, screensrelease-*- Release feature modulesseries-*- Series feature modules
-
Bottom Navigation with three tabs:
- Artists - Search and browse artists
- Albums - Search and browse release groups/albums
- Events - Search and browse music events
-
Jetpack Compose UI - Modern declarative UI
-
State Preservation - Scroll position preserved on tab switch and rotation
-
In-Memory Caching - Events cached at repository level (no database schema changes)
-
Clean Architecture - No DTO leakage from network to domain/UI layers
-
Dark/Light Mode supported
- UI: Jetpack Compose, Material 3
- Architecture: MVVM + Clean Architecture
- DI: Hilt
- Networking: Retrofit, OkHttp, Gson
- Async: Kotlin Coroutines
- Navigation: Jetpack Navigation Compose
This project requires Java 17. Set your JAVA_HOME before building:
export JAVA_HOME=/path/to/jdk-17The gradle.properties includes necessary JVM arguments for kapt compatibility with Java 17+:
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
...# Set Java 17
export JAVA_HOME=/path/to/jdk-17
# Clean and build
./gradlew clean assembleDebugThe app features a bottom navigation bar with Artists, Albums, and Events tabs.
This app uses the MusicBrainz API:
- Artists:
GET /ws/2/artist?query={name}&fmt=json - Release Groups:
GET /ws/2/release-group?query={name}&fmt=json - Events:
GET /ws/2/event?query={name}&fmt=json
This project is for educational purposes demonstrating Clean Architecture patterns in Android development.
