2.4 KiB
2.4 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project overview
PinkOV — an Android application using Kotlin, Jetpack Compose, and Material 3 with adaptive navigation. Package: com.pinkbear.pinkov.
Build and test commands
# Build the project
./gradlew assembleDebug
# Run unit tests (JVM, in app/src/test/)
./gradlew test
# Run a single unit test class
./gradlew test --tests "com.pinkbear.pinkov.ExampleUnitTest"
# Run a single unit test method
./gradlew test --tests "com.pinkbear.pinkov.ExampleUnitTest.addition_isCorrect"
# Run instrumented tests (requires connected device or emulator)
./gradlew connectedAndroidTest
# Run lint checks
./gradlew lint
# Clean build outputs
./gradlew clean
Architecture
- Single-activity app:
MainActivityusessetContentwithPinkOVThemewrapping the root composablePinkOVApp(). - Navigation:
NavigationSuiteScaffold(Material 3 adaptive) with bottom tabs defined by theAppDestinationsenum. Destinations are Home and Mine — each backed by a drawable icon resource. Full-screen pages (e.g.,ScanPage) are toggled via ashowScanPageboolean state inPinkOVApp. - Theme layer (
ui/theme/): Supports dynamic color on Android 12+ with dark/light fallback color schemes. UsesMaterialThemewith custom color and typography definitions. - Camera: Uses CameraX (
camera-core,camera-camera2,camera-lifecycle) withImageAnalysisfor frame processing.OvImageAnalyzer(inui/scan/) implementsImageAnalysis.Analyzer, crops the top 50% of each frame, and exposes the result viaMutableState<Bitmap>. Permissions are handled via Accompanist (accompanist-permissions). - Dependency management: Gradle version catalog in
gradle/libs.versions.toml— add new dependencies there and reference vialibs.*inapp/build.gradle.ktsrather than hardcoding coordinates. - Target: compileSdk 36, minSdk 24, Kotlin 2.2.10, AGP 9.2.1, Java 11 bytecode target.
Key conventions
- Compose previews use
@PreviewScreenSizes(for adaptive layouts) and@Preview(showBackground = true)(for component-level previews). - Navigation icons are
painterResource-based drawable vectors stored inapp/src/main/res/drawable/. - The Compose BOM (
androidx-compose-bom) manages Compose library versions — individual Compose dependency versions should not be pinned.