AI Coding Tools in 2026: A Hands-On Test Building a 10-Page E-Commerce Site

    This article reports a hands-on test of AI coding tools in 2026 using one unified task: building a runnable 10-page e-commerce site with React from scratch. It explains why a complete e-commerce site is a demanding benchmark, breaks the challenge into four difficulty areas, and scores tools across six dimensions. Rather than ranking specific products, it summarizes typical behaviors and shared weaknesses, analyzes their root causes, and then presents a practical methodology for making AI produce deliverable code—defining an explicit contract first, writing structured prompts, isolating the data access layer, and scripting automated self-acceptance. It closes with an acceptance checklist, a tool-selection scorecard, and guidance on taking prototypes from local development to enterprise cloud production.

    1. Challenge Background: Why Test AI Coding Tools with a Full E-Commerce Site

    By 2026, AI coding tools have evolved from simple code completion into “AI coding assistants” that can understand requirements, plan tasks, write across multiple files, and autonomously execute commands. Both the agent modes built into various IDEs and standalone autonomous coding agents can now carry a request from requirement understanding all the way to code output. This raises a natural question among developers: can these tools independently build a real, usable project?

    Generating a single function, component, or page is no longer a challenge. What truly tests a tool is completeness and consistency. This challenge uses a single, unified task—building a runnable e-commerce site from 0 to 1—because an e-commerce scenario inherently contains the following elements:

    • Many pages: covering three main lines—discovery, transactions, and accounts—for 10 pages in total;
    • Long interaction chains: browse → details → order → payment success → order history → wallet, forming a complete loop;
    • State shared across pages: login state, cart, orders, balance, and coupons flow between multiple pages;
    • Fine-grained experience requirements: form validation, empty states, error messages, and mobile adaptation are all essential;
    • Real engineering requirements: the code must run, be extensible, and be ready to connect to a real backend later.

    For these reasons, an e-commerce site is enough to test an AI coding tool’s overall capability in requirement analysis, architecture design, code generation, self-repair, and detail polishing.

    2. Task and Difficulty Design: One Task, One Prompt

    To keep the comparison fair, this challenge applies a uniform set of constraints to the tools being tested. All selected tools are AI coding tools aimed at developers, sharing the following characteristics:

    1. They provide interactive AI coding through an IDE or agent form;
    2. They support describing requirements in natural language and directly generating or modifying project code;
    3. They offer a command-line terminal or file-operation ability, so they can install dependencies, start the project, and read runtime logs themselves.

    Controlled variables: each tool receives the same prompt (originally written in Chinese) and starts from scratch in an empty directory, with no reference code or design mockups. This mirrors the real scenario a developer faces with a brand-new project.

    The unified prompt (original):

    Build a frontend shopping site with React. The shopping site needs 10 pages:

    1. Home page (product list)
    2. Product detail page
    3. Product checkout page
    4. Payment success page
    5. User login page
    6. User registration page
    7. User center - dashboard
    8. User center - orders
    9. User center - wallet (coupon wallet)
    10. User center - settings

    The prompt was intentionally kept minimal: it specifies no design style, no data structure, and no architecture. On one hand, this tests each tool’s ability to fill in specifications on its own; on the other, it also determines the root of all later differences. The difficulties can be broken down into four levels:

    Difficulty Manifestation Consequence of failure
    Completeness Whether all pages are produced, whether the transaction flow works end to end, whether there are empty-shell pages Broken user flow
    Consistency Whether colors, fonts, spacing, and component styles are unified, whether data stays in sync across pages Fragmented look, corrupted data
    Correctness Whether it passes build and startup, whether errors appear at runtime, whether form validation works Project cannot be delivered
    Maintainability Whether the directory structure is sensible, whether views, styles, and data are separated into layers High cost of later changes

    3. Evaluation Method: From “Can It Generate” to “Can It Deliver”

    To avoid the one-sided judgment that “if it runs, it’s a success,” this practice scores from six dimensions, each worth 5 points for a total of 30:

    Dimension What to observe Key criterion
    Functional completeness Whether all 10 pages are present and substantive Whether there are placeholder or blank pages
    Consistency Whether the design language is unified and cross-page state stays in sync Whether the same component behaves consistently across pages
    Runnability Whether build, startup, and key interactions throw errors Whether a first launch needs manual fixes
    Code quality Whether views/styles/data are layered, whether the directory is well organized Whether there are empty-shell or duplicate directories
    Responsiveness Whether the layout adapts to mobile, tablet, and desktop Whether text overflows or misaligns on narrow screens
    Efficiency and repair Time to generate and repair, whether autonomous repair converges Whether it reaches a usable state within a limited number of rounds

    One principle guides scoring: the initial result accounts for only a small part of the overall score; the focus is on the “final state after end-to-end completion” and the “ability of autonomous repair to converge.” After all, in real development, no project takes shape in one pass.

    4. Common Observations and Typical Problems

    To stay objective, the following does not judge any specific product as better or worse; instead, it summarizes the typical behaviors shown by different types of tools in this challenge. Note that AI coding tools iterate extremely fast, and concrete behavior changes with version, task, and prompt. The conclusions below reflect only the observations from this practice.

    4.1 Typical Behaviors

    Overall impression: friendly is not the same as usable; fast is not the same as stable

    • Friendly interaction, flow works in a single generation: One type of tool has a friendly interface and clear interaction guidance, completing all pages in a single pass. The output leans toward a mobile layout; pages like login and registration look slightly distorted on wide screens; images are all placeholders, and product details are thin.
    • Complete form validation, but many first-version issues: Another type handles form validation and detail-page information more carefully, but its first version cannot run and needs multiple repair rounds before it starts. The output has visual defects such as white text on a white button background (invisible), pages that don’t adapt, and poor color choices; generation is also slow.
    • Fast mode produces a messy structure: Some tools offer a mode aimed at quick drafts; generation is fast, but the directory structure is messy—for example, nesting a same-named subdirectory inside a directory—which ultimately makes the project fail to run.
    • Complex-task mode fails to converge on repair: Other tools offer a planning mode aimed at complex tasks; the output can run but throws many errors, and repeated repair attempts still fail to converge.

    Shared weaknesses: hollow architecture and out-of-control visuals

    • Architecture with “a skeleton but no flesh”: Directories for state management, context, etc. are reserved but actually empty; styles are separated from views but not split into their own files.
    • Out-of-control visual details: Button foreground and background are the same color, making text invisible; login and registration forms overflow on narrow screens; color schemes lack a unified standard.
    • Mock data coupled with views: Fake data for products, orders, etc. is hard-coded directly in components, so connecting a real API later requires large-scale rewriting.
    • Placeholder resources lack guidance: Images are all placeholders, with no replacement entry point left in the code.

    4.2 Causes of These Problems

    1. Insufficient specification: The minimal prompt defined no design language or data structure, so the model can only “guess” on its own, and style drift is almost inevitable.
    2. Generation happens per file/component: Tools easily achieve local correctness inside each file but struggle to guarantee global consistency—for example, each page writes its own color scheme.
    3. The visual layer lacks verifiable constraints: The white-on-white text that a human spots at a glance is imperceptible to the model during generation. Without contrast and visual regression checks, such problems can only be found manually.
    4. No feedback loop based on “run results”: Some modes don’t start the project or read errors after generating, so structural problems are carried into the output.
    5. Understanding of “completion” stops at page count: Once all pages are present, the work is considered done, and empty directories, empty files, and placeholder content are treated as “to be filled in later”—whereas real completeness should be measured by whether it passes acceptance.

    5. Methodology: How to Make AI Generate a “Deliverable” E-Commerce Site

    To address the problems above, you can directly apply the following method to improve the first-pass success rate. It applies equally to any multi-page, cross-state business site.

    5.1 Step 1: Define the Contract First, Then Let AI Write Code

    Turn the “implicit specification” into an “explicit contract,” including page routes, data models, design tokens, and interaction rules. A minimal, executable contract example is shown below:

    1. // contracts.js: defined by humans before code is generated, serving as the sole basis for AI code generation
    2. // 1. Page routes: one-to-one correspondence with the 10 pages
    3. export const routes = [
    4. { key: 'home', path: '/', auth: false },
    5. { key: 'detail', path: '/product/:id', auth: false },
    6. { key: 'checkout', path: '/checkout', auth: true },
    7. { key: 'paySuccess', path: '/pay/success/:id', auth: true },
    8. { key: 'login', path: '/login', auth: false },
    9. { key: 'register', path: '/register', auth: false },
    10. { key: 'dashboard', path: '/account', auth: true },
    11. { key: 'orders', path: '/account/orders', auth: true },
    12. { key: 'wallet', path: '/account/wallet', auth: true },
    13. { key: 'settings', path: '/account/settings', auth: true },
    14. ];
    15. // 2. Domain models: describe only fields and meanings, not tied to any framework
    16. export const models = {
    17. Product: ['id', 'title', 'subtitle', 'price', 'originalPrice', 'cover', 'images', 'stock', 'detail'],
    18. CartItem: ['productId', 'quantity', 'selected'],
    19. Coupon: ['id', 'name', 'type', 'value', 'threshold', 'expireAt'],
    20. Order: ['id', 'items', 'amount', 'discount', 'payable', 'status', 'createdAt'],
    21. User: ['id', 'nickname', 'phone', 'balance', 'coupons'],
    22. };
    23. // 3. Design tokens: the single source of truth for colors, spacing, and radius across the site
    24. export const tokens = {
    25. color: { primary: '#2B6CFF', danger: '#D93025', text: '#1F2329', textMuted: '#646A73',
    26. bg: '#FFFFFF', border: '#DEE0E3' },
    27. space: [4, 8, 16, 24, 32],
    28. radius: { sm: 4, md: 8 },
    29. };
    30. // 4. Interaction rules: amount, login, form validation, empty states
    31. export const rules = {
    32. amount: (cents) => (cents / 100).toFixed(2), // store amounts uniformly in "cents", format only when displaying
    33. guard: (routeKey, isLoggedIn) => !routes.find(r => r.key === routeKey).auth || isLoggedIn,
    34. validate: { phone: /^1\d{10}$/, password: (v) => v.length >= 8 },
    35. };

    The value of the contract is that it turns “what the 10 pages should look like” from the model’s free play into hard constraints that can be checked and automatically validated.

    5.2 Step 2: A Structured Prompt

    Building minimally on the original prompt noticeably improves generation quality and consistency. Here is a directly usable template:

    1. # Role
    2. You are a senior frontend architect whose delivery goal is "passing acceptance," not "all pages present."
    3. # Task
    4. Implement a 10-page e-commerce site based on contracts.js (see the file for routes; do not add or remove pages).
    5. # Constraints
    6. 1. Design tokens must be taken only from tokens; do not hardcode colors or spacing;
    7. 2. Every text/background color combination must have a contrast ratio of at least 4.5:1;
    8. 3. Amounts must always be stored and calculated as integers in "cents", formatted only in the presentation layer;
    9. 4. Routes under /account/* must check login state; if not logged in, redirect to the login page and return afterward;
    10. 5. Data such as products and orders must be fetched through async functions under services/; components must not reference fake data directly;
    11. 6. On desktop the maximum content width is 1200px; at 375px width there must be no horizontal scroll;
    12. 7. Every list page needs an empty state and a loading state.
    13. # Acceptance
    14. After completion, run verify.mjs and make sure all checks pass before delivering.
    15. # Forbidden
    16. Empty files, empty directories, same-name nested directories, placeholder components.

    Comparing the two practices makes it clear: the original prompt yields a prototype that “looks like e-commerce,” while the structured prompt yields an engineering product that “can be delivered.”

    5.3 Step 3: Isolate the Data Access Layer

    Consolidate mock data into a service layer, and let the view layer call only async interfaces. This way, connecting a real backend later only requires replacing the service-layer implementation:

    1. // services/catalog.js: currently a mock implementation; can be replaced wholesale with real API calls at launch
    2. const products = [
    3. { id: 'p001', title: 'Sample Product A', price: 19900, stock: 50 },
    4. ];
    5. export async function listProducts({ page = 1, size = 12 } = {}) {
    6. return { items: products.slice((page - 1) * size, page * size), total: products.length };
    7. }
    8. export async function getProduct(id) {
    9. return products.find((p) => p.id === id) ?? null;
    10. }

    The view layer depends only on signatures like listProducts and getProduct, not on the specific data source:

    1. // The component layer depends only on service layer signatures and is unaware of the data source
    2. import { listProducts } from '../services/catalog.js';
    3. export async function renderHome(container) {
    4. container.innerHTML = '<div class="product-grid" aria-busy="true">Loading…</div>';
    5. const { items } = await listProducts({ page: 1, size: 12 });
    6. container.setAttribute('aria-busy', 'false');
    7. container.innerHTML = items.length
    8. ? items.map((p) => `<article class="product-card"><h3>${p.title}</h3><p>$${p.price / 100}</p></article>`).join('')
    9. : '<p class="empty">No products yet</p>';
    10. }

    5.4 Step 4: Let AI “Accept Its Own Work”

    Write the acceptance criteria as a script and require the tool to run it before delivery and fix all errors. This forms a “generate → run → fix → re-verify” loop, which is also an important marker of a tool’s maturity:

    1. // verify.mjs: automatic acceptance before delivery; a non-zero exit code means failure
    2. import { readFileSync, readdirSync } from 'node:fs';
    3. import { routes, tokens } from './contracts.js';
    4. const errors = [];
    5. // Walk the source directories (excluding node_modules, etc.)
    6. function walk(dir, out = []) {
    7. for (const name of readdirSync(dir, { withFileTypes: true })) {
    8. if (['node_modules', '.git', 'dist'].includes(name.name)) continue;
    9. const full = `${dir}/${name.name}`;
    10. name.isDirectory() ? walk(full, out) : out.push(full);
    11. }
    12. return out;
    13. }
    14. const files = walk('.').filter((f) => /\.(jsx?|tsx?|css)$/.test(f));
    15. const sources = Object.fromEntries(files.map((f) => [f, readFileSync(f, 'utf8')]));
    16. for (const [file, code] of Object.entries(sources)) {
    17. // Check 1: whether empty files exist
    18. if (!code.trim()) errors.push(`${file}: empty file`);
    19. // Check 2: whether all colors come from design tokens
    20. const hardcoded = code.match(/#[0-9a-fA-F]{3,8}\b/g) ?? [];
    21. const allowed = new Set(Object.values(tokens.color).map((c) => c.toLowerCase()));
    22. for (const c of hardcoded) {
    23. if (!allowed.has(c.toLowerCase())) errors.push(`${file}: hardcoded color ${c}, should be taken from tokens.color`);
    24. }
    25. }
    26. // Check 3: whether /account/* routes have login protection declared in the route table
    27. const acc = routes.filter((r) => r.path.startsWith('/account'));
    28. if (acc.some((r) => r.auth !== true)) errors.push('Account-related routes must declare auth: true');
    29. // Contrast check: relative luminance and contrast formulas (WCAG 2.x)
    30. const lum = (hex) => {
    31. const c = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255)
    32. .map((v) => (v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4));
    33. return 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2];
    34. };
    35. const contrast = (a, b) => {
    36. const [l1, l2] = [lum(a), lum(b)].sort((x, y) => y - x);
    37. return (l1 + 0.05) / (l2 + 0.05);
    38. };
    39. for (const [fgName, fg] of Object.entries(tokens.color)) {
    40. for (const bgName of ['bg', 'primary']) {
    41. if (fgName === bgName) continue;
    42. const ratio = contrast(fg, tokens.color[bgName]);
    43. if (ratio < 4.5) errors.push(`Insufficient contrast: ${fgName}(${fg}) on ${bgName}(${tokens.color[bgName]}) is only ${ratio.toFixed(2)}:1`);
    44. }
    45. }
    46. if (errors.length) {
    47. console.error(errors.join('\n'));
    48. process.exit(1);
    49. }
    50. console.log(`Acceptance passed: checked ${files.length} files, ${routes.length} routes`);

    Under the contract above, #2B6CFF and #1F2329 on a white background have a contrast ratio of about 3.8:1, so the script fails them directly, suggesting a darker primary color (e.g., #1D4ED8, contrast about 6.7:1) or using the primary color only on non-text elements (like icons or borders). This moves visual accidents such as “white text on white background” forward into the automated validation stage.

    5.5 Step 5: An Engineering Checklist

    1. Contract first: Determine routes, data models, and design tokens before code;
    2. Layered decoupling: Give views, styles, services, and state each their own place;
    3. Automated acceptance: Script build checks, contrast checks, contract checks, and screenshot comparison;
    4. Real resources: Specify the source and naming rules for product images and copy at the contract stage, avoiding placeholder images.

    6. Acceptance Checklist and Tool Selection Scorecard

    6.1 E-Commerce Site Acceptance Checklist

    • All 10 pages exist and are not empty shells, with routes matching the contract one-to-one
    • The full chain browse → details → checkout → payment success → orders works end to end
    • Login/registration form validation works, with clear, readable error messages
    • Account-related pages correctly block and redirect back when not logged in
    • Amounts always display with two decimal places, with no floating-point errors
    • Lists, orders, and coupons all have empty states and loading states
    • No horizontal scroll at 375px width; desktop content is centered with a limited maximum width
    • All text has a contrast ratio of at least 4.5:1
    • No empty directories, same-name nested directories, or placeholder components
    • Build passes with no errors, and key paths have no runtime exceptions

    6.2 AI Coding Tool Selection Scorecard

    Criterion Core question Weight
    First-run usability Can the first version of a new project build and start directly 20%
    Autonomous repair ability Can it read errors and converge within a limited number of rounds 25%
    Architecture and standard compliance Does it follow the contract, is it layered and decoupled 20%
    Visual and responsive quality Are design tokens applied, does it adapt across devices 15%
    Interaction experience Are generation, execution, and diff review smooth 10%
    Observability Are logs, errors, and the execution process transparent and traceable 10%

    It is recommended that teams run a horizontal comparison with 2–3 real tasks close to their own business, score and rank by this table, rather than judging solely by a single demo.

    7. Enterprise Deployment: From Local Prototype to Cloud Production

    Prototypes generated by AI coding tools usually need enterprise-grade engineering before going live. The following areas are worth planning for in advance:

    1. Data and APIs: Isolate mock data with a service layer, then connect backend services for products, orders, payments, marketing, etc., without changing the view layer;
    2. Identity and authentication: Enterprises usually have a unified identity system already, so the generated prototype should connect to single sign-on and the permission model through an adapter, avoiding a separate account system;
    3. Static assets and distribution: Product images and static assets can be stored in object storage and accelerated through a content delivery network; traffic entry points like the payment success page and product detail page can consider edge rendering or caching optimizations;
    4. Elastic deployment: Traffic peaks sharply during promotions, so the elastic scaling capability of a container platform can absorb the peaks, with load balancing to distribute traffic;
    5. Asynchronous decoupling: Ordering, payment, and fulfillment can be decoupled asynchronously through message queues to avoid overly long synchronous chains;
    6. Observability: Connect logs and monitoring/alerting uniformly, bringing frontend exceptions, API error rates, and page-load performance under monitoring, so that problems are discoverable, diagnosable, and traceable.

    If an enterprise has already built related capabilities on cloud platforms such as Baidu AI Cloud, it can migrate the generated prototype smoothly onto that cloud infrastructure as needed, reducing duplicate work from prototype to production.

    8. Conclusions and Recommendations

    Back to the original question: in 2026, can AI coding tools independently deliver a complete e-commerce site? This practice gives the following answer:

    • They can generate, but not enough to deliver directly. Most tools produce a site that “looks like e-commerce,” but whether it reaches production readiness depends on contract clarity, the acceptance loop, and the tool’s self-repair ability;
    • The difference is not in “can it write code” but in “can it repair and stay consistent”. A friendly interface lowers the barrier to entry, but autonomous repair ability is the deciding factor for multi-page projects;
    • Prompt quality determines generation quality. Adding design tokens, data models, and acceptance criteria is the highest-ROI improvement;
    • A tool is an amplifier, not a replacement. Architecture decisions, business rules, and quality baselines should still be held by developers.

    Recommendations for different roles:

    • Individual developers: Treat AI as a pair-programming partner; own contract definition and final acceptance yourself, and focus AI’s effort on repetitive code and test cases;
    • Teams: Build unified prompt templates, contract standards, and automated acceptance pipelines, and bring AI output into existing code review and continuous integration processes;
    • Enterprises: Evaluate AI coding tools as part of the overall R&D efficiency system, while watching data security and compliance boundaries—for example, whether privacy mode is enabled and whether code will be used for model training—then decide between public cloud or private deployment.

    Tools will keep iterating, but the engineering method of “contract first, layered decoupling, automated acceptance” will not go out of date. Master this method, and no matter which kind of AI coding tool you use, you can reliably turn AI generation into real productivity.