Generating Complete Apps From Natural Language: How Far Can AI Coding Tools Go?
This article examines how AI coding tools have evolved from autocomplete-style helpers into autonomous agents capable of building a full application from a single high-level goal. Using a controlled test—the same requirements and prompts, a 10-page e-commerce site built from scratch—it reviews each tool's output the way a code review would, focusing on code that runs, reads well, and can be maintained rather than on marketing claims. It breaks down the recurring problems of AI-generated projects (inconsistent UI, out-of-control structure, shallow architecture, incomplete flows) with their root causes and fixes, then lays out engineering practices for turning a runnable prototype into a maintainable system, plus an enterprise selection checklist. The key takeaway: tools set the ceiling on efficiency, but structured requirements, clear constraints, and automated verification set the floor on deliverable quality.
In 2026, AI coding tools are undergoing a pivotal shift: from “you write half, it completes half” code-completion helpers into autonomous agents that can break a high-level goal into tasks, create files, run commands, and iterate on debugging. Developers no longer need to type code line by line; they describe a goal in natural language and let the tool produce a working, multi-page application prototype from scratch.
Does this mean “AI will replace programmers” has finally come true? This article won’t debate that in the abstract. We chose a more direct way to verify it: give different AI coding tools the same requirements and the same prompts, ask each one to build a well-defined, fully-featured, medium-scale application “from 0 to 1,” and then review the output like a code review.
The advantage of this approach is that the results don’t depend on marketing materials—they depend on real code that runs, reads well, and can be maintained.
1. Why “From 0 to 1” Is the Best Litmus Test for AI Coding Tools
If you only look at autocomplete accuracy, products are already about equal. What really separates them is the ability to handle “long tasks.”
- Task size exceeds a single generation window. Ten pages mean dozens of components, several routes, and page-level state. No single generation can hold the whole system, so the tool must learn to plan in stages.
- Dependencies are deeply nested. Routing, the request layer, global state, and login authentication are all interrelated; one change can ripple across multiple modules.
- Consistency problems accumulate. Across multiple rounds of generation, the style and conventions of each round can drift, and inconsistencies compound like interest.
- Errors must be self-contained. Code errors are the norm; whether a tool can read the logs, locate, and fix the problem on its own determines how far it is from “delivery.”
So the core metric that separates tools is whether they can start from a natural-language requirement and reliably produce an application that is structurally complete, consistent, runnable, and easy to maintain.
2. Evaluation Design: Making Results Comparable and Reproducible
The most common mistake in evaluation is “scoring by feel.” For conclusions to hold up, the evaluation itself has to be as rigorous as an experiment.
2.1 A Unified Task
The task chosen this time was “develop an e-commerce shopping site with a component-based frontend framework,” with the following scope:
| # | Page | Core functional requirements |
|---|---|---|
| 1 | Home (product listing) | Product display, category/filter, pagination |
| 2 | Product detail | Images and text, spec selection, stock status |
| 3 | Purchase (checkout) | Shipping info, payment method, amount calculation |
| 4 | Purchase success | Order summary, next-step guidance |
| 5 | Login | Account/password validation, error messages |
| 6 | Registration | Field validation, password strength check |
| 7 | Account center — dashboard | Account overview, quick links |
| 8 | Account center — orders | Order list, status filter, order details |
| 9 | Account center — wallet (cards & coupons) | Balance display, coupon/gift card list |
| 10 | Account center — settings | Profile, address management, preferences |
We chose e-commerce because it covers three classic types of challenges at once:
- Display pages test visual and layout ability;
- Forms and flow pages test validation and state management;
- A user center that requires authentication tests routing and global-state design.
Moreover, “10 pages” is a well-calibrated threshold: large enough to exceed a single generation’s context window, but not so complex that failures can’t be attributed.
2.2 Controlled Variables
- All tools used identical prompts and supplementary requirements.
- Desktop and mobile checks were done in a browser at a standard resolution.
- Each tool’s output first received the same amount of runtime fixing before entering scoring.
2.3 Unified Scoring Dimensions
| Dimension | Main observation points | Suggested weight |
|---|---|---|
| Requirements understanding | Whether pages and features are complete, whether interactions close the loop | 25% |
| Visual & responsiveness | Layout, color scheme, contrast, responsive behavior | 15% |
| Code quality | Layering, reuse, type safety, hardcoding | 20% |
| Engineering structure | Directory conventions, config and dependency management, maintainability | 15% |
| Runtime stability | Whether it runs on first try, whether errors converge | 15% |
| Generation efficiency | Response speed and time for iterative rounds | 10% |
“Requirements understanding” and “code quality” together account for 45%, because we’re measuring a “deliverable application,” not just a “good-looking screenshot.”
3. Typical Problems in Generative Coding and Their Root Causes
Setting specific products aside and looking at each tool’s first output together, the problems that surface are strikingly similar. Grouped below.
Problem 1: UI that “works but looks bad,” often broken on mobile
The most common symptoms are three: all product and decorative images are placeholders; some button text and background are both light, making them nearly invisible; pages are hard-coded to desktop widths, so on mobile they either overflow horizontally or get compressed overall.
Root cause: In the model’s training data, demo-grade pages far outnumber production-grade pages. Demo pages often chase “quick results,” with color and layout lacking unified design constraints. Sizes and color values are scattered everywhere, so the model “makes a fresh guess” every time it generates a page, which naturally makes them hard to align.
Fix: Constrain generation with a design-spec file. Define design variables like color, spacing, radius, and font size in one place, and explicitly require in the prompt that “only design variables are allowed; hard-coded colors and sizes are forbidden”; also predefine breakpoints and mobile-first layout rules.
/* design-tokens.css: define design variables in one place for all pages to reference */:root {/* Colors: background and body text always keep sufficient contrast */--color-bg: #ffffff;--color-text: #1f2329;--color-text-secondary: #646a73;--color-primary: #2563eb;--color-on-primary: #ffffff; /* text color on primary buttons */--color-border: #e5e6eb;/* Spacing uses a unified scale to avoid arbitrary values */--space-1: 4px;--space-2: 8px;--space-3: 16px;--space-4: 24px;/* Radius and font sizes are likewise limited to a few tiers */--radius-md: 8px;--font-size-body: 14px;--font-size-title: 20px;}.btn-primary {background: var(--color-primary);color: var(--color-on-primary);padding: var(--space-2) var(--space-4);border-radius: var(--radius-md);}
Problem 2: Project structure out of control
Typical symptoms: a folder with the same name is generated inside the existing project folder, causing path nesting chaos and missing dependencies; the model fails to recognize the existing directory organization and flattens components, pages, and utility functions together; mock data is hard-coded directly inside page components, deeply coupled with UI logic.
Root cause: File creation and directory planning are often “decided on the spot” by the model. When the project root isn’t clear, its perception of the existing structure is incomplete, so it can only do its own thing in the most common flat way.
Fix: State explicitly in the prompt that “files must be created inside the specified directory; do not create a directory with the same name as the project,” and provide a target directory convention in advance:
frontend-shop/├── src/│ ├── api/ # request wrappers and API definitions│ ├── components/ # shared UI components│ ├── features/ # pages and logic grouped by business domain│ │ ├── catalog/ # listing and detail pages│ │ ├── checkout/ # checkout and payment-result pages│ │ └── account/ # login, registration, and user center│ ├── hooks/ # custom hooks: requests, auth, etc.│ ├── stores/ # global state│ ├── mocks/ # mock data and API stubs│ └── styles/ # design variables and global styles├── tests/ # unit and end-to-end tests└── docs/ # requirement specs and API contracts
Problem 3: Missing consistency, architecture that’s “all shell, no substance”
Some outputs look like they’ve reserved custom hooks and global context, but the file contents are essentially empty, and each page still keeps its own copy of the data. Page navigation relies on hard-coded addresses; logic like amount calculation and order-number generation is scattered everywhere, reimplemented with inconsistent rules.
Root cause: Models tend to “build the skeleton first, then fill it in gradually,” but when a single generation’s content approaches the context limit, early conventions are easily forgotten, and the skeleton is left as an empty shell.
Fix: Write specs before code. Lock down the route table, data sources, validation rules, and global-state responsibilities in advance, and implement page by page against them.
// specs/shop.spec.ts: use types to "lock down" the requirements and implement code against themexport type PageRoute =| '/'| '/product/:id'| '/checkout'| '/order-success/:orderId'| '/login'| '/register'| '/account/dashboard'| '/account/orders'| '/account/wallet'| '/account/settings';export interface Product {id: string;title: string;priceCents: number; // store amounts in cents to avoid floating-point errorsimageUrl: string;stock: number;category: string;}export interface CartItem {productId: string;quantity: number;}export interface CheckoutInput {cart: CartItem[];addressId: string;paymentMethod: 'card' | 'paypal' | 'apple_pay';couponId?: string;}export type OrderStatus = 'pending' | 'paid' | 'shipped' | 'completed' | 'cancelled';
Problem 4: Incomplete business flows
Many outputs only cover the “happy path”: no message on login failure, no form validation, no redirect to login when accessing the user center while logged out, and no order-status refresh after successful payment. What works is only the path of the “ideal user.”
Root cause: Models default to “page visualization” as the primary output goal; flow branches, exception branches, and edge cases must be explicitly emphasized.
Fix: Write requirements as “user stories + acceptance criteria,” covering exceptions and edges:
- As a logged-out user, accessing any user-center page should redirect to the login page, and after a successful login should return to the original page;
- As a logged-in user, a wrong account or password should show a clear error without clearing the already-entered content;
- As a checkout user, insufficient stock or an unselected address should block the order and explain why;
- As a wallet user, an expired coupon should display as expired and not be selectable.
4. From “It Runs” to “It’s Maintainable”: An Engineering Loop for AI-Generated Projects
A prototype that runs is only the start; what really determines its value is whether it can enter the team’s engineering system and keep evolving. Five lines of defense are recommended.
4.1 Spec-driven: Turning a “one-line requirement” into an “executable contract”
The more the prompt resembles a requirements document, the more stable the output. A recommended structure:
[Goal] Build an e-commerce storefront using a component-based frontend framework + a type system; data comes from a local mock API.[Page list] Home, detail, checkout, payment result, login, registration, account dashboard, orders, wallet, settings — 10 pages total.[Design constraints] Use only variables from styles/design-tokens.css; mobile-first, enable multi-column layout at breakpoints >=768px.[Data constraints] All data must be fetched through the api/ layer; page components must not hold mock data directly.[Business rules]1. Logged-out users accessing account-related pages -> redirect to login, then return after login;2. Forms need front-end validation with field-level error messages;3. Amounts are calculated in cents and formatted only at display time.[Engineering requirements]1. Create files inside the specified directory; do not create a nested directory with the same name;2. Pass type checking and static analysis;3. Cover at least core component unit tests and one end-to-end test of the main checkout flow;4. After completion, run the tests and fix failures automatically until all pass.
4.2 Architecture constraints: Making sure the model “understands” the existing project
When continuing development on an existing codebase, prompts alone aren’t enough. Provide a concise project brief covering directory structure, tech-stack versions, naming conventions, layering responsibilities, and commit conventions, and keep it visible across multiple turns. Otherwise the model easily “reinvents the wheel,” reimplementing existing utilities or components.
4.3 Automated verification: Turning “manual bug hunting” into “machine gatekeeping”
The biggest advantage of AI is that it can self-correct within a loop—as long as there is a reliable feedback signal. Take a build with type checking and linting as an example:
# Build and test script sketch: if any step fails, the result is treated as undeliverablenpx tsc --noEmit # type check: catch obvious type errorsnpx eslint . # lint: enforce consistent style and catch common pitfallsnpx vitest run # unit tests: regression for core logicnpx playwright test # end-to-end tests: simulate the real checkout flow
import { test, expect } from '@playwright/test';test('logged-out user checkout should redirect to login and return to checkout', async ({ page }) => {await page.goto('/checkout');await expect(page).toHaveURL(/\/login/);await page.fill('[data-testid="username"]', 'demo_user');await page.fill('[data-testid="password"]', 'demo_pass');await page.click('[data-testid="submit"]');// After successful login, should return to the checkout page originally visitedawait expect(page).toHaveURL(/\/checkout/);await page.click('[data-testid="place-order"]');await expect(page).toHaveURL(/\/order-success\//);});
4.4 Decoupling the mock layer: So a “missing backend” no longer blocks the frontend
During the evaluation, many tools embedded data directly in the pages, so switching to a real API meant rewriting. A more sensible approach is to funnel data access into a single request layer, then use a mock service to return virtual responses:
// mocks/handlers.ts: intercept requests in one place; switching to a real backend later only requires swapping the implementationimport { http, HttpResponse } from 'msw';export const handlers = [http.get('/api/products', () =>HttpResponse.json({ items: mockProducts, total: mockProducts.length })),http.post('/api/orders', () =>HttpResponse.json({ orderId: 'demo-1001', status: 'paid' }, { status: 201 })),];
4.5 Delivery gatekeeping: A critical stage where humans can’t be absent
AI-generated code still needs review. Five categories of problems are best confirmed by humans:
- Security: input validation, authorization boundaries, whether sensitive information is hard-coded;
- Amounts and business rules: price-calculation precision, coupon stacking, refund rules;
- Accessibility: image alt text, form label association, keyboard operability;
- Dependency compliance: whether new dependencies’ open-source licenses are compatible with the project;
- Maintainability: whether module responsibilities are clear, whether there is obvious duplicate code.
5. Enterprise Selection Checklist: What to Look At for Adoption
Beyond single-shot generation quality, enterprise users should pay more attention to these dimensions. It’s recommended to run parallel validation on the same “real business task” and then decide based on the measured results.
- Context capability: whether it can understand cross-file, cross-module call relationships, rather than staring only at the current file.
- Multi-file editing and long-task planning: whether it can break a big requirement into subtasks and self-correct along the way.
- Feedback loop: whether it can call the terminal and browser, and fix issues based on errors and screenshots.
- Security and compliance: whether code is uploaded to the cloud, whether data collection for training can be disabled, whether private or dedicated-cloud deployment is supported.
- Ecosystem integration: how smoothly it connects with mainstream code editors, code-hosting platforms, and CI pipelines.
- Cost control: whether billing is transparent and models can be configured on demand.
- Process observability: whether operation logs can be audited and outputs traced.
On compliance and localization, some cloud vendors also offer relevant capabilities—for example, AI coding that supports private deployment, provides enterprise-level permissions and audit management, and adapts to specific local software and hardware environments, which suits sectors with strict data-residency requirements such as finance, government, and healthcare. Baidu AI Cloud is one such example. Note that regardless of the product chosen, whether data is retained and how permissions are controlled should be based on the official documentation and actual contract terms.
6. Conclusion: Tools Set the Ceiling on Efficiency; Method Sets the Floor on Delivery
Looking back at this “10-page e-commerce site” contest, three conclusions emerge.
First, current tools can significantly compress the time from idea to prototype, but they’re still “efficient junior engineers.” Being able to write and run isn’t the same as being able to deliver. Cross-file convention consistency, understanding of deep call relationships, and coverage of exception paths still need human gatekeeping.
Second, the biggest variable constraining output quality is often not the model but the input. Whether requirements are structured, whether architecture constraints are clear, and whether verification is automated directly determine how far AI can go.
Third, the focus of future competition is shifting from “generation ability” to “context engineering.” Whoever can more accurately understand the whole project, more reliably follow team conventions, and more dependably complete verification and fixes is more likely to create value in real development workflows.
For developers, rather than asking “which tool is the strongest,” it’s better to first polish the requirements, conventions, and testing system, and then let AI run efficiently within them. When “spec → generate → verify → fix” forms a closed loop, AI coding turns from an occasional showstopper demo into dependable, everyday productivity.
