AI Coding Tools Tested: Building a React E-Commerce Frontend from Scratch
A ten-page React storefront provides a practical test of AI coding tools beyond simple demos. This article examines task completion, responsive design, data separation, and project structure, highlights where generated code performs well, and outlines a staged workflow for turning AI-generated prototypes into maintainable applications.
1. Why Use an E-Commerce Site as the Test Task?
Simple single-page applications, such as a to-do list, no longer reveal much about the differences between AI coding tools. A multi-page application with a complete business workflow is a more demanding test. It evaluates several capabilities at once:
- Context understanding: Can the tool accurately interpret a complete specification covering ten pages?
- Task decomposition: Can it break a large assignment into executable development steps rather than generate a pile of code that will not run?
- Application-wide consistency: Does it maintain a coherent approach to component reuse, routing, and state management across pages?
- Engineering discipline: Does it follow basic practices such as code organization and separation of data from presentation?
The test task was to build a shopping frontend with React, covering these ten pages:
- Home page / product listing
- Product details
- Product purchase
- Purchase confirmation
- User login
- User registration
- Account dashboard
- Account orders
- Account wallet for cards and coupons
- Account settings
The hardest part was not implementing any individual page. It was maintaining completeness and consistency across the site: carrying authentication state between pages, sharing order data across views, and keeping the UI visually coherent. These are areas where AI tools can handle one requirement while overlooking another.
2. Common Problems Observed During Testing
Across multiple rounds of testing, several recurring weaknesses emerged in complex frontend tasks. They were not limited to a particular tool; they reflected broader limitations of current LLM-driven development.
Task Completion and First-Pass Reliability Vary
Some tools provide an automatic execution mode that handles the workflow from project scaffolding to page generation. Others require developers to approve individual steps and repeatedly resolve errors.
In some runs, the initial project could start but still produced errors, requiring several repair cycles before a usable result appeared. This suggests that validation before execution remains weak: many problems surface only when the generated application runs.
Responsive Design Is Frequently Overlooked
Most generated pages either assumed a desktop browser viewport or used a narrow, mobile-style layout without proper responsive behavior. Some login and registration screens had visibly distorted layouts.
For a consumer-facing e-commerce application, this is a serious defect. It exposes a gap between the assumptions built into generated code and the requirements of a real shopping experience.
Placeholder Assets and Sparse Product Details
Almost all generated results used placeholder product images, such as gray blocks or placeholder URLs.
Product detail pages were also generally thin on information. Many included only a title and price, omitting essential e-commerce elements such as SKU selection, specifications, and customer reviews.
Mock Data Is Coupled to Component Code
One of the most prominent code-quality issues was hardcoded mock data inside components. Product lists and user information were often embedded directly in the UI implementation:
// Poor practice: data is coupled to the componentfunction ProductList() {const products = [{ id: 1, name: 'Product A', price: 99 },{ id: 2, name: 'Product B', price: 199 },];return <div>{/* Rendering logic */}</div>;}
A more maintainable approach separates data from presentation:
// Better practice: a separate data layer makes future API integration easier// src/mock/products.jsexport const products = [{ id: 1, name: 'Product A', price: 99 },{ id: 2, name: 'Product B', price: 199 },];// src/pages/ProductList.jsximport { products } from '../mock/products';function ProductList() {return <div>{/* Rendering logic */}</div>;}
Tight coupling makes code harder to read and substantially increases the work required to replace mock data with real API responses.
Confusing Project Structure and Empty Architecture
Some generated projects contained unexpected directory nesting, such as a folder containing another folder with the same name. This led directly to incorrect import paths and prevented the project from starting.
Other tools created directories such as hooks/ and context/, giving the project the appearance of a well-organized architecture. However, the files inside were empty. A convincing directory structure is not the same as an implemented architecture.
3. Where AI Coding Tools Perform Well
Despite these limitations, several capabilities have reached a practically useful level.
- Complete basic shopping flows: Mainstream tools generally produced a working sequence from browsing to product details, purchase, and payment confirmation. This indicates a useful baseline understanding of e-commerce workflows.
- Usable form validation: Login and registration forms usually included working required-field and format validation. Some tools generated particularly thorough validation logic.
- Separation of styling and logic: Most tools made an effort to separate CSS from JavaScript, whether or not they used separate files. The resulting code was reasonably readable.
- Broadly consistent visual design: With explicit styling instructions, generated pages generally maintained a consistent color palette, such as a clean design built around blue tones.
4. Practical Recommendations for Developers
Break the Work into Smaller Stages
Do not expect a single sentence to reliably generate an entire project.
Split the ten-page application into three stages:
- Project scaffolding and routing structure
- Shared components
- Page-by-page implementation
Review and accept each stage before proceeding. This approach can substantially reduce errors.
State Engineering Constraints Explicitly
Include concrete requirements in the prompt, for example:
Keep mock data in a separate
mockdirectory, use React Router for routing, use Context to manage authentication state, and make all pages responsive to mobile viewports.
Do not assume the tool will make the right architectural choices on its own. Explicit constraints improve the likelihood of a suitable result.
Review Structure and Dependencies First
Before evaluating individual features, inspect the project structure and dependency relationships.
Check for unexpected directory nesting and verify that module import paths are correct. Structural problems that go unnoticed early can become expensive to fix later.
Treat Generated Code as a Fast First Draft
AI output should be treated as a high-efficiency starting point, not delivery-ready code.
Developers still need to apply normal engineering standards to data separation, error handling, responsive behavior, and accessibility. A working demo does not remove the need for these reviews.
5. Conclusion
The AI coding tools evaluated in these tests, developed for the Chinese market, already offer practical value for generating usable prototypes quickly. Their efficiency is particularly evident in UI generation and basic business-flow implementation.
However, clear weaknesses remain in engineering discipline, mobile responsiveness, and complex data-flow management.
The most useful approach is to set realistic expectations: use AI to compress the initial build from days into hours, then direct professional judgment toward the engineering details that AI still handles unreliably. That division of work is the strongest basis for effective developer–AI collaboration today.
