Front-End Code Generation with Chinese Open-Source LLMs: An Evaluation and Its Industry Implications
This article examines how Chinese open-source large language models perform in front-end code generation for realistic software projects, using a typical admin system as the test scenario. Rather than focusing on demo pages, it evaluates whether generated output can be delivered as a working system: requirement coverage, interaction correctness, complex business logic, project runnability, maintainability, and repair cost. The analysis covers login, data-list, and business-form pages, highlights common gaps in state handling, cross-page consistency, and exception flows, and proposes a phased evaluation framework. It also discusses the industry value of open-source models and offers practical guidance for developers and enterprises adopting model-generated front-end code.
In recent years, large language models (LLMs) for software development have evolved quickly. In the area of generating front-end pages from natural language, models no longer stop at producing isolated code snippets. They increasingly attempt to generate complete projects from product documents, organize page structures, and provide a runnable entry point. In response, industry discussions often include claims that such capabilities are “close to international leading levels” or can “replace traditional development workflows.”
However, the upper limit shown in a model demonstration is not the same as delivery capability in a real project. Whether a model can genuinely help developers depends not only on whether it can generate a page, but also on whether it understands requirements, implements interactions accurately, handles complex state, and produces results that are maintainable. This article starts from the front-end requirements of a typical admin system and analyzes how current Chinese open-source models perform in practical development.
1. Evaluation Focus: From “Can Generate” to “Can Deliver”
Front-end code generation usually involves multiple layers.
The first layer is page structure generation, including basic components such as navigation bars, tables, cards, forms, dialogs, and pagination. The second layer is visual expression, including spacing, color, typography, responsive layout, and overall page style. The third layer is business logic, including filter conditions, field dependencies, data validation, state transitions, error messages, and permission control.
Many models perform relatively well at the first layer and can quickly build a page that looks complete. Real projects, however, place more emphasis on the second and third layers, especially implicit relationships that are not written directly as code in the requirements document. For example: should pagination reset when a filter condition changes? Is a field mandatory under a specific state? Should user input be preserved after a failed submission? Should action buttons in a list be displayed dynamically based on permissions? These details often determine whether a system can actually be put into use.
Therefore, evaluating a model should not rely only on whether a page “looks right.” The following indicators matter more:
- Requirement coverage: whether all functions explicitly stated in the document are implemented;
- Interaction correctness: whether state changes after user actions match expectations;
- Complex-logic fidelity: whether field dependencies, validation rules, and exception flows are complete;
- Project runnability: whether the project can start, build, and be accessed;
- Maintainability: whether the code structure is clear and whether components are reusable;
- Modification cost: how much manual correction developers need after taking over.
2. Real-Project Test: Basic Pages Are Relatively Complete
The test used a typical project containing a login page, a data-list page, and a business-form page as input. Only the product requirements document and page function descriptions were provided, without excessive restrictions on implementation language or specific components.
The model first generated an accessible project rather than returning only several code snippets. This has practical value. For developers, a runnable project is easier to verify than isolated code fragments, and it helps reveal problems in page layout, dependency configuration, and interaction flows more quickly.
The login page performed relatively consistently. Common elements such as account and password inputs, a login button, and auxiliary visual areas were generally completed. Some pages also generated carousel content or background display modules according to requirements. The results suggest that models have developed strong structured understanding of common page patterns.
Such pages have relatively simple business rules and highly standardized component patterns, so models can often complete them using existing general design experience. If the requirement is only to create an internal-system login page, the generated result can usually serve as a first version, after which developers adjust the details.
Still, “usable” and “production-ready” are not the same. Details often require further manual confirmation, such as whether password-error messages are clear, whether the submit button is disabled during submission, whether a loading state is shown during network requests, whether the Enter key supports submission, and whether input is preserved after a failed login.
3. List Pages: Structure Is Easy; Business Understanding Is Harder
Differences in model capability become more obvious on data-list pages. Tables, pagination, action columns, and basic layouts can usually be generated, but filter areas and business interactions are often incomplete.
For example, a requirements document may explicitly require filtering by name, status, time range, and category, and may define how different conditions combine. A model may generate only a simple input field and a query button, or it may generate filter controls without actually passing their values into the query logic.
This indicates that the model has understood the form of “a list page should have a filter area,” but not necessarily how the filter area participates in the business flow. Common issues include:
- Too few filter fields, with some conditions in the document ignored;
- The query button not triggering the correct data refresh;
- Reset clearing only the interface without restoring default pagination;
- Old data remaining after filter conditions change;
- Time ranges not being format-converted or boundary-handled;
- Incomplete empty-data, load-failure, and duplicate-submission states;
- Delete or batch operations lacking confirmation and result feedback.
The difficulty of list pages is that they are not a single component but a combination of query state, data state, pagination state, and operation state. If a model generates a page only according to a visual template, it can easily produce a result with a complete interface but incomplete functionality.
In real engineering, generation quality can be improved by describing state transitions explicitly. For example, instead of writing only “support conditional filtering,” specify:
- What default conditions are used when the page is first opened;
- Whether the page number resets after clicking Query;
- Which values are restored after clicking Reset;
- How the page displays a query failure;
- Whether filtering changes trigger automatic queries;
- Whether the current page refreshes after a successful deletion;
- How to handle the case where the last item on the current page is deleted.
The closer requirements are to executable rules, the more accurately a model can implement them.
4. Form Pages: Complex Relationships Are the Main Challenge
Forms are one of the scenarios that best reveal the depth of a model’s understanding. Simple forms are usually just a combination of input fields and a submit button, while real business forms often contain field dependencies, conditional display, dynamic arrays, validation rules, and multi-stage submission.
Test results show that models can generate basic form layouts but often deviate on complex details. Common problems include missing fields, field order that does not match requirements, incomplete validation conditions, and unimplemented linkage relationships between fields.
For example, after a user selects a certain business type, the page should display additional configuration items; when “enabled” status is selected, related parameters must be filled; when a user changes a parent category, child options need to be reloaded and old values cleared. If these rules are not accurately converted into state logic, the page may run but fail to meet real business needs.
Form implementation also needs attention to the following:
- Whether required-field validation covers all fields;
- Whether character-length, numeric-range, and format validation are accurate;
- Whether error messages appear where users can easily notice them;
- Whether user-entered data is preserved after a failed submission;
- Whether edit scenarios correctly populate existing data;
- Whether dynamically added and removed items cause data misalignment;
- Whether cancel actions require confirmation;
- Whether repeated clicks are prevented during form submission.
These issues show that the hardest part of model-generated front-end code is not component syntax, but converting business constraints in natural language into a stable, verifiable state machine.
5. Visual Quality: Engineering Usability Is Not Product Maturity
From an overall visual perspective, pages generated by current Chinese open-source models can usually reach a level that is “structurally complete, stylistically consistent, and suitable for further development,” but there is still a gap before they become mature products.
Pages generally do not show serious layout errors, and color, spacing, and component arrangement are basically reasonable. However, generated results tend to lean toward generic engineering templates, with limited design personality and insufficient emphasis on information hierarchy and visual priorities. For internal systems, this may already meet first-version development needs; for external users, professional designers may still need to make adjustments.
Visual quality can be further judged from several aspects:
- Whether the first screen highlights the core task;
- Whether page information density is reasonable;
- Whether headings at different levels and auxiliary information are clearly distinguished;
- Whether empty, loading, and error states are consistent;
- Whether the page adapts properly to mobile or narrow-screen environments;
- Whether colors meet accessibility requirements;
- Whether interaction feedback is timely and clear.
Therefore, models are better suited as “high-efficiency generators of prototypes and first engineering versions” rather than complete replacements for product design and front-end engineering workflows.
6. Comparison with Leading International Models: The Gap Is Mainly in Depth of Understanding
If the same requirements are given to different types of models, the gap on basic pages may not be obvious. Login pages, ordinary card pages, and simple data tables are high-frequency patterns that models can usually complete.
The real gap appears mainly in three areas.
The first is long-document understanding. Whether a model can consistently remember fields, states, and constraints defined earlier directly affects the consistency of the final project.
The second is cross-page relationships. Create, edit, detail, and list pages usually share the same data structure. If a model generates each page separately, field naming may be inconsistent and validation rules may not be unified.
The third is exception-flow handling. A strong generated result considers not only “successful normal submission” but also API failure, empty data, insufficient permissions, duplicate submission, and network latency.
This is also why some models appear to produce “a large amount of code” while actual delivery efficiency remains low. Code volume does not represent requirement completion; what matters is whether key logic forms a closed loop.
7. Building a More Scientific Model Evaluation System
To avoid being misled by a single demonstration page, enterprises and development teams can adopt a phased evaluation method.
1. Requirement Coverage Evaluation
Split the product document into a verifiable function list and record item by item whether the model implements each function. Do not give only an overall score; distinguish between “fully implemented,” “partially implemented,” “not implemented,” and “implemented but defective.”
2. Interaction Flow Evaluation
Design test paths around user tasks, such as login, query, edit, delete, reset, and exception recovery. Each path should define inputs, expected states, and final results.
3. Code Quality Evaluation
Check component decomposition, state management, error handling, naming conventions, and duplicate code. For generative development, maintainability is more important than one-time runnability.
4. Manual Repair Cost Evaluation
Measure the time developers spend from the model’s first draft to a deliverable version, including adding fields, correcting logic, adjusting styles, and handling exceptions. This indicator reflects actual productivity better than generation speed alone.
5. Reproducibility Evaluation
Generate from the same requirements multiple times and observe whether results are stable. If page structures and functions vary widely each time, the model still needs stricter prompts, templates, and test constraints.
8. The Significance of Open Source for AI Development
The ability of Chinese models to improve continuously in complex development scenarios is valuable to the open-source ecosystem.
First, open source helps lower the barrier to technology use. Developers, schools, and small and medium-sized enterprises can experiment, deploy, and build on public models without relying entirely on closed interfaces.
Second, open source helps expose problems and accelerate iteration. Defects encountered in real applications, including missing requirements, code quality, and security risks, can be discovered earlier through community feedback.
Third, open source supports the formation of a complete toolchain. A model itself is only a foundational capability; real applications also require data processing, inference services, evaluation systems, code execution environments, security auditing, and other supporting facilities. An open ecosystem allows more participants to innovate around these areas.
Of course, open source does not mean security and compliance can be ignored. When enterprises use models to generate code, they should still pay attention to dependency risks, sensitive-information leakage, access control, code vulnerabilities, and license constraints. Generated content must go through human review, automated testing, and security scanning; code should not go live simply because it came from a model.
9. Practical Recommendations for Developers and Enterprises
For developers, the most effective approach is not to treat a model as a fully automated programmer, but as a tool for requirement decomposition, page scaffolding, code completion, and testing assistance.
During use, provide structured requirements as much as possible, including page goals, field definitions, state transitions, exception scenarios, and acceptance criteria. For complex projects, generate by page or business module step by step rather than asking the model to complete the entire system at once.
For enterprises, model selection should not rely only on public demonstrations or single-generation results. It should be combined with a private evaluation set based on the organization’s own business. Evaluation content should preferably come from high-frequency scenarios in real projects and cover normal flows, exception flows, and permission flows.
Ultimately, teams can adopt a collaboration model of “model-generated first draft, developer review, automated test verification, and human acceptance before release.” This preserves the speed advantages of models while retaining the engineering team’s role in architecture, security, and business judgment.
Conclusion
Current Chinese open-source LLMs already have strong foundational capabilities in front-end page generation, especially for quickly building login pages, admin frameworks, and conventional business pages. However, moving from “can generate pages” to “can accurately deliver complex systems” still requires further improvement in long-context understanding, cross-page consistency, business-rule fidelity, exception handling, and code maintainability.
Compared with leading international models, the gap is not mainly about whether a model can write components, but whether it can understand real requirements continuously, accurately, and completely. For developers, rational evaluation is more important than simply chasing promotional claims. For the industry, the greatest value of open models is not a single performance comparison, but the promotion of broader participation in building foundational AI capabilities, allowing models to evolve from demonstration tools into reliable engineering productivity.
