type-safe-nav-graph-organization

Installation
SKILL.md

Organizing a type-safe navigation graph

Type-safe routes replace string paths with serializable objects. Each one is its own file, grouped into a package per area of the app, and holds nothing but its arguments:

@Serializable
data object HomeDestination

@Serializable
data class AlbumDestination(val browseId: String)

The host declares the transitions once and then does almost nothing else. What it registers directly is not "whatever was left over" — it is the five bottom-bar tabs plus the fullscreen player, which its own comment says out loud, and four of those six sit in packages that do have an area graph. The rule is how a destination is entered — from the app chrome, or from another screen:

Installs
2
GitHub Stars
35
First Seen
5 days ago
type-safe-nav-graph-organization — maxrave-dev/kotlin-footguns