A Kotlin Multiplatform library that adds an in-app developer overlay to Android and iOS apps. The overlay hosts pluggable modules for feature flags, analytics inspection, and network mocking.
Full documentation: worldline.github.io/devview
- Android minSdk 26
- iOS 16+
- Kotlin 2.x
- Compose Multiplatform
DevView is published to Maven Central. Add the modules you need to your shared KMP module:
// build.gradle.kts (shared / commonMain)
dependencies {
implementation("com.worldline.devview:devview:<version>") // core — always required
implementation("com.worldline.devview:devview-featureflip:<version>") // feature flags
implementation("com.worldline.devview:devview-analytics:<version>") // analytics inspector
implementation("com.worldline.devview:devview-networkmock:<version>") // network mock UI
// Ktor plugin only (no UI — lightweight alternative for network-layer integration)
implementation("com.worldline.devview:devview-networkmock-core:<version>")
implementation("com.worldline.devview:devview-networkmock-ktor:<version>")
}@Composable
fun MyApp() {
val modules = rememberModules {
module(module = FeatureFlip)
module(module = Analytics())
module(
module = NetworkMock(
resourceLoader = { path -> Res.readBytes(path = path) }
)
)
}
var devViewOpen by remember { mutableStateOf(false) }
// Your existing app content
AppContent(onOpenDevView = { devViewOpen = true })
// DevView overlay
DevView(
devViewIsOpen = devViewOpen,
closeDevView = { devViewOpen = false },
modules = modules
)
}rememberModules handles DataStore initialisation and module setup automatically. DevView renders as a transparent overlay on top of your content.
Define flags and provide the handler to the composition:
val featureHandler = rememberFeatureHandler(
features = listOf(
Feature.LocalFeature(name = "dark_mode", description = "Enable dark theme", isEnabled = false),
Feature.RemoteFeature(
name = "new_checkout",
description = "New checkout experience",
defaultRemoteValue = remoteConfig.getBoolean("new_checkout"),
state = FeatureState.REMOTE
)
)
)
CompositionLocalProvider(LocalFeatureHandler provides featureHandler) {
// Read flags anywhere in the tree
val isDarkMode by LocalFeatureHandler.current.isFeatureEnabled("dark_mode")
}Forward events to AnalyticsLogger from your existing analytics layer:
AnalyticsLogger.log(
AnalyticsLog(
tag = "purchase_completed",
screenClass = "CheckoutScreen",
timestamp = Clock.System.now().toEpochMilliseconds(),
type = AnalyticsLogCategory.Ecommerce.Purchase
)
)Provide the log list above DevView:
CompositionLocalProvider(LocalAnalytics provides AnalyticsLogger.logs) { … }Place your mock config at composeResources/files/networkmocks/mocks.json and install the plugin:
val client = HttpClient(OkHttp) {
install(NetworkMockPlugin)
}rememberModules { } must be called (and composed) before the first HTTP request reaches this client.
| Module | Artifact | Description |
|---|---|---|
| Core | devview |
DevView composable + rememberModules DSL. Required by all modules. |
| FeatureFlip | devview-featureflip |
Runtime feature flag management with Compose UI. Supports local and remote-config flags with local overrides. |
| Analytics | devview-analytics |
Real-time analytics event inspector with filtering by type, category, and time range. |
| NetworkMock (UI) | devview-networkmock |
Full mock management UI: enable/disable endpoints, switch responses, preview and diff mock payloads. |
| NetworkMock Core | devview-networkmock-core |
Mock engine: JSON config parsing, request matching, DataStore state. No UI dependency. |
| NetworkMock Ktor | devview-networkmock-ktor |
Ktor HttpClientPlugin that intercepts requests and returns mock responses. |