Evaluating AI Coding Tools: Lessons from Building a 10-Page E-Commerce App
This article shares a hands-on evaluation of LLM-driven code generation tools using a medium-complexity e-commerce project with ten pages. Instead of relying on benchmark scores, it measures four observable metrics: structural quality of first-pass output, automation of bug fixing, stability during language and paradigm migration, and the total human effort required. It explains how requirement definition, layered project structure, and engineering guardrails such as type checking shape generation quality, where automation works best, and which tasks still require human judgment.
1. Background and Evaluation Goals
Over the past year or two, code generation models have improved rapidly, and the score gaps on public leaderboards have narrowed to the point where a single number can no longer distinguish top models. For developers, leaderboard scores are becoming less useful. The more meaningful question is whether a model can reliably handle the full chain from project scaffolding to bug fixing in a real, medium-sized project, and which steps still require a human.
This evaluation uses a moderately complex target: an e-commerce site with ten pages covering browsing, search, product details, cart, checkout, orders, account, and admin management. This scenario was chosen for three reasons. First, the number of pages is large enough to expose how well a model maintains structural consistency under a long context. Second, the business flow has clear state transitions and permission boundaries, which makes it easy to check the completeness of generated output. Third, frontend engineering naturally involves type systems, component reuse, and data mocking, making it possible to observe how a model self-corrects under type constraints.
The evaluation does not ask whether a single generation is perfect. Instead, it tracks four observable metrics: the structural soundness of the first output, the degree of automation in bug fixing, stability when migrating across languages or paradigms, and the total number and time share of human interventions.
2. How Requirements Are Written Sets the Upper Limit on Generation Quality
The most underestimated step in practice is the requirement input. Handing “build an e-commerce website” directly to a model usually produces pages that look fine but are business-empty. An effective approach is to explicitly declare four categories of constraints in the prompt.
Project goal: a 10-page e-commerce site covering an end-to-end purchase flowPage list: home / listing / detail / cart / checkout / order list / order detail / login / register / profilePermission rules: profile and order-related pages require a logged-in state; unauthenticated users are redirected to the login pageData strategy: use local mock data, with the data access layer decoupled from the view layerEngineering constraints: layered components, centralized type definitions, a unified styling approach
The rule “decouple the data access layer from the view layer” is especially important. When mock data is later replaced with real APIs, changes are confined to a single directory instead of requiring page logic to be rewritten. Constraints like this do not appear in a model’s default output; they must be defined by the requester in advance.
Another lesson is to write acceptance criteria into the requirements rather than adding them verbally afterward. For example, stating that “all listing pages must support empty and loading states” and “monetary fields are stored uniformly in cents” can significantly reduce later rework.
3. Assessing the Structure of the First Output
At the structural level, a high-quality single-pass output usually has the following characteristics, and the results in this evaluation covered most of them.
- Route and page separation: pages that require a logged-in state are placed in a separate user-domain directory, physically isolated from public pages, which makes the mount point for the permission middleware clear.
- Component layering: layout components (header, footer, sidebar, container) and business components (product card, price tag, quantity stepper) are stored in separate directories, preventing layout code from mixing with business logic.
- Independent type definitions: entity types, API response types, and form types are managed centrally, and pages and components obtain types by reference rather than redeclaring them.
- Independent mock data: data files and generation logic live in their own directory, leaving a clear replacement point for connecting real APIs later.
These four points look simple, but their value is that they define the safe boundary for all later automated operations. In a disorganized project, every model change may affect unrelated files. In a well-structured project, the impact of a change can be estimated accurately, so multiple iterations do not accumulate into uncontrollable technical debt.
It should be noted objectively that across the generated results, visual completeness was generally higher than business rigor. Typical gaps included missing coupon and inventory deduction rules, an incomplete order state machine, and form validation that covered only required fields rather than format and boundary values. These gaps are not model capability defects but the natural result of constraints that were not specified on the requirements side.
4. How Automated Is Multi-Round Bug Fixing
What truly distinguishes model generations is not the first output but performance during the fixing stage. The fixing workflow in this evaluation was to provide the error messages, relevant file paths, and expected behavior all at once, letting the model locate and fix issues in batches rather than answering one question at a time.
When type checking reported more than twenty errors, the fixing process was interrupted only once for external reasons; everything else was completed continuously on the tool side without manual editing. The mechanism behind this is worth explaining: type errors are strongly structured, with the error location, expected type, and actual type all given explicitly, so the model can treat them as a set of isomorphic tasks and process them in parallel. In contrast, visual misalignment or missing business logic lacks this kind of formal feedback, and the degree of fixing automation is clearly lower.
A practical conclusion follows: turning defects into “formally describable problems” is the most effective way to raise the automated fix rate. Concrete steps include configuring type checking and static analysis for the project, writing minimal reproducible failing cases, and running formatting uniformly before commits. When the feedback signal changes from “it looks wrong” to “line N expects X but got Y,” the model’s fix success rate rises significantly.
5. Stability During Language and Paradigm Migration
This evaluation included a migration from the default scripting language to a typed language. After the migration, a batch of errors appeared, coming from roughly two equal sources. One was that the tooling had not yet synchronized its index and references for the newly added type files, which is an engineering environment timing issue. The other was that the model carried over implicit type assumptions from before the migration, such as treating optional fields as required or using an API return value directly as a mutable array.
The effective order for handling these issues is environment first, code second: confirm that the type declaration files are correctly included in the compilation scope, then have the model make semantic corrections based on the real errors. If the order is reversed, the model often introduces unnecessary type assertions to bypass errors, hiding the problem rather than solving it.
From an experience standpoint, the psychological shift at this stage was clear: initially every change had to be checked one by one, then only key paths were spot-checked, and later changes could largely be accepted in batches and verified together. This trust did not come from the model’s “confident statements” but from verifiable engineering guardrails: type checking, unit tests, and the build process together formed the basis for judgment.
6. Designing the Boundary of Human Intervention
As automation increases, the human role shifts from “executor” to “constraint setter and acceptor.” In this evaluation, human intervention was limited to four scenarios, with everything else left to continuous tool execution.
- Requirements and acceptance criteria definition: including the page list, permission rules, and data boundaries.
- Architecture and directory conventions: layering approach, naming conventions, and dependency direction.
- Approval of high-risk changes: changes involving authentication, payment, and data deletion must be confirmed by a human.
- Final acceptance: with build passing, type checking passing, and key flow cases passing as the entry criteria.
The engineering guardrails should include at least four items: type checking, static analysis, formatting, and a minimal set of regression cases, and should be incorporated into pre-commit hooks or a CI pipeline whenever possible. The more complete the guardrails, the higher the proportion that can be safely automated; when guardrails are missing, the risks of automation are amplified at the same time.
7. Common Pitfalls and How to Avoid Them
- Context drift: in long sessions, the model may forget earlier conventions. The mitigation is to write key constraints into an in-project documentation file so that every operation can read them again.
- Incidental refactoring: changing unrelated files while fixing a defect. The mitigation is to state “modify only the necessary scope” in the requirements and review the change list before committing.
- Fake fixes: eliminating errors with type assertions or null fallbacks. The mitigation is to require a root-cause explanation during acceptance and keep the original failing cases.
- Structural decay: directory levels expand after multiple iterations. The mitigation is to periodically converge the structure, moving duplicate components and scattered types back into place.
8. Conclusion
Across the full ten-page e-commerce project, code generation models were already able to handle the main implementation and batch bug fixing, the directory structure of the first output was usable as-is, and automated fixing of type errors performed especially well. The capability gaps were concentrated in the completeness of business rules and problems with low formalization, which are exactly the parts that requirement definition and engineering guardrails can compensate for.
Therefore, the reasonable way to evaluate these tools is not to ask whether a single generation is perfect, but to examine whether three engineering conditions are in place: precise requirement expression, structured feedback signals, and complete guardrails. When these conditions are met, developers can focus their energy on business modeling and acceptance, leaving repetitive coding and fixing to the tools. This is the most certain path to efficiency gains at the current stage.
