Perseus¶
-
Type-safe navigation
Route with serializable
NavigationKeyobjects instead of strings. -
Scopes and tabs
Model single-stack flows, tabbed apps, and stacked app surfaces explicitly.
-
Compose + Fragment interop
Use Navigation 3 for new Compose screens while keeping existing Fragments alive.
-
Process death ready
Restore keys, entry metadata, results, and ViewModel stores with Android lifecycles in mind.
Quick taste¶
@Serializable
data object HomeKey : NavigationKey
@Serializable
data class DetailKey(val itemId: Int) : NavigationKey
navigator.navigateTo(DetailKey(42))
navigator.pop()
Start with keys
If your destinations can be represented as serializable Kotlin objects, Perseus can route and restore them.
Start here¶
- Getting started — install Perseus and host your first stack.
- Navigation — route, tab, scope, and result APIs.
- Scenes and interop — dialogs, bottom sheets, and Fragments.
- Advanced — restore policy, ViewModel lifetime, logging, and DI.
Design model¶
Perseus is built around three boring ideas:
- Keys describe destinations — screens are addressed by
NavigationKeyobjects. - Providers render keys — Compose or Fragment providers turn keys into UI.
- Scopes own stacks — a navigation scope can be a single stack or a multi-stack tab container.