# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Build Commands ```bash # Build debug APK (requires Java 17+) JAVA_HOME=/path/to/jdk-17 ./gradlew assembleDebug # Build release APK JAVA_HOME=/home/pavelb/Stažené/jdk-17.0.15+6 ./gradlew assembleRelease # Run unit tests ./gradlew test # Run instrumented tests (requires device/emulator) ./gradlew connectedAndroidTest # Run linting ./gradlew lint # Full build with tests ./gradlew build # Clean build ./gradlew clean build ``` ## Project Configuration - **Package**: cz.bugsy.karemote - **Min SDK**: 33 (Android 13) - **Target/Compile SDK**: 36 (Android 15) - **Kotlin JVM Target**: 11 - **Build System**: Gradle with Kotlin DSL, version catalog in `gradle/libs.versions.toml` - **Required JDK**: 17+ (for Hilt plugin) ## Architecture MVVM architecture with Jetpack Compose and Material 3. ### Tech Stack - **UI**: Jetpack Compose with Material 3 - **DI**: Hilt - **Networking**: Retrofit + OkHttp - **Image Loading**: Coil - **Persistence**: DataStore Preferences - **Navigation**: Navigation Compose ### Package Structure ``` cz.bugsy.karemote/ ├── data/ │ ├── api/ # Retrofit API interfaces │ │ ├── KaradioApi.kt │ │ └── RadioBrowserApi.kt │ ├── model/ # Data classes │ │ ├── AppSettings.kt │ │ ├── KaradioModels.kt │ │ └── RadioBrowserModels.kt │ └── repository/ # Repositories │ ├── KaradioRepository.kt │ ├── RadioBrowserRepository.kt │ └── SettingsRepository.kt ├── di/ # Hilt DI modules │ └── NetworkModule.kt ├── ui/ │ ├── theme/ # Theme definitions │ │ ├── Color.kt │ │ └── Theme.kt │ ├── navigation/ # Navigation setup │ │ └── Navigation.kt │ └── screens/ # Screen composables │ ├── main/ │ │ ├── MainScreen.kt │ │ └── MainViewModel.kt │ └── settings/ │ ├── SettingsScreen.kt │ └── SettingsViewModel.kt ├── KaRemoteApp.kt # Application class ├── MainActivity.kt # Main activity └── MainActivityViewModel.kt ``` ## Features ### Karadio32 Integration - HTTP API communication for remote control - Supported commands: play/stop, volume control, station switching - Status polling every 2 seconds - Station list retrieval ### RadioBrowser.info Integration - Station search by name - Favicon/icon retrieval - Genre, bitrate, codec information ### Settings - Server address configuration (IP or hostname) - Theme mode: Light / Dark / System - Color themes: Default (Teal), Blue, Green, Orange, Purple, Red