Large Language Models for Full-Stack Development: Practical Lessons and Real-World Experience
This article examines how large language models can support full-stack application development beyond code generation. Based on building a wallpaper and AI image creation app, it explains how LLMs can help with requirements analysis, architecture design, cross-layer implementation, image-processing workflows, asynchronous task handling, and debugging, while emphasizing the need for human review of security, reliability, cost, and maintainability.
In recent years, the role of large language models in software development has continued to evolve. Early AI coding tools mainly focused on completing functions, generating pages, or explaining errors. Developers still had to handle architecture design, module boundaries, API integration, and exception handling themselves. As models have improved at reasoning, planning, and understanding code, they have begun to participate in a much broader part of the software engineering process.
In one practical project using an AI coding tool, I built a wallpaper and AI image creation app from scratch. The project included wallpaper browsing, category filtering, image uploads, image analysis, prompt editing, image generation, and personal resource management.
The most important lesson was that the real value of an LLM is not simply that it can “write a piece of code.” Its greater value lies in helping turn a clearly defined product idea into an overall engineering plan and then supporting its implementation.
1. From Generating Code to Designing Systems
When using code-generation tools in the past, the process often began with a local requirement, such as “create a masonry grid component” or “implement an image upload page.” The model could usually produce code quickly, but developers still had to determine how pages should communicate, how data should be persisted, and how permissions should be enforced.
For this project, I first provided a relatively complete business goal: build an app that supports wallpaper browsing and AI-assisted image creation. Users should be able to upload an image, analyze its content, edit the resulting description, generate a new image, and save the result.
Instead of immediately outputting a large amount of code, the model first decomposed the requirements into several areas.
Page Structure
The client application could be divided into three main entry points:
- Home: Wallpaper lists, category filtering, paginated loading, and detail views.
- AI Creation: Image uploads, content analysis, prompt editing, and generation-task submission.
- Profile: User-created assets, upload history, saved content, and basic settings.
This structure prevents all functionality from being concentrated in a single page and makes it easier to add features such as search, saved items, and history later.
Data and Service Architecture
The backend used an integrated cloud architecture consisting primarily of a cloud database, object storage, cloud functions, and an authentication module.
- The cloud database stores user information, wallpaper metadata, category information, generation records, and task statuses.
- Object storage stores original images, compressed images, and generated results.
- Cloud functions handle paginated queries, permission checks, image processing, and model calls.
- The authentication module distinguishes regular users from administrators.
The model also recommended separating image files from business data. The database stores metadata such as file URLs, dimensions, formats, creation times, and owning users, rather than storing large binary objects directly in database records.
AI Image-Processing Workflow
The image-creation feature was organized into a clear workflow:
Select an image↓Compress and validate the format on the client↓Upload to object storage↓Call image-understanding capabilities↓Extract subject, style, composition, and environment information↓Let the user edit the prompt↓Submit a generation task↓Query the task status↓Save and display the result
This workflow is more reliable than generating an image immediately after upload. Image understanding and image generation are separate stages. Users can review the analysis first and modify the description before starting generation, which gives them greater control over the result.
2. The Practical Value of LLMs in Application Development
Understanding the Business Before Implementation
In a complex project, the hardest part is often not writing an individual function but defining the boundaries between modules. An LLM can translate natural-language requirements into pages, data tables, service interfaces, and task workflows. This is particularly useful for individual developers.
For example, a wallpaper list is more than a grid of images. It may also involve:
- Category filtering
- Paginated loading
- Empty states
- Retry behavior after loading failures
- Lazy loading
- Navigation to detail pages
- Download or save permissions
- Content review on the administration side
If the only instruction is “build a wallpaper page,” the model may generate code focused primarily on presentation. When the requirements are described as a complete business workflow, it is more likely to recognize that the frontend, service layer, and data model must be designed together.
Supporting Cross-Layer Development
A complete app may involve page structure, visual layout, client-side logic, server-side functions, database design, and file storage. Traditional development requires developers to switch repeatedly between these technical layers.
During this project, the model was able to help with tasks including:
- Designing database fields
- Implementing list pagination
- Encapsulating an image-upload component
- Adding client-side image compression
- Generating server-side query functions
- Adding error messages and empty-state pages
- Explaining how different pieces of code interact
- Adjusting the implementation based on runtime errors
This makes the model more than a provider of isolated code snippets. It becomes a full-stack collaborator that can work with broader project context.
Establishing Consistent Coding Conventions
As the number of project files grows, inconsistent naming, duplicated logic, and unstructured state management can quickly become problems. Defining constraints before development helps the model generate code in a consistent style.
For example, the project can establish rules such as:
- Use a fixed directory structure for page files.
- Organize server-side functions by business domain.
- Apply a consistent naming convention to data fields.
- Include error handling in every asynchronous operation.
- Validate user identity for upload, deletion, and query operations.
- Use a consistent response format containing status, data, and error information.
- Keep components responsible for presentation while placing business logic in the service layer.
These rules may appear basic, but they directly affect the long-term maintenance cost of the project.
3. An Implementable Feature Design Example
Consider a wallpaper masonry feed. The frontend should not load every image at once. It should use pagination and lazy loading instead.
A server response might contain fields such as:
{id: "unique resource identifier",title: "image title",category: "category identifier",thumbnailUrl: "thumbnail URL",originalUrl: "original image URL",width: 1080,height: 1920,createdAt: "creation time"}
When the page is opened, the client requests the first page. When the user reaches the bottom, it requests the next page. To prevent duplicate requests, the client also needs to track loading state:
data: {items: [],page: 1,pageSize: 20,loading: false,hasMore: true}
The request logic should account for at least the following situations:
- Do not send another request while one is already in progress.
- Set
hasMoretofalsewhen the response contains no more data. - Keep the existing list and provide a retry option when a request fails.
- Clear the old data and reload from the first page when the category changes.
- Display a placeholder when an image fails to load.
- Avoid updating the state of a page after the page has been destroyed.
Without these considerations, the page may develop duplicate entries, flickering, or abnormal scroll behavior as the amount of data increases.
4. Key Engineering Issues in AI Image Creation
Image Upload Is More Than a Successful Transfer
Before uploading, the client should validate the file type, size, and dimensions. On mobile devices, moderate compression can reduce upload time and storage costs. However, excessive compression may reduce the quality of subsequent image analysis and generation.
A recommended workflow is:
- Check the file format.
- Check the file size.
- Read the image dimensions.
- Generate a thumbnail according to the use case.
- Store the original image and thumbnail separately.
- Record ownership and upload time.
- Clean up temporary files if the upload fails.
The server must not fully trust the filename, user identifier, or resource URL supplied by the client. It must validate permissions and file ownership again on the server side.
Analysis Results Should Be Editable
Image-understanding capabilities can usually extract information about the subject, colors, composition, background, style, and atmosphere. However, automated analysis may not fully match the user’s intent.
A better interaction pattern is to display the analysis as an editable prompt rather than immediately generating an image. The result can be organized into categories such as:
- Main subject
- Visual style
- Environment and background
- Lighting and color
- Composition
- Elements to avoid
Users can modify individual sections before submitting the generation task. This preserves the benefits of AI while keeping the user in control.
Generation Tasks Should Be Asynchronous
Image generation is rarely instantaneous, so the client should not remain blocked while waiting for a response. A more reliable approach is to create a task record with a lifecycle such as:
Pending → Processing → Completed↘ Failed
The client can periodically query the task status or receive the result through a notification mechanism. A task record may include the user identifier, input image, prompt, current status, result URL, failure reason, and creation time.
This design provides several benefits:
- A task can continue even after the user closes the page.
- The server can limit the number of concurrent tasks.
- Failed tasks can be retried, making issues easier to investigate.
5. Limitations That Cannot Be Ignored
Although an LLM can generate many files at once, “it runs” does not mean “it is ready for production.” Generated code still requires human review, especially in the following areas.
Access Control
Every operation involving user resources—whether querying, modifying, or deleting them—must perform identity and permission checks on the server. The system should not rely solely on hiding buttons in the frontend, nor should it trust a user identifier supplied by the client.
Data Security
Image URLs, temporary credentials, and task information should not remain exposed indefinitely. Sensitive resources should use appropriate access policies and expiration periods. Complete credentials should also be excluded from logs.
Error Handling
Models often generate a relatively complete happy path, but they may omit edge cases such as network interruptions, corrupted files, task timeouts, duplicate submissions, and storage failures. These scenarios should be simulated and tested before release.
Cost and Resource Control
Image analysis and generation can consume significant resources. The application should define request-frequency limits, per-user quotas, file-size limits, and concurrency limits. When necessary, a task queue can be added to prevent traffic spikes from overwhelming the service.
Maintainability
An LLM may generate duplicate functions or unnecessarily complicated abstractions. Developers should periodically refactor the code, remove unused logic, standardize interface formats, and add comments and tests for core modules.
6. How to Use LLMs More Effectively for Development
This project showed that the way a prompt is written has a significant effect on the quality of the output. Instead of simply saying, “Build an app for me,” it is more effective to provide information in the following order:
- Explain the project goal and target users.
- List core and non-core features.
- Specify the runtime environment and technical constraints.
- Ask for the architecture first instead of requesting code immediately.
- Confirm data structures and module boundaries.
- Implement the project incrementally, one page or service at a time.
- Run and validate each module after it is completed.
- Provide error logs, observed behavior, and expected behavior together when reporting issues.
This “plan first, code second, validate continuously” approach is easier to control than generating an entire project in one pass.
Conclusion
This experience showed that the real value of LLM-assisted development is not saving a few lines of code. It is lowering the design barrier for complex systems. An LLM can help developers clarify requirements, establish a technical architecture, generate code across multiple layers, and explore new debugging approaches.
However, it cannot replace engineering judgment. The model can improve the speed of exploration and implementation, while developers remain responsible for product trade-offs, permission design, data security, performance validation, and final quality.
Only by placing an LLM inside a complete software engineering workflow—not treating it as a simple code-copying tool—can developers fully benefit from its role in full-stack development and intelligent application design.
