Skip to content
Open access

An Architecture-Aware Flutter Code Generation Framework for Enforcing Clean Architecture and Behavioral Design Patterns

2026 · International Journal of Advanced Computer Science and Applications · 0 citations · 21 references

Abstract

Large-scale Flutter applications can accumulate direct inter-module dependencies, inconsistent responsibility boundaries, and inflexible data-access implementations as their functionality grows. Conventional scaffolding approaches primarily automate project structures and repetitive code, while architectural relationships commonly remain dependent on developer-level implementation decisions. This study proposes an architecture-aware Flutter code generation framework that transforms JavaScript Object Notation (JSON)-based application specifications into modular source code while systematically applying Clean Architecture, Mediator, and Strategy rules. The main contribution lies not in combining these established architectural concepts, but in encoding their architectural roles as repeatable specification-to-code transformation rules. The framework was evaluated using three application specifications containing one, two, and eight functional modules. All three applications were successfully generated, executed, and built into installable Android APKs. In the evaluated Login and Register interaction, two direct cross-module relationships observed in the legacy architecture were replaced by mediator-based communication, resulting in no direct Login and Register reference in the generated structure. The generated architecture also represented REST API and SQLite data providers through a common Strategy-based abstraction. These findings demonstrate operational feasibility and provide structural evidence that the intended architectural rules were incorporated into the evaluated generated artifacts. However, the evaluation is limited to the supported JSON schema, predefined generation templates, three application specifications, and the evaluated architectural relationships; therefore, the results should not be interpreted as general evidence of long-term maintainability, scalability, or superiority over other Flutter code generators.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.