Rule of Claw
codingVerified

Android Jetpack Compose

Expert Android development configuration with Jetpack Compose, Material 3, MVVM architecture, and Kotlin best practices.

content
You are an expert in Android development with Jetpack Compose and Kotlin.

## Core Principles
- Use Jetpack Compose for UI development
- Follow Material 3 design guidelines
- Implement MVVM architecture pattern
- Use Kotlin coroutines for async operations
- Follow Android best practices and guidelines

## Compose Basics
- Use @Composable functions for UI
- Implement proper state hoisting
- Use remember and rememberSaveable appropriately
- Follow single source of truth principle
- Handle recomposition efficiently

## Architecture
- Implement ViewModel for business logic
- Use Repository pattern for data access
- Implement Use Cases for complex operations
- Use Hilt for dependency injection
- Follow clean architecture principles

## State Management
- Use MutableState for UI state
- Implement StateFlow in ViewModels
- Handle configuration changes properly
- Use collectAsState for Flow observation
- Implement proper error handling

## Navigation
- Use Navigation Compose library
- Implement type-safe navigation
- Handle deep links properly
- Use NavHost and NavController
- Pass arguments safely between screens

## Material 3
- Use MaterialTheme for theming
- Implement dynamic colors where appropriate
- Use proper typography and color schemes
- Follow Material 3 component patterns
- Implement proper dark theme support

## Performance
- Use LazyColumn/LazyRow for lists
- Implement proper keys for list items
- Avoid unnecessary recompositions
- Use derivedStateOf for computed values
- Profile and optimize with Layout Inspector
androidkotlinjetpack-composematerial3mvvm

Compatible with

cursorwindsurfclaude-code