Generating Frontend Pages with LLMs: Real-World Shortcomings in Login, List, and Form Pages

    This article documents a hands-on test of using a large language model to generate three typical frontend pages—login, list, and form—for a mid-sized project. It examines where the model performed well, why filter conditions and validation rules were frequently missed, how the generated UI compares in quality, and offers a three-step prompt strategy plus an acceptance checklist for developers using these tools in practice.

    This article records observations from a test on a single mid-sized frontend project, covering three typical page types: login, list, and form. The model names and versions used in the original test, the number of pages in the requirements document, generation counts, and timing methodology are not itemized here. Therefore, the conclusions only describe phenomena observed in this sample and cannot be generalized to all scenarios.

    Can the Model Complete the Full Generation Process?

    In this test, starting from a requirements document, the model produced a complete project including the directory structure, dependency declarations, and routing configuration. The project was accessible through a browser, which is genuinely useful for rapid prototype validation. Note, however, that “accessible” only means the project can start—it does not mean authentication, error handling, or compatibility are complete. Early in the test, we also encountered queuing and compute-limit notifications, and overall generation took a long time. Teams that plan to generate pages frequently should factor generation time into their schedules. The generated static assets can be hosted on a cloud-native container platform or object storage, depending on the team’s existing infrastructure.

    Why Was the Login Page Generated Well?

    The login page has relatively simple logic, mainly involving form structure and visual elements. The model essentially completed the form and carousel display required by the document, and the page was functionally complete. Mapping static structure and basic components proved fairly reliable, and after human review the generated code can serve as a starting point for further work. That said, the code still needs password rules, error messages, and a retry strategy for failed logins before it is production-ready.

    Why Were Filter Conditions Missing on the List Page?

    The list page showed the most obvious problems in this test. The requirements document clearly specified multi-dimensional filter conditions and their interdependencies, yet the generated result did not implement the filters. The page skeleton was correct, but the filter state was never connected to backend query parameters or frontend state. The cause is not confirmed. One possibility is that with a long document, the model’s attention to later instructions degrades; another is that the association between filtering logic and the list data structure is too scattered. To verify which explanation holds, one would need to test the same document in two forms—split into single-page requirements and kept whole—and compare filter implementation rates.

    Why Are Form Validation Rules Hard to Reproduce?

    Problems on the form page centered on field dependencies and validation. For example, when field A takes a certain value, field B becomes required and must pass a specific regex check. Most of the generated results only implemented flat required-field validation without building conditional branches. Asynchronous validation—such as checking whether a username already exists—was also not implemented as documented. This shows the model still falls short when converting natural-language business rules into state logic. Developers should list each validation rule separately in the prompt and ask the model to generate corresponding test cases for each rule.

    Can the UI Style Meet Product Requirements?

    The generated interface leans toward stable and generic: conservative layout, no obvious flaws in color or spacing, but low visual distinctiveness. Compared with mature component libraries or atomic CSS approaches, the output is weaker in design detail. From an engineering perspective, this style is easy to maintain and reduces style conflicts. If the product has visual requirements, the better approach is to bring in a design system directly and let the model handle only the business structure.

    Where Is the Gap Compared with Top-Tier Tools?

    This article did not run controlled comparisons with other tools, so no quantitative cross-tool conclusions can be drawn. The gap may lie in instruction alignment and long-context handling, but these are only hypotheses. To verify them, one would need to fix the model version, prompt content, hardware environment, and timing methodology, run multiple generations on the same requirements document, and record the implementation rate of key rules. Long-context performance also depends on document length, truncation strategy, and whether retrieval augmentation is used—each of which should be measured separately.

    How Should Developers Use These Tools?

    A three-step prompt template is recommended. First, split long documents by page or component and generate only one page at a time. Second, explicitly list filter conditions, field dependencies, and validation rules in the prompt. Third, provide acceptance criteria, such as “when a filter option changes, the list request parameters update correctly.” After generation, check each item against the acceptance criteria rather than merely confirming that the page loads.

    Acceptance checklist:

    1. All filter conditions, fields, and validation rules from the requirements document are implemented.
    2. Asynchronous validation and conditional branches in forms can be triggered through manual testing.
    3. API requests carry authentication information, and error states have clear user-facing messages.
    4. Pages display correctly in target browsers and screen sizes.
    5. The code has passed human review, with no hardcoded keys or API endpoints.

    Improvement Directions for Open-Source Models

    Open-source model iteration depends on real feedback. It is recommended to organize every missed filter and missing validation into structured samples, recording the original requirement text, the model output, and the human verdict. These samples can be used for fine-tuning experiments and for evaluating different versions of the same model. Experiment reports should clearly state the model version, training data volume, evaluation metrics, and reproduction steps so that other developers can verify the conclusions.

    Conclusion

    Current large language models can already save time on basic page scaffolding, but complex filtering and form validation still require human oversight. For now, the safer approach is to break requirements apart, write rules explicitly, and define acceptance criteria upfront.