From Code Generation to Architecture Planning: Full-Stack Development Practices with LLMs

    This article explores the paradigm shift in software development driven by large language models (LLMs), transitioning from generating isolated code snippets to comprehensive architecture planning. Using a practical mini-program development case, it examines how LLMs manage technology selection, module splitting, full-stack collaboration, context retention, and AI workflow orchestration. While LLMs significantly enhance efficiency by producing structured engineering outputs, developers must maintain rigorous review and verification processes to ensure system maintainability, security, and reliability.

    1. The Shift in Development Paradigm: From “Writing Code” to “Building Frameworks”

    In the past, using intelligent programming tools typically involved providing a localized requirement, such as “implement a carousel component” or “write a paginated query.” The model would return a snippet of code, and the developer would manually piece it together, debug it, and fill in the context. While this improved the efficiency of writing individual fragments, the overall engineering process still relied on manual decomposition. In a recent integrated mini-program development practice, the first notable difference exhibited by a new generation of general-purpose large language models (LLMs) was their tendency to complete architecture planning before moving into code implementation.

    When the requirement was described as “a mini-program featuring waterfall flow browsing, user upload management, image analysis, prompt editing, one-click outfit changing, and image generation capabilities,” the model did not immediately output large blocks of code. Instead, it first provided a relatively complete technical architecture: the frontend would use native mini-program development, with a bottom navigation bar planning three main pages—Home, Image Generation, and Profile; the backend would leverage cloud development capabilities, utilizing cloud databases, cloud functions, and object storage; the AI components would be split by task into three types of model capabilities: visual understanding, text optimization, and image generation. Furthermore, it also listed engineering details such as database table structures, cloud function responsibility divisions, and file upload and compression logic.

    The value of this output method lies not in “more code,” but in translating requirements into an executable engineering structure. For the LLM, an architecture-first approach means it must maintain module boundaries, data flow, and dependency relationships within its context. For the developer, this feels more like discussing a solution with an experienced full-stack colleague rather than asking a code snippet generator for answers.

    2. Highlight 1: Technology Selection and Module Splitting Aligned with Engineering Practices

    During the architecture planning phase, the model focuses on “what to use, why to use it, and how to connect it.” For example, choosing native mini-program development for the frontend is usually because integrated projects require a relatively stable page structure, component reuse, and platform capability invocations. Choosing cloud development capabilities for the backend is suitable for quickly building databases, cloud functions, and file storage, reducing the deployment costs of independent services. Splitting AI capabilities into visual understanding, text optimization, and image generation also aligns with the single responsibility principle: the vision model is responsible for extracting subjects, styles, visual details, and background ambiance from images; the text model organizes the analysis results into editable prompts; and the image generation model handles image-to-image or outfit-changing tasks.

    Module splitting is equally important. A seemingly simple “image generation” feature actually involves uploading, compression, analysis, prompt editing, generation, saving, regeneration, and continued editing. If the model only generates an upload button or a generate button, the developer still needs to fill in a lot of state management. Architecture-first output divides pages, components, cloud functions, and data tables in advance, providing a solid basis for subsequent implementation.

    Below is a general illustrative pseudocode, expressing only module responsibilities and not representing any specific platform API:

    1. page: imageGenerate
    2. state: uploadedImage, analysisResult, editablePrompt, generatedImage
    3. actions:
    4. uploadImage() -> compress -> saveToStorage -> callAnalysis()
    5. callAnalysis() -> visionModel.analyze(image) -> fillPrompt()
    6. editPrompt() -> textModel.optimize(prompt) -> updateState()
    7. generate() -> imageModel.generate(prompt, image) -> preview()

    This type of structured output allows developers to first review whether the “framework” is reasonable before deciding which modules to auto-generate and which to implement manually. Compared to directly piling up code, this approach makes it much easier to control complexity.

    3. Highlight 2: Full-Stack Module Collaboration and Context Retention

    Once the architecture is established, the model enters the phase of generating code module by module. A noteworthy aspect in practice is its context retention capability: it considers pagination and category filtering when generating cloud database designs, considers lazy loading when generating waterfall flow components, considers temporary credential acquisition, image compression, and storage path planning in the upload management section, and links the upload, analysis, editing, generation, and saving processes in the AI image generation section. The modules are no longer isolated fragments but revolve around the same set of data structures and page states.

    For instance, a wallpaper list typically requires category filtering, paginated loading, and image preview. If the model understands the overall architecture, it will unify pagination parameters, category fields, and frontend scroll loading logic, rather than generating mismatched code separately. Upload management is not just “selecting a file”; it must also consider compression, format validation, storage paths, failure retries, and database records. The AI image generation section needs to convert visual analysis results into editable prompts and support saving, regenerating, or continuing to edit after generation, forming a complete closed loop.

    In a complete modular generation, the output may cover dozens of engineering files, including pages, components, cloud functions, configurations, and styles. At this point, the developer’s focus should shift from “can it write” to “is the structure it writes maintainable.” For example, whether cloud functions have single responsibilities, whether database fields are consistent, whether error handling is comprehensive, and whether frontend states are traceable. The model can significantly speed up the initial draft, but engineering quality still requires human review.

    4. Highlight 3: AI Capability Integration from Single-Point Calls to Workflow Orchestration

    The image analysis, prompt editing, one-click outfit changing, and image generation from the original requirements are essentially not single model calls, but multi-step workflow orchestrations. A mature approach is to break the task down into stages: “input processing — understanding/analysis — prompt construction — generation — result management,” defining clear inputs and outputs for each stage.

    Taking image analysis as an example, the visual understanding model can output dimensions such as subject, style, composition, and background ambiance; the text optimization model organizes these dimensions into structured prompts, highlighting key elements; the image generation model then executes generation based on the prompt and reference image. The process needs to handle failure rollback, user secondary editing, version management of generated results, and storage cost control. If the model can list these steps during the planning phase, it indicates that it is not only generating code but also helping to design the business workflow.

    For developers, the key here is to establish an awareness of “capability boundaries”: model services are suitable for tasks like understanding, generation, and text optimization, but permission control, content moderation, billing protection, exception monitoring, and user data management should still be handled by the engineering system. The deeper the AI capability integration, the more necessary it is to make observability and security strategies a priority.

    5. User Experience: Significant Efficiency Gains, but Review Responsibilities Remain

    The overall experience can be summarized as: efficiency gains come from architecture-first approaches and module collaboration, while risks stem from blind trust in generated results. LLMs can provide technology selection, directory structures, database table drafts, and module code in a short time, reducing the psychological burden of building from scratch. However, they can still miss edge conditions, permission checks, concurrency handling, exception recovery, and platform limitations. If developers only care about whether it “runs,” they can easily overlook maintainability and security.

    Therefore, a more robust collaboration approach includes: first, letting the model output the architecture and task breakdown, and having humans confirm it before generating code; second, establishing unified conventions for cloud functions, database fields, and storage paths; third, requiring the model to include error handling, input validation, and logging points; fourth, conducting manual walkthroughs and small-scale verifications on critical paths; fifth, consolidating reusable components, cloud function templates, and prompt templates into team assets. The stronger the tool, the more important human architectural judgment and acceptance capabilities become.

    6. How Developers Can Keep Pace

    Facing the rapid evolution of LLM capabilities, developers need not fall into the anxiety of “learning it all.” Instead, they should focus on transferable skills: requirement abstraction, module splitting, data modeling, API design, cloud resource planning, AI workflow orchestration, and quality verification. These capabilities will not become obsolete due to a change in a specific model version. Meanwhile, it is recommended to retain manual review gates in projects to perform static checks, boundary testing, and security reviews on generated code. Establish version records for AI-generated content to facilitate tracing and comparison.

    In summary, the highlights of LLMs in development have expanded from “generating a usable snippet of code” to “participating in architecture planning, technology selection, and full-stack module collaboration.” It acts more like an engineering assistant that can quickly produce an initial draft, rather than an architect that replaces the developer in making final decisions. The key to utilizing these capabilities reasonably is to integrate the model’s output into the engineering workflow: plan first, then generate, then review, and continuously consolidate. This is the only way to improve efficiency while maintaining the maintainability and reliability of the system.