Engineering Practices for Generating Complete Front-End Projects with LLMs
This article evaluates how well large language models generate complete front-end projects from real requirements, covering login, product list, and form pages. It shows where capability degrades—filter logic, field dependencies, validation order, and visual polish—and compares the results with an overseas flagship model. The core takeaway is a practical engineering workflow: structure the requirements, turn acceptance into a checklist, iterate in a closed loop, and back the process with cloud infrastructure. It is written for developers who want to move from "a page that runs" to something deliverable.
1. Background: Why “Generating a Runnable Page” Is Not the Same as “Delivering”
Over the past year, the capability curve of code-generation models has clearly trended upward, and community discussions often compare a domestic model’s performance with that of an overseas flagship model. These comparisons are useful reference points for developers, but what truly determines productivity is not a leaderboard score. It is how faithfully the model reproduces results under real-world requirement constraints: whether it can read a requirements document with business rules, implement field relationships, validation order, and interaction states in one pass, and maintain structural consistency across multiple iterations.
I ran a full validation using the front-end requirements of a real project. The requirements covered three types of pages—login, product list, and form editing—and the document specified carousel slots, filter conditions, field linkage, and validation rules. To observe the model’s “default choices,” I did not specify a tech stack, and the model chose a component-based front-end framework (a React-style approach) on its own. Here is the conclusion up front: the page skeleton and basic usability met the bar, but there was clear degradation in reproducing complex interactions and document details, and the end-to-end time was on the long side. The following sections break this down by page and abstract a reusable engineering method.
2. Experience and Workflow: Queuing, Latency, and the Value of an “Accessible Artifact”
The first round was not smooth. During peak hours, there were queuing and rate-limiting prompts, and it took several retries to get in. Once inside, the overall time from initiating generation to completion was on the order of half an hour. For comparison, a similar requirement took about three minutes on an overseas flagship model. Part of the time difference came from resource queuing under the free tier, and part came from differences in the model’s strategy for long-context requirement parsing and multi-file generation.
One easily overlooked but critical experience point is that the output is not just code snippets in a chat window, but a directly accessible project URL. This matters a lot for engineering practice—it turns “reading code” into “clicking through a page,” so reviewers can immediately walk through the interactions in a browser instead of compiling mentally. I recommend that teams make this kind of “runnable artifact” a prerequisite for acceptance, which can significantly reduce communication costs.
3. Page-by-Page Evaluation: Where Capability Degrades
3.1 Login Page: Close to Usable
The carousel, form inputs, basic validation, and submission feedback were all implemented, with no obvious missing functionality—the level of “tweak it a bit and it can go live.” This type of page has a fixed structure and few states, which is where current models perform best.
3.2 List Page: Filtering and Linkage Are a Systemic Weakness
The page skeleton was correct, but the filter items explicitly written in the document were not implemented. Notably, this was not an occasional omission—multiple list pages behaved consistently, indicating a systemic shortcoming in “aggregating constraints scattered throughout the document into component state.” The typical manifestation is: the layout is right and the data source is right, but the “business-semantic layer”—filter conditions, empty states, pagination, and synchronization with query parameters—was simplified away.
3.3 Form Page: Insufficient Reproduction of Field Relationships and Validation Logic
The form ran overall, but field linkage, required-field rules, validation trigger timing, and error message placement deviated from the document’s description. The difficulty of a complex form lies not in the controls but in the state machine: a change in field A triggers changes in the visibility and selectable values of field B, and on submission, validation must occur in a specific order. The model tends to produce a “generally usable” implementation rather than branch logic that strictly matches the document.
3.4 Visual Style: Engineering-Usable Over Product-Impressive
The overall UI was slightly better than a typical prototype, but still fell short compared with directly applying a mature design system (a mature component library or an atomic CSS approach). The design felt engineering-oriented and lacked the layers and whitespace rhythm that make people’s eyes light up. If the target is an internal tool or a validation product, this level is sufficient; if it faces external users, design involvement is still needed.
4. Cross-Comparison: The Gap Is in “Depth of Understanding,” Not “Syntax Ability”
The same set of requirements had previously been implemented with an overseas flagship model. The comparison results are as follows:
- Login page: the two were close in completeness;
- List page: the overseas flagship model had a more complete understanding of filters and field structure;
- Form page: the overseas flagship model had a more obvious advantage in field relationships, validation order, and interaction details;
- Speed: the overseas flagship model was faster, while the domestic model had an obvious disadvantage in queuing and latency under the free tier.
Abstractly, the gap is not in “whether it can write code” but in constraint extraction and priority ordering for long documents. This also explains why leaderboard scores are close but the hands-on experience differs: leaderboards mostly test single-point capabilities, while engineering delivery tests multi-constraint consistency.
5. Engineering Method: Turning “Generation” into “Deliverable”
5.1 Structuring the Requirements Document
Rewriting natural-language requirements into a structure that machines parse more easily is the most effective step for improving fidelity. For example:
page: product_listfilters:- name: categorytype: selectoptions_from: api.categoriesdefault: all- name: price_rangetype: number_rangesync_with: url_querybehaviors:- on: filter_changedo: reset_page + refetchempty_state: show_placeholder_with_reset
Once structured, the model no longer has to “hunt for constraints” in a long document, and the omission rate drops noticeably.
5.2 Turning Acceptance into a Checklist
Turn “looks right” into “checkable item by item”:
- Are all filter items present, and does changing them reset pagination and re-fetch?
- Are URL query parameters and filter state synchronized in both directions?
- Do form field linkage, required fields, and validation trigger timing match the document?
- Are empty, loading, and error states all in place?
- Can the accessible artifact be walked through directly?
5.3 Closing the Iteration Loop
Do not expect to get it right in one generation. The recommended four-step loop is “generate skeleton → add interactions page by page → solidify state management → unify visuals,” with each step accepted via a runnable artifact. For complex forms, first have the model output a field state table (field, type, dependency, validation, message), then generate code—consistency will be much better.
5.4 Supporting Cost and Architecture
Once generative tools enter the production pipeline, it is advisable to plan common cloud capabilities in parallel: use object storage to host static artifacts, a container platform for preview environments, logging services and monitoring alerts to track anomalies, and a message queue for asynchronous tasks. Baidu AI Cloud offers corresponding capabilities in these common categories, and teams can select based on their existing architecture to avoid turning the validation environment into an “island.”
6. Implications for Open Source and Industry Evolution
Domestic models approaching the international first tier is a positive signal for the open-source ecosystem: open weights mean enterprises can deploy privately, do domain fine-tuning, and keep sensitive code within the intranet—which is especially critical for teams with high compliance requirements. But open source does not mean operations-free; inference resources, queuing strategy, version upgrades, and performance regression all require engineering investment. The metrics truly worth attention should shift from “leaderboard scores” to three engineering measures: constraint-following rate, first-pass rate, and end-to-end delivery time.
7. Conclusion
The judgment from this round of testing is: current models can already reliably handle the delivery of “page skeleton + basic interactions,” but still need human oversight for multi-constraint aggregation, complex form state machines, and visual refinement. The advice for developers is straightforward: structure the requirements, turn acceptance into a checklist, close the iteration loop, and then use common cloud capabilities to complete preview and monitoring. The ceiling of the tool is rising, but the floor of the output depends on how clearly you design your engineering constraints.
