AI Coding Tools in Practice: Delivering a Full-Stack E-Commerce Site

    This article examines how to deliver a complete, well-structured, and maintainable full-stack site when AI coding tools are part of the workflow. Using a ten-page e-commerce project as a reference, it covers experiment design with upfront acceptance criteria, how higher autonomy shifts the need to explicit constraints, defect convergence speed as the real quality metric, directory layering that lowers collaboration cost, key-flow testing, root-cause attribution, and the engineering gates required before generated code can be merged to main. The core takeaway is that output quality is a product of model capability, tool orchestration, context supply, and engineering constraints—not the model alone.

    1. Background: Why Validate AI Coding Tools on a Real Project

    Once the collaboration model of “describe requirements in natural language, let the model generate runnable code” became widespread, the question developers care about most shifted from “can it generate” to “can what it generates be merged into main.” A demo video that generates ten pages in one shot looks impressive, but it cannot answer the engineering questions that matter: are the types self-consistent, is the structure maintainable, do defects converge, and can requirement changes be absorbed at low cost.

    So this article does not review any specific product. Instead, it abstracts the topic into a general technical question: with AI coding tools participating, how do you deliver a full-stack site with a complete workflow, a disciplined structure, and long-term maintainability? The reference material is a hands-on exercise targeting an online store: a ten-page site covering product browsing, detail pages, cart, checkout and order placement, order status, and a user account area, spanning multiple layers including frontend pages, components, type definitions, and mock data.

    One judgment needs to be stated upfront: generation quality is the product of “model capability + tool orchestration + context supply + engineering constraints,” not a function of the model alone. Attributing the problem to any single party usually points optimization in the wrong direction.

    2. Experiment Design: Turning “Feels Good” into Something Measurable

    Subjective impressions cannot support conclusions, so the first step is to define acceptance criteria before generation starts. Four categories of metrics are worth fixing in advance:

    • Functional completeness: whether key flows close end to end, especially multi-step flows like order placement, where one broken step makes the whole thing unusable.
    • Structural soundness: whether the directory layering expresses business boundaries, and whether permission-related pages are separated from public ones.
    • Types and static checks: whether type definitions are centralized and actually used, and whether static analysis reports zero errors.
    • Fixability: whether defects converge within a small number of interaction rounds once pointed out, rather than repeatedly introducing new problems.

    The division of labor also needs to be clear: hand “repetitive work with explicit acceptance criteria” to the tool, and keep “boundary judgment and trade-offs” with the human. A practice that works well is giving the tool more autonomy in “build / autonomous execution” modes, used to lay out the skeleton and pages in one pass; while for data models, permission policies, and state management choices, the human states the constraints first and lets the tool fill in the implementation.

    3. Generation Phase: The More Autonomy, the More Explicit the Constraints

    The advantage of high-autonomy mode is speed: one pass yields a runnable skeleton. The cost is that it makes default decisions in places you are not watching. The two most typical deviations in the reference exercise were:

    1. Missing “last mile” on styling: the main layout and interactions are present, but low-attention areas like the footer tend to have missing styles or leftover placeholders. This does not affect a demo, but it directly affects delivery quality.
    2. Drift in language and type strategy: generation defaults to a scripting language, and switching to a statically typed language midway exposes a large number of implicit types, arbitrary types, and missing null handling.

    The two problems have different causes and should be handled differently. The former is best caught by a “visual acceptance checklist”; the latter must be caught by engineering gates. An example of how to write the constraints:

    1. Technical constraints:
    2. - Language: statically typed language, implicit arbitrary types forbidden
    3. - Layout: four separated layers: pages / components / types / mocks
    4. - Access: pages requiring login physically isolated from public pages
    5. - Data: local mock data initially, interfaces funneled through an adapter layer
    6. Acceptance constraints:
    7. - Zero static analysis errors; build blocks on any warning
    8. - Every page must contain a header, a content area, and a footer

    Writing constraints as checkable items rather than adjectives is the most effective way to raise the one-pass success rate.

    4. Defect Fixing: The Metric That Matters Is Convergence Speed

    Flaws from the generation phase are not the real problem; a diverging fix process is. Three metrics are more appropriate for assessing tool collaboration quality: single-round fix hit rate, average number of fix rounds, and whether regressions are introduced.

    In the reference exercise, more than twenty type errors pointed out in one batch were fixed almost entirely within a single round, with human intervention used only once to adjust direction rather than to write code. The engineering implication is that the tool can already batch-fix issues when “error messages are sufficient and the scope is clear.” To reproduce that experience, two preconditions apply:

    • Error messages must be complete: paste the compiler or static analysis output instead of describing “something is wrong here.”
    • Advance one dimension at a time: fix types first, then styles, then interactions, so multiple classes of change do not mask each other.

    A schematic structure for a fix instruction:

    1. 1. Symptom: running the type check reports N errors
    2. 2. Evidence: <paste the complete error output>
    3. 3. Expected: do not change business behavior, only eliminate the type errors
    4. 4. Forbidden: adding new dependencies, loosening check rules, using non-null assertions to bypass in bulk

    Item 4 is especially critical. Without such limits, the tool may “make the errors disappear” by disabling checks or overusing assertions—a fix in the short term, technical debt in the long run.

    5. Structure Governance: Good Initial Layering Keeps Collaboration Costs Falling

    If a directory structure produced by the tool with no human intervention already expresses business boundaries, subsequent maintenance costs drop significantly. Four layering practices from the reference exercise are worth reusing:

    • Split the page directory by permission attribute, keeping login-required and login-free pages from mixing, so route guards can be mounted uniformly;
    • Separate layout skeletons from business components in the components directory, so layout is not polluted by business logic;
    • Keep type definitions in their own layer, so data contracts can be referenced by the frontend, the API adapter layer, and tests alike;
    • Keep mock data in its own layer, leaving a single change point for later replacement with real APIs.

    The corresponding minimal structure:

    1. src/
    2. pages/
    3. public/ # home, product list, detail
    4. user/ # account area, orders (login required)
    5. components/
    6. layout/ # header, footer, container
    7. business/ # product card, cart item
    8. types/ # domain models and interface contracts
    9. mocks/ # mock data and adapter layer

    The direct benefit of a sound structure is “localized change”: switching data sources touches only the adapter layer, adding permissions touches only routing and page ownership, and changing visuals touches only layout components.

    6. Experience Verification: Treat Key Flows as Test Cases

    Page count is not completeness; closed loops are. At minimum, cover the following scenarios and record the result for each:

    • The full path from browsing to order placement: list filtering, detail, add to cart, quantity change, checkout, order creation, status query;
    • Information presentation in the account area: order aggregation, status labels, empty states, and error states;
    • Boundary inputs: checking out with an empty cart, extremely long text, missing images, quantity at extreme values;
    • Responsive behavior: layout collapse and horizontal scrolling on desktop and narrow screens.

    Among these, “empty states and error states” are the most likely to be overlooked in generated output, and they are exactly where production complaints concentrate.

    7. Common Pitfalls and Attribution Methods

    Two extreme attributions show up in practice: crediting everything to the model, or blaming everything on the tool. A more reliable approach is to localize the cause by reproducibility:

    • If the same prompt stably reproduces the same defect across multiple generations, the problem is mostly missing constraints;
    • If defects increase as context length grows, the problem is mostly context management;
    • If type errors cluster right after switching languages, the problem is mostly that the initial technology choice was not locked;
    • If fixes introduce new problems, the problem is mostly the absence of regression verification.

    8. Engineering Gates That Can Actually Be Applied

    To let AI coding tool output enter main reliably, configure at least four gates: static type checking, build verification, lint checks, and automated tests for key flows. Any failure blocks the merge. Also keep a “change description” mechanism that requires every generation or fix to include a description of the affected scope, making it easy to trace back.

    If cloud deployment is involved, a combination of generic capabilities can be used: a container platform to host the runtime, object storage for static assets, log and monitoring services with alerting for observability, and a message queue to decouple asynchronous flows. Only capability categories are described here; specific choices should be evaluated against your own compliance and cost requirements.

    9. Conclusion

    The core conclusion from this exercise is not that some model “approached” or “surpassed” something, but that: when constraints are written clearly enough and acceptance criteria are executable enough, AI coding tools can already take on most of the repetitive work from scaffolding to batch defect fixing, and developers can focus their energy on business modeling, boundary judgment, and quality gate design. Between the initial cautious trial and later confident delivery lies not luck, but reusable constraint templates, layering conventions, and an automated verification system.