Evaluating Frontend Code Generation in Large Language Models: Capability Boundaries and the Value of Open Weights

    This article examines how far general-purpose large language models can go when asked to generate complete, multi-page frontend projects from a requirements document rather than autocomplete single functions. It proposes a reproducible evaluation framework built on four dimensions—requirement coverage, interaction completeness, engineering usability, and delivery efficiency—and reports scenario-level observations: login pages are near usable, while list pages and forms lose logic as state and constraint density rises. The article also covers UI style tradeoffs, the often-overlooked cost of queuing and retries, practical recommendations for structuring requirements and splitting generation into small steps, and why open weights matter for private deployment, fine-tuning, cost control, and auditability.

    1. Background: From “Generating Code” to “Delivering a Project”

    Over the past year, general-purpose large language models with long context windows and tool-calling ability have started to be used to generate complete frontend projects, not just to autocomplete individual functions. The criteria for judging this capability have shifted accordingly: previously the question was whether a model could produce syntactically correct code; now it is whether the model can take a requirements document and produce a well-structured, runnable, and extensible project skeleton without line-by-line instructions.

    The source material records a typical experiment: a real frontend requirements document was used as input, and the model was asked to choose its own stack, with no language constraint, and generate an accessible project URL. The whole run took roughly half an hour and produced multiple pages, including a login page, a list page, and a form page. The problems this experiment exposed are common enough to be abstracted into an evaluation framework.

    To be clear, this article does not rank specific products. Instead, it abstracts the observations into a general technical question: where are the capability boundaries of large language models in document-driven, multi-page project generation, and how should engineering teams respond?

    2. Evaluation Framework: Four Dimensions of Generation Quality

    For an evaluation to be reproducible, the dimensions must be fixed first. Four layers are worth observing:

    1. Requirement coverage: how many features explicitly written in the document are actually implemented, rather than left as placeholders.
    2. Interaction completeness: whether implicit logic such as filtering, inter-field dependencies, validation, and state feedback forms a closed loop.
    3. Engineering usability: whether the directory structure, component decomposition, and styling approach support secondary development.
    4. Delivery efficiency: time from submission to previewable output, plus the cost of retrying after failures.

    An illustrative evaluation record can be written as:

    1. {
    2. "page": "list",
    3. "requirements_total": 12,
    4. "implemented": 7,
    5. "missing": ["multi_filter", "sort_state", "empty_state"],
    6. "runnable": true,
    7. "ui_score": 3,
    8. "notes": "structure is correct, filtering is entirely missing"
    9. }

    Once subjective impressions become structured data, comparisons across models and across versions start to mean something.

    3. Scenario Observations: Capability Degrades as Logic Density Rises

    3.1 Login Page: A Highly Standardized Pattern, Close to Usable

    The login page is one of the most standardized interface forms in the industry. Carousels, forms, remember-me state, and error messages all have mature patterns. In practice, the model reproduced this kind of page with high fidelity: features were complete with no obvious gaps, and usually only minor style and copy adjustments were needed before integration testing. The reason is that this kind of page appears with extremely high frequency in training data, so the model is effectively doing high-confidence pattern matching.

    3.2 List Page: Comprehension Starts to Slow Down

    The problems concentrated on the list page. Multi-condition filtering and the associated interactions, both explicitly stated in the document, were not implemented, and several list pages behaved the same way—which indicates a systematic weakness rather than random variance. The page skeleton was correct, but the functional semantics were lost.

    An engineering explanation: the complexity of a list page lies not in the visuals but in the state space. Pagination, sorting, filtering, empty state, loading state, and error state are coupled and require the model to maintain an implicit state machine. When requirements are described in scattered natural language, the model tends to keep the structure that “looks like a list” and drop the logical constraints that are hard to express directly on screen.

    3.3 Form Page: Field Relationships and Validation Logic Are Under-Reproduced

    The form page was runnable overall, but field dependencies, validation rules, and submit feedback deviated from the document. A form is essentially a constraint system: field dependencies, required conditions, format rules, and when errors are shown together define its behavior. Without an explicit data structure declaration, the model tends to generate a “stack of fields” rather than a “network of constraints.”

    One actionable improvement is to move part of the natural-language requirement forward into a structured contract, for example:

    1. interface FieldSpec {
    2. key: string;
    3. required: boolean | ((v: Record<string, unknown>) => boolean);
    4. validate?: (v: unknown) => string | null;
    5. visibleWhen?: (v: Record<string, unknown>) => boolean;
    6. }

    Once conditions such as required and visibleWhen are made explicit, the consistency of the generated result improves noticeably. This suggests that the more reliable approach at this stage is “structured requirements plus model generation,” not “a single natural-language prompt delivered end to end.”

    4. UI Style: Engineering Usability Over Visual Polish

    The visual quality of the generated output sits roughly between “better than a hand-drawn prototype” and “weaker than a mature component library template.” The style leans engineering-oriented and lacks design hierarchy and brand feel. This matches the general behavior of current models: layout sanity and spacing consistency are adequate, but design-system consistency, color semantics, and responsive details remain weak.

    The engineering recommendation is a clear division of labor: let the model handle structure, data flow, and boilerplate, and leave the visual layer to a mature styling approach and design token management, instead of piling aesthetic descriptions into the prompt.

    5. Efficiency and Stability: The Underestimated Delivery Cost

    Generation took on the order of half an hour, and queuing or rate limiting occurred during peak hours. When evaluating generative tools, queue wait time, failed retries, and context length limits must be counted into the total cost. If a single generation requires several rounds of rework, the nominal speed advantage is cancelled out.

    A more pragmatic workflow is therefore to have the model produce a runnable skeleton with interface placeholders first, then have developers fill in the complex interactions; versioning the requirements document also helps determine whether the root cause is requirement ambiguity or model misunderstanding.

    6. What Open Weights Actually Mean

    When a class of model capability approaches the state of the art, open weights deliver value in four main ways:

    • Private deployment: sensitive business data stays within your own boundary, satisfying compliance and audit requirements.
    • Fine-tuning and distillation: continued training on your own codebase and component conventions noticeably improves style consistency and adherence to internal conventions.
    • Cost control: scheduling on your own compute according to business fluctuation avoids the uncertainty of peak-hour queuing.
    • Reproducibility and auditability: fixed versions behave stably, which makes regression testing and root-cause analysis easier.

    For cloud deployment, a common pattern is to combine the model service with general capabilities such as container platforms, object storage, logging, and monitoring and alerting, forming a closed-loop pipeline of “generate—preview—evaluate—release” and bringing model output into CI for automated checks.

    7. Practical Recommendations

    1. Structure the requirements document: describe the page list, field contracts, and state definitions separately.
    2. Generate in small steps: generate page by page or module by module to reduce per-run context pressure.
    3. Put automated checks first: type checking, static scanning, and unit tests as the admission gate for generated output.
    4. Build an internal evaluation set: fix 10–20 real requirements and quantify coverage and rework rate.
    5. Keep the human–machine split clear: the model handles the skeleton and boilerplate; humans handle complex interactions and experience details.

    8. Conclusion

    In document-driven multi-page generation, current mainstream large language models can reliably deliver a runnable skeleton, and standardized pages such as login are close to usable. But in areas with high logic density and weak visual expression—filter dependencies, field constraints, and validation logic—systematic gaps remain. Whether this capability is mature does not depend on demo quality but on whether requirement coverage and rework cost are under control. Open and open-weight models embed this capability into enterprise development workflows through three paths—private deployment, fine-tuning, and auditability—and that is the most practical meaning they hold for AI engineering.