From Code Generation to System Delivery: Full-Stack Development Practice with Large Language Models

    Large language models have moved beyond generating isolated code snippets to supporting requirements analysis, architecture design, module collaboration, and engineering delivery. Using a wallpaper and AI image processing mini-program as a working example, this article walks through how to structure a full project with an LLM: layered architecture design, page and feature planning, data model design around business lifecycles, robust file upload flows, asynchronous task patterns for image processing, and a staged collaboration workflow for working with AI coding assistants. It also outlines practical criteria for judging whether a generated project is genuinely production-ready, and where human developers must remain in charge.

    When developers first adopted AI coding assistants, the typical workflow was simple: type “build me a carousel” or “generate a login page,” and the tool would return a fairly complete piece of code. This capability improves local development efficiency, but it has clear limitations. The code lacks overall coherence, data structures must be designed by hand, exception handling is incomplete, and front-end and back-end interfaces easily drift apart. Developers still end up spending significant time assembling, debugging, and maintaining the results.

    Once a project grows from a single page into a complete application, the hard part is no longer “writing a piece of code” but turning requirements into an implementable system design. Recent practice with large language models shows that their value is shifting from code completion toward requirements understanding, architecture design, module collaboration, and engineering delivery. For small and mid-sized applications, when used correctly, an LLM can even take on part of the role of a junior architect and full-stack development collaborator.

    1. Complex Projects Depend on Upfront Modeling, Not Code

    Take a mini-program for wallpapers and intelligent image processing as an example. Requirements typically cover three main areas:

    1. Content browsing: image lists, category filtering, curated collections, detail views, and downloads.
    2. User management: uploads, personal resource management, deletion, and status maintenance.
    3. Intelligent processing: image analysis, prompt editing, image generation, style adjustments, and saving results.

    If you simply ask a model to “finish this mini-program,” you will likely get many independent page-level code fragments. A more reliable approach is to first have the model establish system boundaries and clarify dependencies between modules.

    A reasonable overall architecture can be divided into four layers:

    • Presentation layer: mini-program pages, components, interaction states, and user feedback.
    • Business layer: content queries, upload management, generation tasks, permission checks, and other business logic.
    • Data layer: persistence for users, images, categories, tasks, and generation records.
    • Infrastructure layer: file storage, temporary access credentials, logging, monitoring, and asynchronous jobs.

    The benefit of layering is that later changes—replacing the image processing capability or adjusting the storage solution—will not force a rewrite of every page. Having the model output an architecture diagram, a module list, and dependency relationships before generating code significantly reduces rework.

    For this type of mini-program, the bottom navigation can be organized around three core entries.

    2.1 Content Home Page

    The home page displays image content. Common features include:

    • Category filtering;
    • Paginated or cursor-based loading;
    • Waterfall (masonry) layout;
    • Image preview;
    • Curated collections;
    • Favoriting or downloading;
    • Empty and loading states.

    A waterfall layout is not simply splitting images into two or three columns. In practice you need to consider original image dimensions, container width, loading order, retry on failure, and scroll performance. A good practice is to have the server return image width and height, then have the front end calculate display height based on a fixed column width, preventing visible layout shifts after images load.

    Pagination should not rely on slicing arrays on the client. A more robust approach is server-side conditional queries by category, timestamp, or unique identifier, returning a cursor for the next page. This reduces duplicate data and scales better as data volume grows.

    2.2 Intelligent Image Processing Page

    This page can be broken into several steps:

    1. Select or upload an image;
    2. Compress it and validate the format;
    3. Call image understanding capabilities to extract subject, style, color, and environment information;
    4. Convert the analysis results into editable prompts;
    5. Select a processing mode;
    6. Submit a generation task;
    7. View the result and save, retry, or continue editing.

    The most important point here: do not design the whole flow as a single synchronous request. Image analysis and generation can both take a long time. The front end should manage task states—such as “pending, processing, succeeded, failed, canceled”—and restore progress by task ID when the user leaves and returns.

    2.3 Personal Center

    The personal center typically includes:

    • Upload history;
    • Saved images;
    • Generation history;
    • Drafts;
    • Account settings;
    • Content deletion and status management.

    For generation history, store the original image, input prompt, parameter summary, output image URL, and task status together. Otherwise users will only see the final result with no way to understand how it was produced or to continue editing it.

    3. Data Models Should Follow the Business Lifecycle

    A maintainable data structure should cover at least the following entities.

    User Table

    Store user ID, nickname, avatar, creation time, last active time, and status. User identity must be confirmed by the server; never fully trust identity fields passed from the front end.

    Image Table

    Store image type, storage path, thumbnail path, width, height, file size, creator, visibility status, and moderation status. Keep originals and thumbnails separate: lists load only thumbnails, and detail pages load originals on demand, reducing bandwidth and memory usage.

    Category and Collection Tables

    Categories are suited to stable content tags, while collections better serve groups of images organized around a theme. Do not mix the two, or later operations and queries become unnecessarily complex.

    Generation Task Table

    Store task ID, user ID, input image, analysis result, prompt, processing mode, current status, error message, output result, and timestamps. The task table serves not only history display but also troubleshooting and reprocessing.

    Operation Log Table

    For actions like deletion, publishing, unpublishing, and regeneration, keep the necessary operation records. When something goes wrong, developers can trace state changes instead of seeing only the final result.

    4. File Upload Is More Than “Can It Upload”

    File handling is the most underestimated part of this kind of project. A complete upload flow typically includes:

    1. Front-end checks on file type and size;
    2. Dimension limits and compression for the image;
    3. Requesting a temporary upload credential from the server;
    4. Uploading to object storage;
    5. Server-side validation of the upload result;
    6. Writing image metadata to the database;
    7. Returning an accessible resource identifier.

    Front-end compression reduces network transfer but cannot replace server-side validation. The server should still check file type, extension, actual size, and image content to prevent users from forging file information. When exposing resources externally, avoid revealing permanent storage paths directly; use short-lived access credentials or controlled access instead.

    You also need to handle these edge cases:

    • User cancels after selecting a file;
    • Network interruption causes upload failure;
    • File uploaded but database write fails;
    • Database write succeeds but the front end never receives the response;
    • Repeated clicks cause duplicate submissions.

    For these reasons, the upload API should be as idempotent as possible, with a cleanup mechanism for failed tasks to avoid accumulating orphaned files.

    5. Intelligent Image Processing Should Use Asynchronous Tasks

    Image understanding and generation involve multiple steps; chaining all APIs together from the front end leads to tangled logic and hard-to-recover errors. A better approach is to manage the pipeline centrally on the server or in a cloud function:

    1. Create task
    2. ↓
    3. Validate input file
    4. ↓
    5. Run image analysis
    6. ↓
    7. Generate or update prompt
    8. ↓
    9. Submit image processing job
    10. ↓
    11. Poll or receive task status
    12. ↓
    13. Save result and metadata
    14. ↓
    15. Notify front end to refresh

    Image analysis results can be broken into dimensions such as:

    • Subject: people, objects, and their key attributes;
    • Style: photorealistic, illustration, cinematic, minimalist, etc.;
    • Composition: close-up, wide shot, centered, symmetrical, etc.;
    • Lighting: bright, soft, backlit, night scene, etc.;
    • Environment: indoor, outdoor, urban, natural scenery, etc.

    Rather than returning one large block of natural language to the user, save the analysis results in structured form and let the front end assemble them into editable content. Users can then modify subject, style, or background individually without rewriting the entire prompt each time.

    6. What Does Correct Collaboration with an LLM Look Like?

    The fact that a model can generate many files at once does not mean the project is done. Developers should break work into verifiable stages.

    Stage 1: Have the Model Produce a Plan

    Ask the model to clarify:

    • Page and module boundaries;
    • Data tables and fields;
    • API inputs and outputs;
    • Permissions and exception handling;
    • Directory structure;
    • Where external capabilities are invoked.

    Stage 2: Build the Core Path First

    Prioritize getting the main path working—“list query → detail view → upload → save”—before adding intelligent processing. Once the core path is stable, debugging becomes much clearer.

    Stage 3: Generate Code Module by Module

    Each time, have the model handle one clearly scoped module—an upload component, a pagination cloud function, task state management, or an image preview component—and require it to state its dependencies and the scope of changes.

    Stage 4: Use the Model to Support Testing

    Ask the model to generate a test checklist based on the APIs and page behavior, covering:

    • Normal inputs;
    • Empty data;
    • Network timeouts;
    • Duplicate submissions;
    • Insufficient permissions;
    • Invalid file formats;
    • Task failures;
    • Re-entering the same page;
    • Missing database records.

    Stage 5: Developers Perform Final Acceptance

    A model can help surface obvious problems, but it cannot replace testing on real devices, permission reviews, performance evaluation, and release checks. File access, user privacy, failure retry, and cost control in particular must be verified by developers in the actual environment.

    7. How to Judge Whether “Generation Complete” Is Actually Usable

    A project should not be judged by how many files were generated. Focus on these criteria instead:

    • Does the core business flow work end to end?
    • Do pages cover loading, success, failure, and empty states?
    • Do APIs validate parameters?
    • Are permissions re-verified on the server?
    • Are there orphaned files without an owner?
    • Can failed tasks be retried or cleaned up?
    • Are logs sufficient for troubleshooting?
    • Does the data structure support future extension?
    • Can other developers understand and maintain the code?

    LLMs are best suited to highly repetitive, well-structured work that needs rapid scaffolding: basic pages, data access layers, form validation, API boilerplate, and test cases. Security policies, core business rules, complex performance issues, and long-term architectural decisions still require experienced developers.

    Conclusion

    The real change brought by LLM-assisted development is not that developers stop writing code entirely, but that the focus shifts from mechanical coding to requirements modeling, system design, quality control, and engineering decisions. For a complete application with content browsing, user uploads, and intelligent image processing, treating the model as merely a code snippet generator yields very limited value; involving it in architecture breakdown, data modeling, task design, and test planning enables a development mode much closer to genuine “full-stack collaboration.”

    Going forward, the skills developers need will evolve too: not just writing code, but accurately describing requirements, identifying boundaries, verifying results, and judging whether a model-generated solution is truly reliable. The model expands execution capacity; the developer stays responsible for direction, quality, and the final outcome.