After a year of building production Android apps with Jetpack Compose, some patterns have become reflexive. These aren't clever tricks — they're the boring, solid foundations I reach for before writing a single composable.
1. Single source of truth UI state
Every screen gets one sealed class that represents every possible state. No scattered booleans. No nullable loading flags.
The composable then uses a when expression on the state. Every case is handled, the compiler tells you when you miss one, and the UI is always predictable.
2. Hoisted state, dumb composables
Composables shouldn't own state they don't need to. Push state up, pass values and lambdas down. This makes every composable independently testable and reusable.
3. A single Typography object
Define all text styles once. Never hardcode font sizes or weights inline. When I want to tweak the design, I change one file and every screen updates.
4. Preview every state
Write a @Preview for loading, success, empty, and error. Not just the happy path. This takes five minutes and saves hours of running the emulator to check edge cases.
5. Explicit navigation graph
Define all routes as constants in one place. String literals scattered through a nav graph are a bug waiting to happen.
These five things are in every MakeLabs app from day one. They're not exciting, but they're the reason the codebase stays manageable when it's just one person — with AI assistance — maintaining it.