Building Frontend Projects with Open-Source LLMs: Capabilities, Limitations, and Practical Advice

    This article examines how open-source large language models perform on a real-world frontend development task, covering project scaffolding, common pages, list filtering, form logic, and UI quality. It shares observed patterns, a reproducible testing method, and a pre-launch checklist for teams evaluating whether open-source models fit their workflow.

    This article is based on a real frontend requirement and observes how open-source LLMs behave during page generation. The original test did not fully record model versions, deployment methods, concurrency levels, or timing data. Therefore, this article does not provide a definitive performance ranking. It only describes observed phenomena and offers a reproducible testing methodology.

    1. Define the Testing Method First

    Comparing models fairly requires consistent conditions. Fix the following variables: the original requirements document, the prompt template, the model name and version, the runtime environment (self-hosted or API-based, GPU model or provider), and the level of concurrency. Evaluation criteria can be divided into three tiers: whether the output runs, whether the functionality is complete, and whether the details match the requirements. Run each sample at least three times, and record the first-pass rate, the number of manual fixes, and total time spent. Only with complete data can you judge whether one model is better than another.

    2. Engineering Experience: What Models Can Do and When They Slow Down

    In testing, the main issues with open-source models appeared on the service side. Under high concurrency, requests may queue up or return resource-limitation messages. These phenomena relate to inference resource scheduling, but the root cause depends on the deployment approach. In self-hosted setups, GPU memory, batch size, and quantization method all affect response speed. When using third-party APIs, rate-limiting policies and provider load matter more. Queueing issues should therefore be documented separately per deployment method, rather than attributed broadly to the model itself.

    Once compute resources are available, the model can generate a project structure, dependency declarations, and a previewable page from natural language descriptions. This shows it can handle directory organization and basic engineering configuration. However, whether the generated project runs directly depends on dependency version compatibility and whether script commands are correct. After receiving the output, run installation and build first, then inspect the UI.

    3. Basic Pages: Component Assembly Is Relatively Stable

    High-frequency pages such as login screens, form inputs, and carousels are where models perform most reliably. These requirements appear frequently in public code, so models can quickly assemble page skeletons and styles through pattern matching. For such tasks, the generated code usually runs within the range of common examples.

    Running is only the first step—production readiness requires more. Before launch, verify the following: responsive layout works across screen widths; major browsers are supported; form elements have associated labels and are fully keyboard operable; images and buttons have alternative text; dependencies have no known vulnerabilities. Models often skip these items on their own, so manual review is required.

    4. List Pages: Why Filter States Often Produce Empty Shells

    Complex list pages were where the most problems appeared in this observation. Requirements documents usually specify multiple filter conditions—category, status, and date range—and require them to trigger combined queries. Pages generated by models often include filter controls, but the control values are never wired into the data requests. The result is a page that looks complete, yet the list never changes when filters are clicked.

    The root cause lies in state flow. Models easily capture visual elements like tables and cards, but handle implicit relationships—such as “re-fetch data when filter values change”—much less reliably. The following example shows complete state-to-request wiring and can serve as a review baseline:

    1. import { useEffect, useState } from 'react';
    2. import { fetchFilteredData } from './api/list';
    3. export default function ProductList() {
    4. const [filterState, setFilterState] = useState({
    5. category: 'all',
    6. status: 'active',
    7. dateRange: [],
    8. });
    9. const [listData, setListData] = useState([]);
    10. const [loading, setLoading] = useState(false);
    11. const [error, setError] = useState(null);
    12. useEffect(() => {
    13. let cancelled = false;
    14. setLoading(true);
    15. setError(null);
    16. fetchFilteredData(filterState)
    17. .then((res) => {
    18. if (!cancelled) setListData(res);
    19. })
    20. .catch((err) => {
    21. if (!cancelled) setError(err);
    22. })
    23. .finally(() => {
    24. if (!cancelled) setLoading(false);
    25. });
    26. return () => {
    27. cancelled = true;
    28. };
    29. }, [filterState]);
    30. // Rendering omitted: filter controls update state via setFilterState
    31. }

    Here, fetchFilteredData must be implemented by the project itself; it should accept the filter object and return a list array. The cancelled flag prevents stale responses from overwriting newer ones—a common race condition when filters are switched rapidly. When reviewing model output, check in sequence: do the controls update state, does a state change trigger a request, is there feedback on failure, and is there a loading indicator.

    5. Form Pages: Field Dependencies Are the Easiest Part to Miss

    Form pages test contextual dependency handling. Complex forms typically include asynchronous validation (e.g., username uniqueness checks), regex constraints (e.g., phone number format), and field dependencies (e.g., selecting one option disables and clears another field).

    In testing, models generally implemented required-field validation, but reproduced dependency rules inconsistently. One likely reason: these rules are scattered across different sections of the requirements document, requiring cross-paragraph reasoning, and details in long contexts are more easily overlooked. The countermeasure is to break rules into a checklist where each rule maps to one verifiable action, such as “after selecting A, field B is disabled and emptied.” Verifying item by item exposes far more problems than reviewing the form as a whole.

    6. UI Style: The Gap Between Usable Code and Visual Quality

    Interfaces generated by models are typically well-structured and organized, but visual hierarchy and spacing rhythm tend to be mediocre. Code generation models are primarily optimized for syntactic correctness and functional implementation, with few constraints on design quality. If your team needs more refined visuals, use a mature component library or CSS framework directly and let the model focus on business logic and component composition.

    If you want the model to extract styles from design mockups, multimodal capabilities are required. A more practical approach today is to provide design tokens—a variable table for colors, font sizes, and spacing—and instruct the model to reference those variables rather than guess values visually.

    7. Open-Source vs. Closed-Source Models: How to Compare Meaningfully

    The original assessment suggested that closed-source models are superior in response speed and comprehension depth. That direction may hold, but the test described here lacked timing data, sample size, and evaluation criteria, so it remains an observation rather than a conclusion.

    A more reliable comparison should satisfy three conditions: the same requirement, the same prompt, and the same runtime environment. Record results in a table: model and version, task type, average time, first-pass rate, number of manual fixes, and suitable scenarios. Only with enough samples can conclusions generalize to specific tasks.

    8. The Value and Boundaries of Open-Source Models

    Open-source models deliver value in three main ways. First, academic teams and small-to-medium businesses can use capable base models at low cost, reducing dependence on a single vendor. Second, teams can fine-tune models with their internal component library conventions and historical business code, making the model more familiar with their project structure. Third, public model weights and evaluation methods make it easier for the community to discover issues, discuss fixes, and conduct security reviews.

    These benefits presuppose that the team has the necessary capability. Fine-tuning requires high-quality data and evaluation sets; self-hosting requires operational investment. If a team lacks these conditions, calling a mature hosted service may be more economical.

    9. Pre-Launch Checklist

    1. Dependency audit: run the package manager’s vulnerability scan and verify each dependency’s license.
    2. Sensitive information: confirm no hardcoded keys, API endpoints, or internal domain names appear in the generated code.
    3. Input security: wherever user input is involved, check for escaping and length limits.
    4. Accessibility: check semantic markup, keyboard operation, and color contrast.
    5. Business regression: verify against the requirements list item by item, and record failures.

    Conclusion

    Based on the observations in this article, open-source LLMs handle page skeletons and basic components reasonably well, but list filtering logic, form field rules, and visual details still require substantial manual review. Whether a task should be delegated to a model depends on its complexity, the team’s verification capability, and data security requirements. Open-source models offer more choices and customization room—but using them well still demands a clear testing methodology and a complete review process.