Evaluating AI-Assisted React E-Commerce Site Development: An Assessment Method
This article presents a general method for evaluating React e-commerce front ends built with AI coding tools. It explains how to break requirements into a page checklist and assess completeness, visual consistency, responsive layout, form validation, data structure, code organization, and runnability. It also outlines a staged generate-and-verify workflow and a review checklist for teams. The method focuses on the generated output, not on any specific tool.
1. Background and Problem Definition
AI coding tools have progressed from single-file completion to multi-file, end-to-end project generation. Whether these tools can handle real tasks depends on whether they keep large changes consistent. E-commerce front ends are a typical case. The home page product list, product details, checkout, login and registration, and user center pages depend on one another, so a break in any one of them affects the usability of the whole site.
In practice, three common problems appear. First, each page opens correctly on its own, but the overall style, navigation, and interaction logic are inconsistent. Second, the main flow has breaks, such as being unable to return to the orders page after a successful purchase. Third, the project throws errors on its first run, and it still cannot start after several rounds of fixes.
This article does not compare specific tools. It discusses a general evaluation method. The object of evaluation is the generated result, not the interface or experience of any particular product.
2. Task Breakdown: The E-Commerce Page Checklist
Before assessing generation quality, split the requirements into a page checklist that can be verified. A complete e-commerce front end typically includes the following ten pages:
| Group | Page | Core Responsibility | Main Data Dependency |
|---|---|---|---|
| Public | Home page (product list) | Display products, filter, navigate to product details | Product list |
| Public | Product detail | Show specifications, images, price, and add to purchase | Single product |
| Transaction | Checkout | Enter shipping information and choose a payment method | Cart, address |
| Transaction | Checkout success | Show the order result and guide next steps | Order number |
| Account | Login | Validate account credentials and show error messages | User credentials |
| Account | Registration | Validate fields and show a warning for duplicate registration | User information |
| User Center | Dashboard | Summarize orders, offers, and frequently used entries | User overview |
| User Center | Orders | Show the order list and status filter | Order list |
| User Center | Wallet | Show balance and the list of cards and vouchers | Wallet and cards/vouchers |
| User Center | Settings | Edit personal profile and change password | User profile |
After breaking down the task, you can check item by item whether each page exists, whether its route is reachable, and whether its data dependencies are closed.
3. Evaluation Dimensions
3.1 Functional Completeness
Completeness means that all ten pages exist and can be reached through normal operation. Test the full main flow: browse the product list, open a product detail, add to purchase, submit an order, see the success page, and find the order on the orders page. If any step breaks, the project is incomplete.
The example below checks whether the routes are complete. The evaluator defines the path names.
const REQUIRED_ROUTES = ['/','/product/:id','/checkout','/checkout/success','/login','/register','/account/dashboard','/account/orders','/account/wallet','/account/settings',];// Read the registered route table and find the missing entriesfunction findMissingRoutes(registeredRoutes) {const registered = new Set(registeredRoutes);return REQUIRED_ROUTES.filter((route) => !registered.has(route));}// An empty array means all required routes are registeredconsole.log(findMissingRoutes(['/', '/product/:id', '/login']));
3.2 Overall Consistency
Consistency means that the visual language and interaction rules are unified across pages. Common checks include primary color, font size, spacing, button states, form styling, and navigation bar structure. The basis for judgment should be whether the project has one set of unified design variables, not a page-by-page visual comparison.
If colors and spacing are scattered across individual components, the cost of later changes rises quickly. A better approach is to define colors, font sizes, border radii, and other values as centralized design tokens. Each page then references the tokens instead of defining its own values.
3.3 Responsive Layout
During evaluation, check each page at both desktop and mobile widths. Login and registration pages are usually form-heavy, so on narrow screens they often show input overflow, wrapped buttons, and misaligned layouts. Evaluators should watch these pages closely and record how the layout behaves at each breakpoint.
3.4 Forms and Validation
Form validation should cover the following cases:
- Show a clear message when a required field is empty.
- Block malformed input, such as an invalid email address or phone number, before submission.
- Disable the submit button during submission to prevent duplicate requests.
- Display server-side errors next to the corresponding field.
If a form lacks any of these, classify its validation as incomplete.
3.5 Separating Data from Logic
Mock data written directly into page components makes it hard to connect a real backend later. A better structure centralizes data access in an independent API layer. Pages call only the interface functions.
// api/products.jsimport mockProducts from '../mocks/products.json';// Currently uses mock data. Only the implementation of this function// needs to change when a backend is connected.export async function fetchProducts() {return mockProducts;}export async function fetchProductById(id) {return mockProducts.find((item) => item.id === id) ?? null;}
Page components depend only on functions such as fetchProducts and do not care where the data comes from. When the data source changes, the page code does not need to change.
3.6 Code Structure
Structure evaluation focuses on whether the directory hierarchy is clear, whether names conflict, and whether each directory’s purpose matches its name. Pay particular attention to these cases:
- A directory nested inside a directory with the same name usually means the generation process produced a path error.
- Directories reserved for state management or reusable logic contain no files. These empty shells mislead future maintainers.
- Styles and logic are separated. The separation can use standalone files or modular styles, as long as the rules are clear.
3.7 Placeholder Content and Realism
Placeholder images and sample copy do not affect function, but they do affect delivery quality. Distinguish two kinds of content during evaluation. Temporary development placeholders must be replaced before delivery. Content that the business should provide belongs on a pending list in the project documentation.
3.8 Runnability and Repair Cost
This is the most direct metric. Record the following data:
- Whether dependency installation and startup succeed on the first attempt.
- The number and types of errors on the first run.
- The number of repair rounds needed to reach a runnable state.
- Whether each repair round introduces new errors.
If repair rounds keep increasing while the error count does not fall, the generated result has a structural problem at its base, and further patching yields little. In that case, it is more reasonable to split the task and regenerate the affected modules.
4. Closed-Loop Workflow for Generation and Verification
Large-scale generation works best in stages. Verify the output at the end of each stage rather than checking everything after the full generation. The recommended sequence is:
- Skeleton stage: Generate the directory structure, route table, and shared layout, and confirm the project starts.
- Data layer stage: Add the API functions and mock data, and confirm that data returns correctly.
- Page stage: Generate pages group by group. After each page, check its entry and exit points.
- Integration stage: Walk through the main flow end to end, and check page transitions and state passing.
- Finishing stage: Unify styles, add validation, replace placeholder content, and clean up empty directories and unused files.
During repairs, record the type of each error, such as missing dependencies, path errors, naming conflicts, styles not applied, or state not synchronized. After grouping errors, you can see whether problems concentrate in one category or spread across the project. If the same type recurs, add constraints to the generation prompt instead of fixing each case by hand.
Set a limit on repairs. For example, if the error count does not drop over three consecutive repair rounds, stop patching and regenerate a smaller scope instead.
5. Recommendations for Teams
Base tool selection on verifiable metrics: completeness check results, first-run success rate, number of repair rounds, and structural quality. Visual appearance and response speed can serve as secondary references, but they should not replace these metrics.
Generated code must go through human review. Focus on the following:
- Whether dependency versions are reasonable and whether unnecessary packages were added.
- Whether form input is validated on both the front end and the server.
- Whether keys, tokens, and other sensitive information were written into code or logs.
- Whether payment and balance logic relies on the server’s final decision rather than only the front end.
Replace placeholder images with production assets. Store the assets in object storage or a content delivery service, and reference them through a configuration file rather than hard-coding paths in components.
6. Checklist
When evaluating a generated e-commerce front end, confirm each item on this list:
- All ten pages exist and can be reached through normal operation.
- The main flow (browse, detail, purchase, success, orders) runs end to end.
- Colors, font sizes, spacing, and button states are consistent and controlled by centrally defined variables.
- All pages lay out correctly at desktop and mobile widths, and the login and registration pages do not distort.
- Forms include required-field checks, format checks, duplicate-submission prevention, and error messages.
- Data access is centralized in the API layer, and page components do not hard-code data.
- No directories are nested under the same name, no empty shell directories exist, and the responsibilities of styles and logic are clear.
- The project starts successfully on the first run, and the number of repair rounds is within an acceptable range.
- A replacement list for placeholder content exists, and no sensitive information is written into code.
