Hands-On Test of an LLM Coding Assistant: Building an E-Commerce Site and Fixing TypeScript Errors
This article documents a hands-on test of a large language model coding assistant on a mid-complexity e-commerce site. It covers how well the model generated ten complete pages in one pass, how it handled 25 TypeScript compiler errors after a mid-project migration from JavaScript, and how efficiently it closed the loop on error fixes. The results show the model was effective at scaffolding and common type fixes, but its output still required human review. Includes evaluation criteria, project structure observations, and a pre-flight checklist for using AI-generated code in real projects.
Introduction: Can AI-Generated Code Survive a Real Project?
AI-assisted programming has evolved from simple code completion to full-project collaboration. In this test, I used a mid-complexity e-commerce site as the subject to observe how the model performed in three areas: the first-pass success rate of generated code, its ability to fix types after switching to TypeScript, and how efficiently it resolved issues based on error messages. The short version of the conclusion: the model is efficient at scaffolding a project and fixing common type errors, but its output still needs human review, and its ability to follow earlier constraints degrades in the later stages of long conversations.
Test Conditions: What to Confirm Before Reproducing This
Conclusions drawn from a single run are hard to reproduce. If you want to replicate this test, you would first need to confirm the following details. Since this article does not fully disclose them, its conclusions represent one controlled experience only and should not be treated as a ranking across different models.
- The development tools and plugin versions
- The model name, version, and invocation parameters (such as temperature)
- The frontend framework, TypeScript, and major dependency versions
- The list of ten pages and the requirements for each
- The original prompts used, and the order of step-by-step generation
- The error-counting methodology: which command was used to count compilation errors
- The fix-verification rules: when an error counts as “fixed,” and whether runtime verification was included
I will not name the specific model, referring to it only as “a next-generation coding LLM from a cloud provider.”
How the Page-Level Code Was Evaluated
All ten pages were generated by the model with no human intervention. Each page was reviewed against five dimensions and marked as pass, needs changes, or fail.
| Dimension | What Was Checked |
|---|---|
| Layout | Whether the page structure was complete, with navigation and footer in place |
| Interactions | Whether buttons, forms, and cart add/remove operations behaved as expected, and how edge cases like null values, negative numbers, and duplicate submissions were handled |
| Responsive design | Whether layouts broke on narrow and wide screens, and whether styles were redundant or duplicated |
| Types | Whether there were implicit any types, and whether API data had type definitions |
| Reusability | Whether similar components were implemented repeatedly, and whether they could be extracted into shared components |
My overall impression was that the pages had a consistent style, and the step-by-step generation preserved a coherent design language. At the detail level, some components had redundant styles, and edge-case handling for a few events was not robust. These gaps required manual cleanup, item by item.
What Was Worth Borrowing from the Generated Project Structure
The generated project structure had four aspects worth referencing.
- Layered permissions: the
pagesdirectory separated public pages from user pages requiring login. This gives access control a clear home, though the route guards themselves still need manual review. - Layout decoupled from business logic: the
componentsdirectory kept layout components separate from business components, making it easier to swap themes or reuse structures later. - Centralized type definitions: interfaces and type aliases were stored independently, reducing circular imports.
- Isolated mock data: mock data lived in its own directory, with fields matching the type definitions, which helps with unit testing and API integration.
This organization by feature rather than by code type aligns with common engineering practice. That said, a correct structure does not guarantee correct business logic. For example, whether the mock fields match the real API fields still needs to be verified against the API documentation.
What Errors Showed Up During the TypeScript Migration
The project started in JavaScript’s loose mode. After migrating to TypeScript mid-project, the model-generated code surfaced 25 compilation errors, clustered into four categories:
- Untyped parameters inferred as implicit
any - Missing or incorrectly inferred
useStategeneric parameters - API response data used without type guards
- Implicit typing of the
eventobject in event handlers
For troubleshooting, start by enabling strict mode in tsconfig, then run npx tsc --noEmit to get the full error list. After grouping errors by code, similar issues can often be fixed in a single pass. Implicit any parameters typically correspond to error code TS7006. I did not record the exact count of each error category, so I cannot provide a precise distribution.
How Efficient Was the Automated Fix Loop?
The fix process began with feeding the compilation error messages to the model. In my run, the model stalled only once, due to a version conflict in a third-party declaration file; it resolved the remaining errors largely on its own. It went beyond fixing surface types: it added type predicate functions and generic constraints, and adjusted parts of the data access layer. The entire TypeScript fix phase took under ten minutes, and I did not consult any documentation during that time.
These results are informative, but two caveats apply. First, this was a single test, not a statistic from repeated runs. Second, auto-generated type predicates can mask real data problems. If a guard function only checks that a field exists while the API returns a malformed structure, the compiler will pass, but the runtime will still break. So every newly added guard should have its conditions checked against real data, and after fixing, you should run the pages and walk through the main business flows.
Limitations of This Test
I estimate that roughly 10% of the functional details required manual fine-tuning, mostly around complex state interactions and extreme edge cases. I also noticed that problems tended to appear in the later stages of long conversations, where the model followed the constraints set earlier less faithfully. This observation comes from reviewing the conversation logs, not from systematic quantitative comparison.
For long tasks, split the work across multiple sessions and restate the key constraints at the start of each one—for example, the page list, the directory structure, and where type definitions live.
What to Check Before Using AI-Generated Code
Before AI-generated code enters your project, I recommend the following checks.
- Privacy: Never paste keys, user data, or internal API documentation into prompts; redact sensitive content when necessary.
- Licensing: Confirm that the generated code and any referenced third-party libraries permit your intended use.
- Dependency security: Run a dependency vulnerability scan, such as
npm audit, to check whether any packages the model added have known vulnerabilities. - Permissions and payments: Login checks, access control, and order and payment logic must be reviewed line by line by a human.
- Testing: Add automated tests for core flows, and don’t treat “it compiles” as your acceptance criterion.
Conclusion: Use AI Coding Where It Fits
This test showed that the model has practical value in scaffolding pages, fixing common type errors, and localizing issues from error messages. Teams can start by delegating high-frequency, low-risk coding tasks to a model—for example, component styling, mock data, and type completion. The exact share depends on team standards and business context. Code touching core business logic, security policies, and data handling should still go through human review.
