Modular Layout Synthesis (MLS): Front-end Code via Structure Normalization and Constrained Generation
By: Chong Liu , Ming Zhang , Fei Li and more
Automated front-end engineering drastically reduces development cycles and minimizes manual coding overhead. While Generative AI has shown promise in translating designs to code, current solutions often produce monolithic scripts, failing to natively support modern ecosystems like React, Vue, or Angular. Furthermore, the generated code frequently suffers from poor modularity, making it difficult to maintain. To bridge this gap, we introduce Modular Layout Synthesis (MLS), a hierarchical framework that merges visual understanding with structural normalization. Initially, a visual-semantic encoder maps the screen capture into a serialized tree topology, capturing the essential layout hierarchy. Instead of simple parsing, we apply heuristic deduplication and pattern recognition to isolate reusable blocks, creating a framework-agnostic schema. Finally, a constraint-based generation protocol guides the LLM to synthesize production-ready code with strict typing and component props. Evaluations show that MLS significantly outperforms existing baselines, ensuring superior code reusability and structural integrity across multiple frameworks
Similar Papers
Advancing vision-language models in front-end development via data synthesis
CV and Pattern Recognition
Helps computers build websites from pictures.
DesignBench: A Comprehensive Benchmark for MLLM-based Front-end Code Generation
Software Engineering
Helps computers build websites better.
MLLM-Based UI2Code Automation Guided by UI Layout Information
Software Engineering
Turns website pictures into working code.