karemote/CLAUDE.md
Pavel Baksy ebaf1957d6 Implement KaRemote Android app for Karadio32 control
- Add Jetpack Compose UI with Material 3 theming
- Implement Karadio32 HTTP API client (play/stop, volume, stations)
- Integrate RadioBrowser.info API for station icons and metadata
- Add settings screen with server address and theme configuration
- Support light/dark/system theme modes and 6 color themes
- Configure network security for local HTTP connections

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 15:10:19 +01:00

2.8 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Build Commands

# Build debug APK (requires Java 17+)
JAVA_HOME=/path/to/jdk-17 ./gradlew assembleDebug

# Build release APK
JAVA_HOME=/path/to/jdk-17 ./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