Jetpack Compose Android project that renders screens from JSON and includes a runtime analyzer for load latency, parse cost, first render timing, UI tree complexity, interactions, and lazy list item activity.
- Server-driven UI rendering from JSON screen definitions
- Recursive Compose renderer for nested node trees
- Dynamic text binding with placeholders like
{{name}} - Action handling for navigation, toast messages, and state updates
- Runtime analyzer for screen performance and interaction metrics
- Lazy container support with
LazyColumnandLazyRow
- Intro screen and navigation hub
- Text input bound to dynamic state
- Live text binding preview
LazyRowandLazyColumnrendered from JSON- Lazy item activity surfaced in the runtime analyzer
- Nested
Column,Row,Card,Spacer,Text, andButton - Shows richer layout composition from the same rendering engine
The analyzer panel tracks:
- Screen load time
- JSON parse time
- First render time
- Rendered node count
- Component type breakdown
- Lazy container count
- Lazy item count
- Text input update count
- Button click count
- Navigation count
- LazyColumn item activity
- LazyRow item activity
data.parserParses JSON and maps DTOs into internal screen modelsdata.repositoryLoads screen definitions from local assets
domain.modelDefinesUiScreen,UiNode,UiAction, and modifier modelsdomain.engineContains runtime engine helpers such as:ActionHandlerTextBindingResolverUiStateStore
ui.rendererOrchestrates dynamic rendering and tree metricsui.componentsIndividual node renderers for Compose componentsui.screensScreen host, view model, and UI state
analyzerRuntime metrics model and analyzer panel UI
- A screen JSON file is loaded from assets.
JsonScreenParserdecodes JSON DTOs and maps them to domain models.ViewerViewModelloads the screen and updates runtime metrics.DynamicScreenRendererrecursively renders the node tree using component renderers.- The analyzer panel shows runtime and lazy list metrics for the active screen.
{
"id": "home",
"title": "Home",
"root": {
"id": "home_root",
"type": "column",
"props": {
"scrollable": "true"
},
"children": [
{
"id": "name_input",
"type": "textField",
"props": {
"label": "Your name",
"valueKey": "name"
}
},
{
"id": "name_preview_text",
"type": "text",
"props": {
"text": "Hello {{name}}"
}
}
]
}
}app/src/main/java/com/rohitkhandelwal/dynamicuianalyzer
├── analyzer
├── data
│ ├── parser
│ │ └── dto
│ └── repository
├── domain
│ ├── engine
│ └── model
├── ui
│ ├── components
│ ├── renderer
│ ├── screens
│ └── theme
└── MainActivity.kt
- Open the project in Android Studio.
- Sync Gradle dependencies.
- Run the app on an emulator or device.
- Start from the home screen and navigate to the lazy and component demos.
This project demonstrates how a Compose UI can be driven by data instead of hardcoded screens, while still exposing runtime insights that help reason about performance and screen complexity.
It is designed as a portfolio-style Android project that balances:
- architecture clarity
- Compose rendering
- runtime instrumentation
- UI flexibility
- Remote API-backed screen repository
- Schema validation and debug warnings
- Weight/flex-style layout support
- More advanced lazy list metrics
- Image component support
- Expand/collapse analyzer sections
- Better runtime event tracing


