Article Type: Concept
Audience: App Admin, Developer
Module: App Designer - Packages
Applies to Versions: Platform 2023.11.2+ | Package v1.5.1
1. Overview
The Screen Generation Package is a Fuuz system package that leverages the platform's native AI capabilities to automatically generate user interface screens from existing data models. This powerful automation tool enables developers to rapidly prototype and deploy complete CRUD (Create, Read, Update, Delete) interfaces without manual screen design, dramatically reducing development time and ensuring consistency across application interfaces.
By analyzing data model structures, field types, relationships, and metadata, the Screen Generation Package intelligently constructs fully functional screens complete with form fields, table columns, filters, actions, and navigation elements. The generated screens follow Fuuz platform best practices and can be further customized by developers to meet specific project requirements.
Key Benefit: Transform data model definitions into production-ready user interfaces in seconds, not hours or days.
Key Capabilities
- AI-Powered Screen Generation: Automatically creates optimized screen layouts based on data model analysis
- Complete UI Component Creation: Generates form fields, table columns, filters, and action buttons automatically
- Intelligent Field Mapping: Recognizes field types and creates appropriate UI controls (text inputs, dropdowns, date pickers, etc.)
- Relationship Handling: Automatically creates combobox selectors for related data models with proper label fields
- Validation Rules: Incorporates required field validation based on data model schema
- Customizable Output: Generated data flows can be modified to tailor screens for specific project needs
- Zero Configuration: Works immediately after package installation with no additional setup required
2. Architecture & Data Flow
The Screen Generation Package consists of six interconnected data flows that work together to analyze data models and generate complete screen definitions. The architecture follows a modular design where a main orchestration flow coordinates specialized sub-flows, each responsible for generating specific screen components.
Package Components
| Component |
Type |
Purpose |
| Screen Generator (v0.0.16.3) |
Data Flow |
Main orchestration flow that coordinates all screen generation activities. Contains 70 nodes including data model queries, transformations, and sub-flow execution. |
| Screen Generation Actions Create (v0.0.3) |
Data Flow |
Generates form action buttons and event handlers. Supports validation bypass for fields with automatic sequences. |
| Screen Generation Column Create (v0.0.3) |
Data Flow |
Creates table column definitions with appropriate data types, sorting, filtering, and display formatting. |
| Screen Generation Filter Create (v0.0.2) |
Data Flow |
Generates filter components for data tables, enabling users to search and filter records by various criteria. |
| Screen Generation Section Create (v0.0.3) |
Data Flow |
Creates organized screen sections and layout structures to group related form fields logically. |
| User Route Preference to User Route Preference on Event (v0.0.12) |
Data Flow |
Optional flow that shares table view configurations across active users in real-time when activated. |
| Get Model By Name |
Saved Transform |
JSONata transform that queries the Fuuz GraphQL API to retrieve data model metadata by model name. |
Processing Workflow
The screen generation process follows this execution sequence:
- Input Reception: Developer provides data model name(s) via the source input node in the Screen Generator flow
- Model Discovery: The Get Model By Name transform retrieves complete model metadata including fields, types, relationships, and validation rules
- Field Analysis: Each field is analyzed to determine appropriate UI component type based on data type (String → text input, Boolean → checkbox, ID → combobox selector, etc.)
- Relationship Resolution: For ID fields referencing other models, the system identifies related models and configures combobox controls with proper label fields
- Component Generation: Specialized sub-flows execute in parallel to create actions, columns, filters, and sections
- Screen Assembly: All generated components are combined into a complete screen definition ready for deployment
- Output Delivery: The final screen configuration is returned, which can be saved as a new screen or used to update existing screens
Technical Note: The Screen Generator flow contains 70 nodes with sophisticated orchestration using 25 transform nodes, 7 conditional branches, 5 query nodes, and 4 executeFlow nodes to coordinate sub-flows.
Field Type Mapping
The Screen Generation Package intelligently maps data model field types to appropriate UI components:
| Data Model Type |
Generated UI Control |
Notes |
| String |
Text Input / Markdown |
Uses markdown editor for fields named "description" or "note" |
| Boolean |
Checkbox |
Standard true/false toggle |
| Int / Float |
Number Input |
Appropriate numeric validation applied |
| DateTime |
DateTime Picker |
Combined date and time selector |
| Date |
Date Picker |
Calendar-based date selection |
| Time |
Time Picker |
Time-only selection control |
| ID (Foreign Key) |
Combobox Selector |
Automatically links to related model with proper label field display |
| Password |
Password Input |
Masked input with security features |
| Email |
Text Input |
With email format validation |
| JSON / JSONObject |
JSON Editor |
Syntax-highlighted JSON editing interface |
| Measure / RatioMeasure |
Measure Input |
Specialized controls for unit-based measurements |
| Address |
Address Input |
Structured address entry with validation |
3. Core Concepts
AI-Powered Analysis
The Screen Generation Package leverages Fuuz's native AI capabilities to perform intelligent analysis of data model structures. Rather than applying rigid templates, the system examines field names, data types, metadata annotations, and relationship patterns to make contextual decisions about UI component selection and screen organization.
For example, when the AI encounters a field named "description" or "note" with String type, it recognizes this as a likely candidate for a markdown editor rather than a simple text input. Similarly, ID fields ending in "Id" trigger relationship analysis to automatically configure combobox selectors with appropriate label fields from the related model.
Screen generation relies heavily on data model metadata stored in the Fuuz platform. Critical metadata elements include:
- Label Fields: Defines which field should display in dropdown selectors (e.g., "name" instead of "id")
- Default Values: Automatically populates form fields with configured defaults
- Sequence Configuration: Identifies auto-incrementing fields to exclude from required validation
- Module Information: Determines proper navigation paths and screen organization
- Validation Rules: Applies required field indicators based on schema definitions
This metadata-driven approach ensures that generated screens automatically inherit the business logic and constraints defined in the data model layer, maintaining data integrity without additional configuration.
Modular Component Architecture
The package architecture separates screen generation into specialized concerns, each handled by a dedicated data flow. This modular design provides several advantages:
- Maintainability: Individual component flows can be updated independently without affecting other generation logic
- Customization: Developers can modify specific flows (e.g., column generation) to change only that aspect of screen output
- Reusability: Component flows can be called independently for partial screen updates or specialized use cases
- Parallel Processing: Multiple component flows can execute simultaneously, improving generation performance
- Debugging: Issues can be isolated to specific component flows rather than debugging monolithic generation logic
Source Node Triggering
Screen generation is initiated through the source input node pattern within the Screen Generator data flow. This approach allows developers to:
- Open the Screen Generator flow in the Data Flow Designer
- Locate the source input node at the flow's entry point
- Replace placeholder data model names with actual model names from their application
- Execute the flow to generate screens for the specified models
- Review and save the generated screen definitions
This direct execution model eliminates the need for external triggers, configuration files, or API calls, providing immediate feedback and rapid iteration during development.
Developer Tip: The source node approach allows developers to test screen generation iteratively by modifying input parameters and re-running the flow without leaving the Data Flow Designer interface.
Validation and Required Fields
The Screen Generation Package implements intelligent validation logic based on data model schema analysis:
- Required Indicator: Fields marked as non-nullable in the schema automatically receive required validation
- Default Value Exemption: Fields with configured default values are excluded from required validation since values are auto-populated
- Sequence Field Handling: Auto-incrementing fields with sequence configuration bypass required validation (v0.0.3 enhancement)
- ID Field Exception: Primary key ID fields are excluded from required validation as they are system-generated
- Type-Specific Validation: Email fields receive format validation, numeric fields receive type validation, etc.
4. Usage & Implementation
Prerequisites
Before using the Screen Generation Package, ensure the following requirements are met:
| Requirement |
Details |
| Access Type |
App Admin or Developer access type assigned to user account |
| Package Installation |
Screen Generation Package (v1.5.1) installed via Package Manager |
| Data Models |
At least one data model created and deployed in the application |
| Model Metadata |
Data models should include proper metadata (label fields, module assignments) for optimal screen generation |
| Platform Version |
Fuuz Platform version 2023.11.2 or later |
Basic Usage Pattern
To generate screens using the Screen Generation Package:
- Navigate to Data Flow Designer: Access the Data Flow module within your Fuuz application
- Open Screen Generator Flow: Locate and open the "Screen Generator" data flow from the installed package
- Locate Source Input Node: Find the source input node at the beginning of the flow (typically labeled "Request" or "Input")
- Configure Model Names: Edit the source node payload to specify your data model name(s) - replace any placeholder values with actual model names from your application
- Execute Flow: Run the data flow using the execution controls in the Data Flow Designer
- Review Output: Examine the generated screen definition in the flow response
- Save Screen: If satisfied with the generated output, save it as a new screen in the Screen Designer or use it to update existing screens
Important: The package requires no post-installation configuration. All data flows are ready to use immediately after package installation completes.
Customization Options
While the Screen Generation Package produces high-quality screens out-of-the-box, developers can customize the output flows to meet specific project requirements:
- Field Order Modification: Adjust transform nodes to reorder form fields according to UX requirements
- Component Type Override: Modify field type mapping logic to use different UI components for specific field types
- Section Organization: Customize the Screen Generation Section Create flow to alter how fields are grouped into sections
- Validation Rules: Enhance or relax validation logic in the Screen Generation Actions Create flow
- Column Configuration: Adjust table column generation in the Screen Generation Column Create flow to change default sorting, filtering, or display options
- Label Formatting: Modify label generation logic to apply custom formatting rules (e.g., all caps, specific prefixes)
All customizations should be made to copies of the package flows to preserve the original package functionality. This allows developers to maintain both standard and customized screen generation workflows within the same application.
Integration with Screen Designer
Generated screen definitions are fully compatible with the Fuuz Screen Designer. Developers can:
- Import generated screen JSON into Screen Designer for visual editing
- Use generated screens as starting points, then add custom visualizations, charts, or advanced components
- Combine AI-generated sections with manually designed sections within the same screen
- Apply screen templates and themes to generated screens
- Deploy generated screens to any environment (Build, QA, Production) using standard screen deployment workflows
5. Best Practices
Data Model Design
To maximize screen generation quality, follow these data model design practices:
- Descriptive Field Names: Use clear, descriptive field names that convey purpose (e.g., "customerEmail" instead of "email1")
- Proper Label Field Configuration: Ensure all models have appropriate label fields defined in metadata for optimal combobox display
- Consistent Naming Conventions: Follow standard naming patterns for ID fields (e.g., "customerId", "orderId") to enable automatic relationship detection
- Complete Field Descriptions: Populate field description metadata to provide context in generated form labels and tooltips
- Appropriate Default Values: Configure default values where applicable to improve user experience in generated forms
- Logical Module Organization: Assign models to appropriate modules to ensure generated navigation paths are correct
Generation Workflow
- Start with Simple Models: Test screen generation with simple models before attempting complex multi-relationship models
- Iterative Refinement: Generate initial screens, review output, adjust data model metadata if needed, and regenerate
- Version Control: Save generated screen versions before making manual modifications to enable rollback if needed
- Generate in Development Environment: Always generate and test screens in Build or QA environments before promoting to Production
- Batch Processing: Generate screens for multiple related models in a single session to maintain consistency
Customization Strategy
- Copy Before Modifying: Always create copies of package data flows before making project-specific customizations
- Document Customizations: Add detailed descriptions to modified flows explaining what was changed and why
- Minimal Modifications: Make the smallest number of changes necessary to achieve desired results - extensive modifications may complicate package updates
- Test Thoroughly: Test customized flows with various model types to ensure changes don't break generation for edge cases
- Share Customizations: If multiple developers are generating screens, ensure customized flows are accessible to the entire team
- Generate During Low-Usage Periods: For complex models with many relationships, run screen generation during off-peak hours
- Limit Concurrent Generations: Avoid running multiple screen generation flows simultaneously to prevent resource contention
- Clean Up Test Screens: Remove generated test screens that won't be used to keep the application organized
- Monitor Execution Logs: Review data flow execution logs to identify any performance bottlenecks in the generation process
Screen Quality Assurance
- Review All Generated Screens: Manually review generated screens before deployment to verify they meet UX requirements
- Test All Form Actions: Verify that Create, Update, and Delete operations function correctly on generated forms
- Validate Relationships: Test all combobox selectors to ensure they populate with correct related records
- Check Validation Rules: Confirm that required field validation and format validation work as expected
- Mobile Responsiveness: Test generated screens on mobile devices to ensure responsive layout works properly
- Cross-Browser Testing: Verify screen functionality across different browsers if application supports multiple browsers
6. Technical Considerations
Package Dependencies
The Screen Generation Package (v1.5.1) has no external package dependencies. All required functionality is included within the package itself. The package specification version is 2.0.0, compatible with Fuuz Platform version 2023.11.2 and later.
GraphQL API Integration
The Get Model By Name transform uses the Fuuz GraphQL API to retrieve data model metadata. The query executed is:
query GetModelByName($name: String!) {
modelMap(where: { name: { _eq: $name } })
}
This query retrieves the complete model definition including all fields, types, relationships, and metadata necessary for screen generation. The query is executed against the application API, automatically respecting the current user's access permissions.
Screen generation logic is implemented using JSONata, Fuuz's primary transformation language. The package makes extensive use of JSONata's advanced features including:
- Regular Expressions: For parsing field types and extracting base types from GraphQL type notation
- Conditional Logic: For intelligent component selection based on field characteristics
- Object Merging: For combining default component properties with field-specific overrides
- Array Processing: For iterating over model fields and relationships
- Custom Function Calls: Including
$executeTransform() for calling saved transforms like Get Model By Name - String Manipulation: Using functions like
$startCase(), $pluralize(), and $lowerFirst()
Developers familiar with JSONata can easily understand and modify the screen generation logic by examining the transform nodes within the package data flows.
Data Flow Execution Context
Screen generation flows utilize the Fuuz data flow context mechanism extensively. The $state.context object is used to pass information between flow nodes, including:
- Component Configuration: Screen component definitions being built
- Model Metadata: Retrieved data model information
- Processing Parameters: API names, module IDs, and other configuration values
- Intermediate Results: Partially generated components passed between sub-flows
Understanding the context structure is essential for developers who want to customize generation logic or debug flow execution.
Node Type Usage
The Screen Generator flow (70 total nodes) utilizes a diverse set of data flow node types to orchestrate screen generation:
| Node Type |
Count |
Purpose in Screen Generation |
| Transform |
25 |
Primary logic nodes that convert data model metadata into UI component definitions using JSONata |
| If/Else |
7 |
Conditional branching based on field types, model characteristics, or generation parameters |
| Query |
5 |
GraphQL queries to retrieve data model metadata and relationship information |
| Mutate |
5 |
Potentially used for creating screen records in the database (usage depends on flow configuration) |
| Log |
5 |
Debug logging for troubleshooting generation issues and tracking execution flow |
| Execute Flow |
4 |
Calls to sub-flows (Actions Create, Column Create, Filter Create, Section Create) |
| Merge Context |
4 |
Combines results from parallel processing branches back into unified context |
| Combine |
3 |
Waits for multiple parallel branches to complete before continuing execution |
| Response |
3 |
Multiple response nodes for different execution paths or error handling scenarios |
| Broadcast |
2 |
Distributes payload to multiple parallel processing branches for concurrent execution |
| Fork |
2 |
Creates multiple independent execution paths for specialized processing |
| Switch |
2 |
Multi-way conditional branching for complex decision trees |
| Request |
1 |
Entry point that receives input parameters (data model names, configuration) |
| Set Context |
1 |
Initializes or updates the execution context with generation parameters |
| When |
1 |
Conditional execution that only proceeds if specified condition is met |
Error Handling
The Screen Generation Package includes error handling at multiple levels:
- Model Validation: Checks for existence of specified data models before attempting generation
- Field Type Validation: Handles unknown or unsupported field types gracefully with fallback to text input
- Relationship Validation: Verifies that related models exist before configuring combobox selectors
- Null Safety: Uses JSONata's
$coalesce() and $isNilOrEmpty() functions to handle missing metadata - Execution Logging: Log nodes capture errors for troubleshooting failed generation attempts
Limitations and Known Issues
While the Screen Generation Package is highly capable, users should be aware of the following:
- Custom Component Types: The package generates standard Fuuz UI components - custom or third-party components must be added manually
- Complex Layouts: Generated screens use standard layouts - complex custom layouts require manual design in Screen Designer
- Advanced Visualizations: Charts, dashboards, and data visualizations are not automatically generated
- Business Logic: While validation rules are applied, complex business logic and custom event handlers must be added manually
- Styling Customization: Generated screens use default Fuuz styling - custom CSS or theming requires post-generation modification
- Multi-Model Forms: The package focuses on single-model CRUD operations - forms that combine multiple unrelated models may require customization
Extensibility: All package data flows can be customized by developers to overcome these limitations or add project-specific functionality. The modular architecture supports targeted modifications without affecting the entire generation process.
- Data Model Designer: Learn how to create and configure data models that will be used for screen generation
- Screen Designer: Understand the screen components and layouts that the Screen Generation Package produces
- Data Flow Designer: Reference for understanding the data flow nodes used in screen generation logic
- JSONata Reference: Complete guide to JSONata transformation language used extensively in the package
- GraphQL API Documentation: Details on the Fuuz GraphQL API used to query data model metadata
- Package Manager: Instructions for installing, updating, and managing Fuuz packages
The following Fuuz packages may complement screen generation workflows:
- Data Model Templates: Pre-built data model packages that work well with screen generation
- UI Component Libraries: Additional UI components that can be added to generated screens
- Validation Rule Packages: Advanced validation logic that can enhance generated forms
- Navigation Templates: Pre-configured navigation structures that integrate with generated screens
Support Resources
| Resource |
Description |
| Fuuz Knowledge Base |
Comprehensive articles on all Fuuz platform features and capabilities |
| Fuuz Community Forum |
Connect with other developers, share customizations, and ask questions |
| Technical Support |
Contact Fuuz support for assistance with package issues or customization guidance |
| Training Resources |
Video tutorials and hands-on courses covering screen generation workflows |
| Release Notes |
Version history, new features, and bug fixes for Screen Generation Package updates |
Getting Help: For questions specific to the Screen Generation Package, include your package version (1.5.1), platform version, and a description of the data models you're working with when contacting support.
Version History
| Version |
Component |
Changes |
| 1.5.1 |
Package |
Current release - Compatible with Platform 2023.11.2+ |
| 0.0.16.3 |
Screen Generator |
Performance optimization: Multiple nodes with fewer requests per execution |
| 0.0.3 |
Actions Create |
Added support for validation=false when a sequence exists |
| 0.0.3 |
Column Create |
Enhanced table column generation logic |
| 0.0.3 |
Section Create |
Improved screen section organization and field grouping |
| 0.0.12 |
User Route Preference |
Real-time table view sharing across active users in the application |