AI Coding Tools in Practice: Building a React E-Commerce Site from Scratch
Building a ten-page React e-commerce site reveals both the strengths and limitations of AI coding tools. This article examines task execution, UI completeness, responsive design, and code architecture, then outlines practical ways to improve results through precise prompts, staged development, and independent mock data layers.
As large language models become more deeply integrated into software development, AI coding tools have evolved from code completion assistants into intelligent IDEs capable of interpreting complex requirements and generating project-level code. These tools take different approaches to task execution, architectural understanding, and UI generation.
Building a React e-commerce site from scratch provides a useful test of their engineering capabilities. This article examines how AI coding tools handle a multi-page frontend project, where their output falls short, and how developers can use them more effectively.
1. Defining the Task and Evaluation Criteria
The test task was to build a React shopping frontend with ten core pages covering the main e-commerce user journey:
- Home page with product listings
- Product detail page
- Purchase page
- Purchase confirmation page
- Login page
- Registration page
- User dashboard
- User orders page
- User wallet with coupons and vouchers
- User settings page
Key Challenges and Evaluation Criteria
The central challenge was completeness and consistency across the site. Generating ten individual pages was not enough: the pages also needed a coherent visual style, consistent interaction logic, and shared state management.
The evaluation focused on three areas:
- Task execution and generation efficiency: How effectively did the available modes—such as automatic execution, build modes, or multi-agent collaboration—handle the task? Could the tool produce a usable project in a single attempt?
- UI completeness and responsive design: Were the interfaces visually coherent? Was form validation adequate? Did the pages adapt well to mobile screens?
- Code architecture and engineering quality: Was the directory structure clear? Were styles separated from application logic? Was mock data decoupled from components? Were architectural elements such as Hooks and Context actually implemented rather than merely represented by empty directories?
2. Engineering Performance of AI Coding Tools
Testing several mainstream AI coding tools revealed substantial differences in how they approached the same task.
Task Execution and Generation Efficiency
Intelligent IDEs often offer multiple execution modes. Some use a structured build mode, sometimes labeled “Craft,” that attempts to complete the entire task in one pass. In the tests, some tools supported by substantial server-side computing resources generated projects smoothly, without noticeable stalls.
Other tools were slower during build tasks, apparently constrained by model capabilities or service concurrency. The delays were significant enough to make paid acceleration seem appealing.
Some tools also offered architect modes or multi-agent collaboration for more complex work. These modes did not necessarily produce better results. Architect-mode responses were often slow, and the resulting projects sometimes contained errors that remained unresolved after repeated repair attempts.
Fast generation modes offered shorter turnaround times, but their speed could come at the expense of a sound project structure.
UI Quality and Responsive Design Gaps
The generated interfaces generally prioritized functionality over visual quality. Tools could often connect the shopping flow and provide basic form validation, but the pages tended to be simple. Product detail pages contained limited information, and images were commonly placeholders.
Responsive design exposed more serious weaknesses. One tool produced a mobile-oriented layout with basic adaptation, yet its login and registration pages became visibly distorted.
Another generated buttons with white text on white backgrounds, making their labels unreadable. Its color choices were weak, and its mobile interface lacked responsive behavior. Correcting these issues would require substantial follow-up UI work.
These results show why a working navigation flow should not be treated as evidence that the interface is ready for use.
Code Architecture and Engineering Quality
Code quality is a critical measure of whether AI coding tools can provide lasting value to engineering teams. The tests exposed three recurring problems:
- Tightly coupled mock data: Some tools hardcoded mock data directly inside business components instead of separating it into a data layer. This undermined the separation between data access and presentation.
- Disorganized directory structures: In one fast-generation result, the project structure was highly confusing, including folders nested inside other folders with the same name. The resulting project could not start.
- Architecture in name only: Some projects separated styles reasonably well and included apparently conventional
hooksandcontextdirectories. However, those directories were empty. This gave the appearance of a structured architecture without providing the implementations needed to support it, adding complexity rather than value.
3. Best Practices for Working with Intelligent IDEs
The problems observed in these tests suggest that complex projects need a more deliberate collaboration strategy between developers and AI tools.
1. Write Precise Prompts
Avoid giving only a broad request to “build an e-commerce site.” Specify the expected technical choices and structural requirements, including:
- The framework version, such as React 18
- A UI library or styling approach, such as Ant Design or Tailwind CSS
- A state management solution, such as Zustand or Redux Toolkit
- Directory structure conventions
Explicit requirements give the tool clearer boundaries and make the generated project easier to review against the intended design.
2. Generate and Review the Project in Stages
Rather than asking the AI to generate all ten pages at once, divide the work into stages:
- Set up the foundational architecture.
- Extract shared components.
- Develop the core pages.
- Integrate state management.
Perform a human review and merge the work after each stage. This makes it easier to identify structural problems before they spread through the project.
3. Require Independent Mock Data
State explicitly in the prompt that mock data must live in a separate mock or api directory and be accessed through a service layer.
This requirement helps prevent data from being embedded directly in view components and establishes a clearer separation between the data layer and the UI.
4. Conclusion
AI coding tools can provide a strong starting point for complex frontend work, including building an e-commerce site from scratch. They can quickly produce runnable prototypes, but the results remain uneven.
Responsive design, architectural discipline, data decoupling, and reliability on complex tasks are still notable weaknesses. Faster generation does not necessarily mean better engineering, and sophisticated execution modes do not guarantee a usable project.
Developers should treat these tools as an efficient foundation for code generation rather than rely on one-click completion. Precise prompts, staged development, and rigorous human engineering review are essential to turning generated prototypes into maintainable projects and achieving meaningful productivity gains.
