~cytrogen/vbhelper

ref: e9d2cce8024f3fd3bacb258c183c31f59d3f4b40 vbhelper/.claude/rules/compose.md -rw-r--r-- 903 bytes
e9d2cce8 — Cytrogen Add UnifiedPush notification system with Ktor server a month ago

#Compose UI Conventions

#Screen Structure

  • Screen composables receive NavController + a Controller interface (not impl)
  • Controller interfaces define callbacks and state flows for the screen
  • Do not use ViewModel — this project uses Controller pattern instead
  • Controllers use callback lambdas passed to composables, not StateFlow for events

#Material 3

  • Use Material 3 components (androidx.compose.material3.*)
  • Support dynamic color (Monet) on Android 12+ — avoid hardcoded colors
  • Use MaterialTheme.colorScheme and MaterialTheme.typography tokens

#State Management

  • Collect Flows as Compose state via collectAsState() or collectAsStateWithLifecycle()
  • Keep UI state in the Controller, not in the composable (except transient UI state like scroll position)
  • Composable functions should be stateless where possible — receive data and callbacks as parameters