Front-End Code Generation with LLMs: A Hands-On Test of Capability Limits and Engineering Adoption

    A hands-on evaluation of a general-purpose LLM on a medium-complexity, multi-page front-end project reveals a clear pattern: login pages come out nearly production-ready, but filtering logic on list pages and validation details on form pages expose a gap in business-logic comprehension. This article breaks down results page by page, compares the model against a reference baseline, and offers practical engineering recommendations—structured requirement specs, phased generation, and automated acceptance testing—for turning code generation into real delivery capability.

    Front-End Code Generation with LLMs: A Hands-On Test of Capability Limits and Engineering Adoption

    1. Why “It Generates Code” Doesn’t Mean “It’s Deliverable”

    Discussions about general-purpose LLMs generating front-end code tend to fall into two extremes: “mind-blowing, a generation ahead,” or “only good for toy pages.” Both miss the engineering reality: front-end delivery is not single-point code completion. It’s the combined outcome of requirement understanding, state management, interaction logic, visual consistency, maintainability, and acceptance testing.

    This article does not promote or review any specific product. Instead, it abstracts a real testing scenario into a general technical question: given a moderately complex, real-world front-end requirements document, how far can a general-purpose LLM go in producing a multi-page project, and where does its capability degrade? To avoid brand bias, the evaluated model is referred to as “the test model,” and the historical comparison baseline as “the reference model.”

    The evaluation sample covers three typical page types—a login page, a product list page, and a form page—including common requirements such as carousels, filtering interactions, field validation, and state feedback. The evaluation dimensions are:

    • Functional completeness: Are all features in the requirements document implemented?
    • Comprehension depth: Are filter conditions, field relationships, and interaction sequences accurately reproduced?
    • Engineering structure: Are directory organization, component decomposition, and state/data flow reasonable?
    • UI usability: Do layout, responsiveness, empty/error states, and accessibility meet the bar?
    • Generation efficiency: How long from submitting requirements to receiving an accessible artifact?
    • Deployability: Is the output directly runnable, rather than just code snippets?

    It’s worth emphasizing that the conclusions below come from a limited sample and cannot replace systematic benchmarking, but they are sufficient to reveal the model’s typical boundaries on medium-complexity front-end tasks.

    2. Usage Experience: Rate Limiting and Generation Speed Affect Continuous Evaluation

    The first issue encountered in testing was rate limiting at the trial entry point: during peak hours, the system reported too many concurrent users, requiring queuing or a paid plan, and several retries were needed to get in. For individual experimentation this is just a fluctuation in experience; for team evaluation, it directly impacts continuous testing efficiency, because you cannot reliably reproduce multiple generation rounds for the same requirement.

    Once generation started, no specific tech stack was mandated—the model chose a mainstream component-based front-end framework on its own. Overall speed was slow: a single complete project took about half an hour from start to finish, while the reference model in the same scenario took only a few minutes. A necessary caveat: speed is affected by free quotas, queuing policies, and task complexity, and cannot be simply extrapolated into a product performance conclusion. But in engineering selection, generation latency directly affects iteration cadence, especially for requirements that need multiple revision rounds.

    One point worth acknowledging: the test model delivered a directly accessible project URL rather than mere code snippets. This means the artifact at least went through basic project assembly and runnability verification, reducing the friction of “copied the code but it won’t start.” For rapid prototyping and requirement clarification, this kind of end-to-end artifact is far more valuable than scattered code.

    3. Page-by-Page Breakdown: The Login Page Is Fine; List and Form Pages Expose Insufficient Comprehension Depth

    3.1 Login Page: Good Completeness, Close to “Usable with Minor Edits”

    The login page included a carousel requirement. In testing, the carousel was implemented, the page was functionally complete, and there were no obvious omissions. Overall it reached a level of “ready for production after local adjustments.” Here “usable” mainly means:

    • Complete page structure with main regions and interaction entry points present;
    • Basic carousel switching capability in place;
    • No obviously broken visual layout;
    • A runnable, accessible artifact.

    However, engineering acceptance can’t stop at “does it exist.” A login page still needs checks for conflicts between autoplay and manual switching, indicator state synchronization, image-load failure fallbacks, responsive breakpoints, keyboard accessibility, and carousel timer cleanup. The model can produce the skeleton, but detail quality depends on how explicit the requirements document is and how thorough the human review is.

    3.2 List Page: Correct Structure, but Filtering Interactions Weren’t Implemented

    Problems became apparent on the product list page. The requirements document clearly specified filter conditions and interaction logic, but in testing the filter controls were not implemented. More importantly, this wasn’t an occasional omission on one list page—it appeared across multiple list pages, indicating a capability gap between “generating page structure” and “understanding business interactions.”

    The difficulty of a list page lies not in table or card layout, but in the state space. A usable filterable list involves at least:

    • Filter fields, control types, default values, and dictionary sources;
    • Combination rules for single-select, multi-select, and range filters;
    • Request parameters after filter changes, pagination resets, and sort persistence;
    • Loading, empty, error, and no-result states;
    • Whether filter state is written to the URL and survives a refresh;
    • Boundary behaviors for clearing filters, quick filters, and combined filters.

    The model easily generates a static structure that “looks like a list page,” but under-reproduces the linkage between filter conditions, data requests, and pagination state. The root cause is that interaction logic in requirements documents is still mostly natural language, forcing the model to infer the state machine on its own—and the longer the inference chain, the easier details get lost.

    3.3 Form Page: It Runs, but Fields, Validation, and Interaction Details Don’t Fully Match the Document

    The form page ran overall, but many fields, validation rules, and interaction details were not implemented as described in the document. Even with a fairly clear document, the model’s ability to comprehend and reproduce complex form requirements fell short. The typical difficulties of complex forms include:

    • Field visibility dependencies: When one field’s value changes, does another group of fields appear or become required?
    • Validation rules: Format validation, asynchronous uniqueness checks, cross-field consistency checks;
    • Error display: Field-level errors, form-level errors, and re-display after submission failure;
    • Interaction sequencing: Duplicate-submission prevention, draft saving, leave confirmation, step switching;
    • Data mapping: Conversion between front-end fields and API fields, default value merging, null handling.

    When these rules are described in long paragraphs, the model tends to implement only the “happy path,” omitting conditional branches and exception paths. A more robust approach is to convert requirements into structured specifications—field tables, rule tables, state matrices, and acceptance cases. Below is an illustrative spec fragment:

    1. {
    2. "page": "product_form",
    3. "fields": [
    4. {
    5. "name": "category",
    6. "control": "select",
    7. "required": true,
    8. "optionsSource": "dict",
    9. "onChange": ["reset:subCategory", "show:subCategory"]
    10. },
    11. {
    12. "name": "subCategory",
    13. "control": "select",
    14. "required": true,
    15. "visibleWhen": "category != null",
    16. "optionsSource": "dict:byCategory"
    17. }
    18. ],
    19. "validations": [
    20. {"field": "code", "rule": "pattern", "message": "Invalid format"},
    21. {"field": "code", "rule": "asyncUnique", "trigger": "blur"}
    22. ],
    23. "acceptance": [
    24. "Changing category resets subCategory and refreshes its options",
    25. "Blurring code triggers the uniqueness check and shows a field-level error",
    26. "The button is disabled while submitting; repeated clicks must not issue a second request"
    27. ]
    28. }

    A structured spec doesn’t guarantee correct generation in one shot, but it significantly reduces comprehension ambiguity and makes acceptance criteria executable.

    4. UI Style: Engineering Usability First, Design Still Conservative

    The overall UI style is unremarkable: better than most auto-generated prototypes, but still behind pages built directly with mature component libraries, design systems, or atomic CSS approaches. Specifically, the design feels simplistic with obvious engineering fingerprints—a positioning of “engineering-usable over visually polished.”

    This isn’t necessarily a weakness. For admin systems, internal tools, and requirement-validation pages, clear structure, consistent components, and maintainability matter more than visual flair. But if the goal is a user-facing product page, you need to supply design tokens, spacing systems, color guidelines, responsive breakpoints, and accessibility constraints. Otherwise the model produces pages that “look fine” but fail to form a unified design language.

    5. The Gap vs. the Reference Model: It’s About Comprehension Depth, Not Coding Ability

    Comparing the same set of features against the reference model’s historical results, the gap concentrates in comprehension depth:

    • Login page: Both are close in completeness; each reaches basic usability;
    • List page: The reference model reproduces filter conditions, field structures, and interaction logic more completely;
    • Form page: The reference model’s advantage is more pronounced in field relationships, validation logic, and interaction details;
    • Speed: The reference model runs in minutes; the test model takes about half an hour per run—though trial quotas and queuing must be factored in;
    • Comprehension accuracy: The reference model reproduces complex requirements more accurately.

    So the test model isn’t “incapable of front-end work”—it’s better suited to medium-complexity tasks with clear structure and relatively linear interaction rules. Once requirements involve multi-state linkage, cross-field validation, and complex filtering, its output needs substantially more human reinforcement. Positioning it as “a generation ahead” or “crushing the competition” is not rigorous; the more accurate assessment is: solid, but not a significant generational leap.

    6. Its Key Strength: Open Weights, Local Deployment, and Network Accessibility

    Despite these capability limits, this class of model has one strong advantage: the local deployment headroom enabled by open weights, along with accessibility in network environments where certain overseas hosted services may be hard to reach. For organizations with data compliance, privatization, cost control, and secondary development needs, this is more practically meaningful than leaderboard scores alone.

    In a general cloud environment, container platforms, object storage, logging services, and monitoring/alerting capabilities can host the model service and front-end artifacts, forming a governable inference pipeline. But be clear: open weights do not mean out-of-the-box readiness. Teams still need to handle model-serving stability, permission isolation, audit logging, content safety, version rollback, and cost monitoring. Whether the advantage converts into productivity depends on engineering governance capability.

    7. Adoption Recommendations: Put the Model into an “Acceptable” Engineering Workflow

    1. Structure the requirements: Break natural-language documents into page inventories, field tables, interaction state matrices, and acceptance cases to reduce the model’s inference burden.
    2. Generate in phases: First generate page skeletons and component structure, then add interaction logic, and finally validation and exception states—avoiding comprehension decay from overly long single-shot inputs.
    3. Automate acceptance: Apply end-to-end tests, snapshot tests, and accessibility scans to critical paths, focusing on filter linkage, form validation, empty/error states, and duplicate submissions.
    4. Human-review the design system: Unify design tokens, component conventions, and responsive breakpoints so pages don’t each grow in their own direction.
    5. Define applicability boundaries: Prioritize the model for medium-complexity front-end tasks; keep human design and testing investment for complex business forms, highly interactive lists, and multi-role permission pages.

    8. Conclusion

    The test model performs “decently” on real front-end requirements: the login page is well-completed, the artifact is accessible, and the engineering structure is basically sound. But missing list-page filters, under-reproduced form details, and a conservative overall UI reveal clear shortcomings in complex business comprehension. Compared with the reference model, the login page is close, the list and form pages lag more visibly, and speed is not an advantage either. It suits medium-complexity front-end tasks and rapid prototyping, but it has not reached “a generation ahead” or “crushing competitor X” territory.

    For developers, the more rational stance is: don’t inflate expectations based on marketing slogans, and don’t dismiss the whole approach over single-point failures. Treat the model as an “acceptable code-generation assistant,” constrain its output with structured requirements, phased generation, and automated testing—and only then can generation capability be converted into real engineering efficiency.