Building an E-commerce Site from Scratch: A Hands-On Evaluation and Selection Guide for AI Coding Tools
AI-assisted coding has moved from snippet completion to project-level generation, yet getting individual functions right is still far from a deliverable project. This article uses a concrete benchmark—building a 10-page e-commerce site from zero—to evaluate three common categories of AI coding tools: integrated AI coding assistants, next-generation native AI editors, and multi-agent collaborative development platforms. It provides a reusable task-description template that turns implicit constraints into explicit specifications, profiles the typical strengths and weaknesses of each category, and proposes a five-dimensional scoring model alongside a four-layer acceptance system for consistent, repeatable comparison. It also covers context-management practices and scenario-based selection advice, arguing that a project convention document, machine-executable acceptance scripts, and a set of real-business benchmark tasks are the most durable assets for putting AI coding into production.
1. Why “From Scratch” Is the Most Convincing Benchmark
Evaluation of AI-assisted coding has moved from snippet completion to project-level generation. Function-level completion tests how well a model knows syntax, but getting individual functions right is still a long way from a shippable project. The challenge of project-level generation is not whether a model “can write code” but whether it “can stay consistent”: ten pages must share the same navigation and visual system, login state must carry across every page in the user center, and product data must be reusable across both the home listing and the detail page while staying consistent throughout the checkout flow. A single change ripples across the whole project, so local correctness does not guarantee overall correctness.
For this reason, “building a 10-page e-commerce site from zero” is a representative benchmark task:
- Moderate requirement scale: home + product listing, product detail, checkout, payment success, login, register, user center overview, orders, wallet/coupons, and settings—ten pages covering three typical scenarios: display, transaction, and account.
- Broad technical coverage: routing, shared state, form validation, data modeling, responsive layout, and error/empty-state handling are all in play.
- Objective acceptance criteria: whether it builds, whether pages are directly reachable, whether the main shopping flow completes, and whether the console reports errors can all be judged mechanically.
Using this task as a reference, this article discusses three common tool categories: (1) integrated AI coding assistants, agents embedded in a general-purpose IDE; (2) next-generation native AI editors, which carry forward an “autopilot”-style interaction in the editing experience; and (3) multi-agent collaborative development platforms, which split requirement understanding, architecture planning, and code implementation across different agents. Note that the same category of tool can behave very differently across versions, models, and task descriptions. The observations below are summarized from comparable public hands-on tests and represent only typical tendencies; they cannot replace your organization’s own benchmark evaluation.
2. The Universal Task Prompt: Turning Implicit Constraints into Explicit Specs
Some of the problems seen in hands-on testing come from the tool’s capability limits, while others come from a task description that leaves too much blank. A prompt like “build a shopping site with [some front-end framework]” specifies neither technical constraints nor acceptance criteria, so the tool can only guess, and output variance is naturally large. Below is a task-description template you can use directly:
[Role] You are a senior front-end architect.[Goal] Build a shopping site with 10 pages using a mainstream front-end framework.[Page list]1. Home / product listing (category filtering, sorting, pagination or infinite scroll)2. Product detail (images and text, variant selection, inventory, review summary)3. Checkout (address, payment method, coupons)4. Payment success (order summary, continue-shopping entry)5. Login / 6. Register (with form validation and error messages)7. User center - overview (order, balance, and coupon quick entries)8. User center - orders (status filtering, detail view)9. User center - wallet / coupon pack (balance, coupon list and availability)10. User center - settings (profile editing, password change)[Architecture constraints]- Organize directories in features/ and shared/ layers; extract common navigation,layout, buttons, and cards into the shared layer- Model products, cart, user, and orders separately; all data is fetchedthrough a controlled data access layer- Place mock data in a separate directory; page components must not inline business data- Manage login state and cart centrally; when an unauthenticated user accessesa protected page, redirect to login and return afterward[Design constraints]- Three breakpoints: desktop / tablet / mobile; mobile-first; all pages responsive- Unified color variables and spacing scale; body text and background contrast rationo lower than 4.5:1- Use placeholder icons and images, but always keep aspect ratio and never break the layout[Non-functional requirements]- Forms: required-field validation, format validation, disable on submit, failure messages- Interaction: loading state, empty-data state, request-failure state- Accessibility: bind labels to form controls; provide alt text for images[Delivery and acceptance]- Generate the complete project in one pass; do not output snippets- Build passes, starts without errors, and all 10 pages are directly accessible- Deliver a README: how to start, directory guide, known limitations
The closer a task description gets to the acceptance criteria, the more stable the generated result. This is the step to complete before using any tool—essentially translating “requirements” into a “contract.”
3. Typical Output Profiles and Root-Cause Analysis
Across comparable hands-on tests, the three tool categories show different emphasis when asked to generate a complete, full-scale project in one pass.
3.1 Integrated AI coding assistant: high usability, shallow architecture
This category usually offers multiple entry points—chat, task-based generation, inline editing—with an interface that is friendlier to new users. In one-shot generation mode, the output commonly covers all ten pages, closes the main shopping loop, includes basic form validation, and keeps a consistent visual style, but its maturity stays at the “it runs” level:
- All images are placeholders, and the detail page has low information density;
- Desktop looks acceptable, but mobile deforms in complex layouts such as forms and modals;
- Although styles and logic are separated, the data model is simple and mock data is coupled with page logic;
- The directory layering is flat, with no reusable component layer or service layer.
Root cause: These tools prioritize task completion—filling the pages within a limited number of rounds. Their code generation leans toward local correctness and lacks long-term planning for the overall architecture, so changes become costly during later iteration.
3.2 Native AI editor: great interaction, weak engineering consistency
This category inherits a fairly complete experience in editor feel, inline edits, and privacy switches, and typically follows a “plan first, then execute” task-decomposition model. A common problem in testing is that the first generation does not run directly and needs several rounds of repair before you see results; afterwards it often shows:
- Contrast problems such as white text on white buttons, making key information invisible;
- Mobile layouts that don’t adapt;
- Directory skeletons reserved for state management and the data layer, but with empty internal implementations;
- Color schemes that lack a unified system and look scattered.
Still, code organization from this category is usually fairly clean, with a clear sense of separating styles from logic, so repair costs remain relatively controllable.
Root cause: “Plan first, then execute” works well for single-file changes, but project-level tasks involve cross-file contracts. If the planning stage doesn’t fully understand the global constraints, the execution stage produces a shell that is “structurally correct but functionally absent.”
3.3 Multi-agent collaborative platform: impressive speed, consistency is the bottleneck
This category dispatches the task to different agents: an execution agent handles rapid implementation, and a planning agent handles the decomposition and design of complex tasks. The observed phenomena are also representative:
- Fast mode generates quickly, but the directory structure is messy—for example, it creates duplicate same-name directories inside subdirectories, and the project ultimately won’t start;
- Planning mode produces a project that runs but throws many errors, and even multiple repair rounds fail to converge, eventually forcing abandonment;
- When multiple agents run in parallel, the user also faces decision-making cost.
Root cause: The value of multi-agent lies in division of labor; the risk lies in “interface inconsistency.” If agents don’t share directory conventions, data contracts, and design specs, the richer the parallel output, the higher the merge cost.
It’s worth noting that these three tendencies have little to do with a tool’s “origin,” and more to do with how it decomposes tasks, manages context, and constrains output format.
4. A Reusable Five-Dimensional Scoring Model
Rather than asking “which tool is the strongest,” it’s better to establish a reproducible scoring standard. Use the same task description and the same acceptance criteria to run a horizontal comparison across candidate tools along the framework below:
| Dimension | Suggested weight | Observations |
|---|---|---|
| Task completeness | 25% | Page coverage, main-flow closure, feature completeness |
| First-pass success rate | 20% | Whether the first generation builds and starts, and how many repair rounds are needed |
| Architecture and maintainability | 20% | Directory layering, component reuse, decoupled data access, style separation |
| Experience and responsiveness quality | 15% | Responsive layout, contrast, form feedback, loading/empty/error states |
| Engineering and efficiency factors | 20% | Response latency and stability, iteration edit accuracy, context-window usage, privacy and compliance switches |
Among these, “iteration edit accuracy” deserves special attention: the real cost of project-level development often isn’t the first version but the dozens of small changes that follow—“make the product card spacing a bit larger,” “add pagination to the order list,” and so on. Scoring only at the generation stage easily overestimates a tool’s actual value.
5. From “It Runs” to “It’s Maintainable”: A Four-Layer Acceptance System
No matter how strong the generation ability, engineering guardrails are still needed as a safety net. Split acceptance into four layers, with machine judgment first and human review as a backstop:
- Static gate: dependency installation, build passing, and zero code-check errors. Most “won’t run” problems surface at this layer.
Structure gate: check whether directory conventions are followed—for example, forbid inlining mock data in business components and forbid nested same-name directories:
# Illustration: detect nested directories with the same name at the same pathfind src -type d | while read -r dir; doname=$(basename "$dir")parent=$(basename "$(dirname "$dir")")[ "$name" = "$parent" ] && echo "Possible duplicate nesting: $dir"done
Function gate: use end-to-end scripts to cover the main flow (register → login → browse → detail → checkout → payment success → view orders) and assert that key elements are visible page by page.
- Quality gate: manual review of design consistency, contrast, empty-state copy, accessibility, and risk items such as hard-coded secrets.
The value of layered acceptance is localization: a build failure points to dependencies and configuration, a structural anomaly points to missing constraints in the task description, an incomplete functional loop points to context-passing design, and visual issues point to design specs that were never explicitly provided.
6. Context Management: The Real Ceiling on Project-Level Generation
The vast majority of project-level generation failures are not “can’t write code” but “don’t know this project’s existing conventions.” There are three general practices to improve context quality:
- Provide a project spec file: use a concise spec document to fix the tech-stack version, directory conventions, naming style, and color and spacing variables, so every generation takes it as a precondition.
- Reference precisely on demand: hand the tool only the relevant files and interface definitions, not the entire repository. The more focused the context, the higher the instruction-following rate.
- Define contracts before implementation: first have the tool produce data models, the route table, and interface signatures; after human confirmation, generate the pages. Once a contract is frozen, conflicts in parallel development drop significantly.
Take the data access layer as an example—abstracting it into a unified entry lets mock data swap smoothly with a real API without touching page code:
// Illustration: unified product data access entryexport interface Product {id: string;title: string;price: number;cover: string;stock: number;}export interface ProductRepository {list(params: { category?: string; page: number; size: number }): Promise<{ items: Product[]; total: number }>;detail(id: string): Promise<Product | null>;}
7. Selection Advice: Match the Tool to the Scenario
Based on the observations above, here is scenario-based advice:
- Prioritizing fast availability, with a team focused on business delivery: favor the integrated assistant with a friendly interface and high one-shot completeness, but you must add an architecture constraint document and require it to decouple mock data from pages.
- Valuing code standards and long-term iteration: favor a native AI editor with task decomposition and inline editing, focus on evaluating its “edit accuracy,” and write design variables explicitly into the task description.
- Large task scale requiring parallel progress: you can adopt a multi-agent approach, but on the premise that your team controls the directory contract and interface contract—don’t let agents freely decide the directory structure.
- Universal baseline: any category should support a privacy mode or a controllable switch that keeps code out of training, and you should assess data-cross-border and compliance risks.
If a project already runs in a cloud environment—for example, Baidu AI Cloud—you can further connect the generated output with general cloud capabilities: host front-end static assets on object storage with CDN acceleration, deploy the API layer on a container platform, and combine logging with monitoring and alerting to form a complete observability chain. This kind of integration can significantly shorten the distance from “generated and running” to “live and operable.”
8. Conclusion: Tools Keep Evolving, but Methodology Endures
From this hands-on, comparative observation, today’s mainstream AI coding tools have generally reached the point where they can “generate a runnable, complete front-end project.” The differences mainly show up in three things: consistency maintenance, architectural depth, and iteration edit accuracy. None of these three can be solved by the model alone—they are the joint result of “task description quality + context management + acceptance system.”
For organizations and developers, what’s more worth investing in isn’t repeatedly switching tools, but accumulating three assets: a standardized project convention document, a set of machine-executable acceptance scripts, and a group of benchmark tasks covering real business. Tools will keep iterating and models will be replaced, but these three assets can be reused across tools—they are the most enduring part when AI coding truly lands in production.
