How to Choose an AI Coding Tool: Lessons from Building an E-Commerce Site
This article examines how several AI coding tools handle a realistic, moderately complex front-end generation task: building a ten-page React shopping site. It defines five evaluation dimensions (runnability, structural soundness, business completeness, visual quality and responsiveness, and iteration cost), then analyzes four common patterns of tool behavior and their typical failure modes, including data coupling, hollow architecture, visual defects, and build errors. The article concludes with engineering practices such as front-loading constraints in prompts, splitting tasks into skeleton, page, and detail phases, and using a fixed acceptance checklist, plus scenario-based selection guidance for prototyping, mid-complexity development, complex orchestration, and team collaboration.
How to Choose an AI Coding Tool: Lessons from Building an E-Commerce Site
1. The Real Question Behind Tool Selection
When developers ask whether domestic AI coding assistants can replace the well-known options they already use, the real concern is rarely about brand substitution. It comes down to three concrete questions: Can the tool run reliably in an environment without network barriers? Can it complete a genuinely complex task in a single pass? And is the output good enough to serve as a foundation for continued development?
All three questions point to the same idea: the value of an AI coding tool lies not in demo appeal, but in delivery quality and maintainability. To examine this properly, this article designs a task with sufficient complexity, observes several mainstream intelligent coding tools side by side, and distills selection methods and usage strategies from the results. To avoid the tone of a product review, specific tools are described neutrally below, with the focus on capability dimensions and engineering practice.
2. Task Design: Why an E-Commerce Site Is a Good Test Case
The task is defined as follows: generate a front-end shopping site from scratch, covering ten pages—home (product listing), product detail, purchase page, purchase success page, login, registration, user center overview, orders, wallet (cards and coupons), and settings.
This task was chosen because it combines four types of difficulty:
- Scale and completeness: Ten pages mean routing, layout, state management, and mock data all need to be systematic rather than piled into a single file.
- Global consistency: Navigation structure, visual style, component reuse, and naming conventions must run through the entire site; otherwise ten pages become ten different styles.
- Business closure: From browsing and ordering to payment success and order lookup, the flow must form a complete chain, testing the tool’s understanding of business semantics.
- Detail correctness: Form validation, button visibility, responsive adaptation, and image placeholder handling—these “small” things determine whether the output can actually be used.
The prompt is deliberately kept simple: “Use React to build a front-end shopping site containing the ten pages listed above.” A minimal prompt is intentional—it is closer to a real developer’s starting point and better exposes the tool’s ability to fill in requirements and plan structure autonomously.
3. Evaluation Dimensions: Five Scales for AI Coding Output
Before examining specific results, the criteria should be clear. For AI-generated engineering projects, scoring is recommended across five dimensions:
- Runnability: Can the project start directly after generation, and can errors be fixed quickly?
- Structural soundness: Are directories well divided, components properly split, styles separated from logic, and extension points reserved?
- Business completeness: Are all pages present, is the flow closed, and is validation in place?
- Visual quality and responsiveness: Is the layout coherent, is responsive design usable, and are there low-level defects such as contrast issues or overflow?
- Iteration cost: How much work does later modification require, and is the code easy to locate and replace?
These five dimensions cover the full spectrum from “can it be used” to “can it be changed easily,” and they form the backbone of the analysis that follows.
4. Side-by-Side Observations: Four Typical Patterns and Failure Modes
4.1 One-Shot Generation: Fast, but Shallow Architecture
The first category of tools shows high task completion and smooth responsiveness, producing a runnable project in a single conversation. The interface style is consistent, the shopping flow is complete, basic form validation is present, and styles are loosely separated from scripts—overall at a “simple but usable” level.
Its weaknesses are equally clear: layouts lean toward mobile, with only simple adaptation for desktop, and the login and registration pages deform on wide screens; product images are all placeholders, and detail pages carry thin information; mock data is coupled directly inside component code, the project structure is flat, and there is no abstraction for a data layer or configuration layer.
The lesson here: one-shot generation does not equal engineering readiness. The gains from speed are often partly offset by subsequent data extraction and structural refactoring. This pattern suits prototype validation and rapid experimentation, not direct use as a long-term maintenance baseline.
4.2 Iterative Repair: Decent Semantic Understanding, Insufficient Stability
The second category behaves more like a mature product in interaction design, offering a step-by-step build mode. The first generated project can start, but throws runtime errors and requires several rounds of fixes before the full result is visible.
Its strength is richer business detail: form validation is more complete, and product detail pages carry more information than the previous category. Problems cluster around stability and visual quality: mobile adaptation is missing, some buttons render white text on white backgrounds and become invisible, color schemes lack a unified specification, and images remain placeholders. At the code level, styles are separated but not extracted into standalone files, and directories reserve slots for state management and context while leaving them empty—architecture in form, but hollow in substance.
Generation speed is also noticeably slow, with high waiting cost on long tasks. This points to a practical constraint: generation quality and generation time are not linearly correlated; context length and model scheduling strategy both affect the experience. In real projects, long tasks should be split into verifiable small steps first.
4.3 Multiple Coexisting Modes: Choice Cost Becomes Trial-and-Error Cost
The third category offers multiple working modes, aimed respectively at fast generation and complex task orchestration. The fast mode produces output quickly, but the project structure contains obvious errors—for example, creating a duplicate directory with the same name inside a directory—ultimately preventing the project from starting. The mode for complex tasks responds more slowly; the generated project runs but has many errors, and after several failed repair attempts it had to be abandoned.
This reveals an easily overlooked problem: the more modes available, the more judgment is demanded from the user. When a tool hands the decision of “which mode to use” to the user, the user effectively absorbs the extra trial-and-error cost. For teams, the safer approach is to calibrate each mode’s real capability boundary with minimal tasks first, then form internal usage guidelines, rather than experimenting on real projects.
4.4 Common Failure Modes
Placing these results together, four high-frequency defect categories emerge in AI-generated front-end projects:
- Data coupling: Mock data hard-coded inside components, making changes excessively broad when swapping in real APIs;
- Hollow structure: Directories reserve layering slots but contain no actual content, creating a false impression of standardization;
- Visual defects: Insufficient contrast, missing adaptation, unreplaced placeholders—quality problems that are directly perceptible;
- Build errors: Path and directory structure errors that prevent the project from starting—blocking issues with the highest priority.
Repair cost rises in that order: visual issues can be adjusted in batches, data coupling requires refactoring, hollow structure requires redesign, and build errors may invalidate existing output.
5. Engineering Recommendations: Making AI Output Truly Maintainable
5.1 Front-Load Constraints Instead of Patching Later
Engineering constraints should be stated explicitly in the prompt rather than fixed after generation. For example:
Requirements:1. Independent data layer: put all mock data in the src/mock directory, exported as JSON or modules;2. Component layering: separate page components from shared components; put shared components in src/components;3. Style specification: use a unified set of color and spacing variables; hard-coded color values are prohibited;4. Centralized routing: define all routes in src/router;5. Responsiveness: ensure usability at at least the 1280px and 375px breakpoints.
The benefit of front-loading constraints is that it turns “refactoring afterward” into “alignment during generation,” significantly reducing rework.
5.2 Task Splitting: Skeleton, Then Pages, Then Details
Generating ten pages at once is a stress test for both context and consistency. A safer flow is:
- Skeleton phase: Generate only routing, layout, navigation, and empty pages; confirm it runs;
- Page phase: Generate page by page, verifying immediately after each one;
- Detail phase: Uniformly fill in form validation, empty states, loading states, and placeholder image replacement.
This splitting compresses the controllable scope of each generation to a reviewable granularity and makes it easier to locate the source of problems.
5.3 Build an Acceptance Checklist
For AI-generated front-end projects, the following items should be checked routinely: Can the project start with a single command? Are there contrast problems such as white text on white backgrounds? Is there horizontal overflow on narrow screens? Is mock data concentrated in an independent directory? Are routes defined centrally? Are there duplicate directories with the same name? A checklist turns subjective impressions into executable standards.
6. Selection Advice: Match by Scenario, Not by Popularity
Based on the observations, selection can be layered by use case:
- Prototyping and validation: Prefer tools with strong one-shot generation and fast response; accept shallow architecture and trade speed for feedback;
- Mid-complexity business development: Prefer tools with complete business detail and solid validation logic, while reserving time for refactoring;
- Complex task orchestration: Use multi-mode tools cautiously; calibrate with small tasks first, then decide on mode selection;
- Team collaboration: Turn engineering constraints into templated prompts and acceptance checklists to reduce output variance caused by individual differences.
It is worth emphasizing that an AI coding tool is an “accelerator,” not a “replacement.” It can quickly lay out repetitive page scaffolding, form validation, and route configuration, but architecture design, data modeling, and quality control still require developer leadership. The returns are stable only when tools are placed where they are strong.
7. Conclusion
Returning to the original question: Are there domestic tools that can replace commonly used industry solutions? Based on this task, the answer is yes—domestic tools have reached a practical level in response speed, interface friendliness, and basic business completeness. But the differences are equally real: there is still a gap between one-shot generation capability and engineering maintainability, multi-mode design introduces extra choice cost, and build errors and visual defects remain high-frequency problems.
For developers, the more effective strategy is not to search for the “strongest tool” but to establish a loop of “evaluate—constrain—accept”: use small tasks to quickly assess capability boundaries, front-load constraints to reduce rework, and use acceptance checklists to hold the quality line. Tools will keep iterating, but this methodology can be reused for a long time.
