GenUI is a dynamic, server-driven dynamic UI streaming application built with Flutter. It leverages the power of Google's Gemini AI model to turn raw user prompts into fully responsive, validated, and interactive Flutter widgets on-the-fly without requiring a client-side app update.
The engine parses natural language, guarantees structural schema integrity, and dynamically renders interactive states via an isolated recursive engine.
User Prompt ──> Gemini ──> JSON String ──> jsonDecode() ──> Validation ──> Renderer ──> Flutter Widgets
Manual Renderer ──> Dynamic Widgets ──> Recursive Layouts ──> Schemas ──> State Binding ──> Actual GenUI SDK
- Generative UI Component Engine: Instantly renders complex layout configurations (like interactive MCQs, form sheets, or dynamic data cards) based purely on text prompts.
- Performance-Optimized Streams: Combines
ChangeNotifierProviderandListView.builderpositional-stability so appending a new generative child card never accidentally re-triggers rebuild workflows on older elements. - Zero App Updates Required: UI schemas are interpreted dynamically via a custom layout engine at runtime.
- State-Preserved Interactions: Fully handles internal button selectors and state-binding layers natively within the generated layouts.
This project enforces strict GitHub Push Protection compliance. Secrets are isolated at compilation using --dart-define compilation parameters, avoiding exposed codebase keys.
To run this project locally, do not hardcode your Gemini API credentials. Configure your local workspace environment:
- Create a
.vscode/launch.jsonfile (this directory is pre-registered inside your.gitignoreworkspace properties):
{
"version": "0.2.0",
"configurations": [
{
"name": "GenUI (Debug)",
"request": "launch",
"type": "dart",
"toolArgs": [
"--dart-define=GEMINI_API_KEY=YOUR_ACTUAL_GEMINI_KEY_HERE"
]
}
]
}
2. Alternatively, compile and run the application explicitly via the terminal interface:
flutter run --dart-define=GEMINI_API_KEY=YOUR_ACTUAL_GEMINI_KEY_HERE- Replace
YOUR_ACTUAL_GEMINI_KEY_HEREwith any specific instructions you want to give people reading your project. - When you push this to GitHub, the textual arrows (
──>) will display as beautifully formatted pipeline pathways automatically!