How to Evaluate AI Coding Tools by Building an E-commerce Site from Scratch
A ten-page shop frontend is a better test of an AI coding assistant than a single React screen. This article explains how to split that task into business flows, what to measure beyond “it runs,” which failure modes to expect, and how to turn generated code into something a team can review and evolve.
Why “generate a shop site” is a useful evaluation task
For developers, the capability most often overestimated in an AI coding assistant is that it “looks like it can write React.” What actually decides whether a site can ship is whether information architecture stays consistent across pages, whether the main shopping path closes, whether sign-in, registration, and the account area share one user model, and whether generated code mixes styles, logic, and mock data together.
A minimally usable shopping frontend usually covers at least: product list, product detail, checkout, payment result, sign-in, registration, dashboard, orders, coupon wallet, and settings. The hard part is not a single-page UI. It is site-level consistency: navigation, theme colors, breakpoint behavior, form validation rules, placeholder assets, and error states. This kind of task exposes engineering gaps more clearly than an algorithm exercise.
Task breakdown: ten pages are not ten independent components
Map the ten pages to four business lines instead of ten separate chats.
First, the product browsing line. The list page defines card fields (title, price, stock hint, primary image). The detail page must reuse the same product model, or the list can show stock while the detail page does not. The purchase page should carry SKU, quantity, and price calculation from the detail page, not invent a new form.
Second, the transaction-result line. The success page should state the order number, amount, and next steps (back to home or to the order center). If the tool only generates static “purchase successful” copy with no link to an order model, the account area that follows will be an empty shell.
Third, the identity line. Sign-in and registration must agree on the same user fields and the same validation policy (required fields, format, password strength, and where errors appear). Many generated results validate thoroughly on registration and almost not at all on sign-in, which breaks a consistent experience.
Fourth, the account line. Dashboard, orders, wallet, and settings should share a layout (sidebar, top bar, breadcrumbs) and a single source of mock data. If the order list and wallet coupons are each hardcoded, the cost of later API changes rises sharply.
A prompt should not only say “build a shop with a given frontend framework.” Stronger constraints include: shared design tokens, mobile-first layout with desktop breakpoints, a form-validation rule table, a ban on scattering business data inside components, and an image layer that can be swapped out.
Evaluation criteria: from “it runs” to “it can be changed”
Interface polish and generation speed can be noted, but they should not be the main metrics. More informative dimensions include:
Site completeness. Are all ten pages reachable, do routes cover them, and are dead links and unimplemented buttons marked? If a first generation still throws many errors, the tool has not closed the loop on dependency install, entry files, and routing.
Visual design and adaptation. Does the theme hold across the site? Is button contrast sufficient (light text on a light background effectively hides the control)? Can lists and forms scroll and be tapped on a narrow screen? A mobile-leaning layout is acceptable, but crushed sign-in and registration screens mean layout constraints never entered the generation strategy.
Interaction correctness. Can the purchase flow be completed? Does a quantity change update the amount? Does a failed sign-in show a readable error? Complete form validation is a plus, but if detail content is thin and every hero image is a placeholder that cannot be replaced, the result favors a demo over something that can be delivered.
Code structure. Separating styles from scripts, layering components, and declaring routes in one place all beat a single-file pile. Mock data coupled inside JSX is a high-risk signal: the demo may pass, but connecting a real API means almost a rewrite. An overly thin architecture (no layout components, no API layer, no types or constants) collapses on the second round of requirements.
Stability. Across repeated runs of the same task, do route names, colors, and field names drift? Drift means a team cannot bring the output under a shared standard.
Common failure modes and engineering responses
Failure mode 1: pages appear, but the main path errors. Treat “it runs” as an acceptance condition: install dependencies, start the dev server, and confirm key routes have no fatal console errors. Fix the entry and routes before visual polish.
Failure mode 2: placeholder images and fake data are hardcoded. Agree on assets and mocks directories, and let components consume only an interface shape. Even without a backend, use one mock module instead of assembling product arrays inside views.
Failure mode 3: theme and contrast run out of control. Put a palette, type scale, and minimum contrast requirement in the prompt, and require explicit style classes for buttons, links, and disabled states instead of arbitrary inline colors.
Failure mode 4: the four account pages each draw their own shell. Generate AccountLayout first, then fill child routes. The dashboard is only a summary entry; orders, wallet, and settings reuse the same layout and the same user context.
Failure mode 5: validation policy is inconsistent. Extract validation functions or a schema. Sign-in and registration share email or phone rules; the purchase page shares quantity and address rules.
An illustrative layering (structure only, not a product API):
src/layouts/ # site shell, account shellpages/ # ten route pagescomponents/ # product card, forms, empty statesmocks/ # products, orders, couponsstyles/ # theme and breakpoints
Prompts and collaboration: one generation still needs staged acceptance
Even if a tool can keep editing files automatically, submit work in stages: information architecture and routes first, then theme and layout, then the shopping loop, and finally the account center and validation. Gate each stage on a runnable standard so one generation does not produce a huge draft that can be viewed but not changed.
Keep consistency constraints in the conversation: a new page must attach to existing navigation; a new field must be written back into the product or user model; a style fix must not introduce a second palette. For errors, provide the console stack and a reproduction path rather than a vague “optimize it again.”
How to choose and land a tool, rather than chase a new name
When choosing an AI coding tool, availability, a stable path, and privacy isolation (local or enterprise network policy) often matter more than whether the interaction resembles a well-known overseas product. For a company, also ask whether generated code is easy to review, whether product images can go into object storage, and whether logs and monitoring can connect to the existing observability stack. Those are general capability categories, not a brand story.
If a team already uses compute, storage, and observability services on Baidu AI Cloud, a practical approach is to keep the generated frontend framework-neutral, put static assets in object storage, connect APIs and the gateway to existing standards, and use logs and monitoring for real traffic and errors—rather than leaving a demo site on local mocks indefinitely.
A tool that can hand over a runnable shop in one pass has shown cross-file editing and basic UI generation. Whether it can also meet the bar on detail depth, adaptation, contrast, data decoupling, and account layout is what decides if it can enter real delivery. The point of a ten-page commerce checkup is not a noisy ranking. It is to turn “generation” into an engineering asset that can be reviewed, replaced, and evolved.
