LLM-Driven Software Development: From Code Generation to Architecture Design
A practical project building a WeChat Mini Program shows how large language models can move beyond code completion into architecture planning and modular implementation. This article walks through the application design, cloud backend, and multi-model image generation workflow, while explaining why requirements, architecture review, security checks, and code inspection still require developer oversight.
1. From Code Completion to Engineering Collaboration
For years, AI-assisted coding largely meant autocomplete, single-function generation, or small tasks such as building an image carousel. The typical workflow was straightforward: a developer described a requirement, the model returned some code, and the developer assembled it, debugged it, and filled in the gaps.
In that workflow, the model was essentially an advanced snippet generator. Architecture decisions, module boundaries, and data flow design remained the developer’s responsibility.
With newer large language models, a noticeable shift is emerging: they can take on broader engineering tasks.
Recently, I used an AI coding tool powered by a newer LLM to build a WeChat Mini Program from scratch. WeChat Mini Programs are applications that run within WeChat; this project combined a masonry-style wallpaper gallery, user upload management, and AI image generation.
The experience differed from a simple question-and-answer exchange. Rather than immediately producing isolated code, the model proposed an overall design and then implemented it module by module. This suggests a shift from code-level assistance toward project-level collaboration.
Here is how the process worked.
2. Start with Requirements, Not Code
For this experiment, I deliberately avoided narrow requests such as “build this component.” Instead, I provided the complete business requirements upfront:
Build a WeChat Mini Program with a wallpaper masonry feed, album details, image previews, and downloads on the home page. Add a “My” page for managing user uploads. Include an AI image generation module with image upload and analysis, prompt editing, one-click outfit changes, and image generation.
The model’s first response was not a large block of code. It was a plan organized into four areas.
Frontend Architecture
- Use native Mini Program development to work within the platform’s capabilities and maintain compatibility with its component ecosystem.
- Configure three main TabBar pages: Home for the wallpaper library, AI Image Generation, and My.
- Use a two-column masonry layout for image lists, with lazy loading encapsulated in a shared image component.
Backend Architecture
- Use a serverless approach such as WeChat Cloud Development to reduce operational work and simplify the authentication flow.
- Store album, image, and user metadata in a cloud database.
- Handle business logic through cloud functions.
- Store image files in cloud storage.
AI Model Integration
The model proposed dividing responsibilities across multiple models:
- A vision model analyzes uploaded images and produces prompt information covering subject and style, visual details, and background atmosphere.
- A text model refines and expands prompts, turning informal user descriptions into structured instructions.
- An image generation model produces the final images and handles image-to-image outfit changes.
The key lesson was that a complex AI feature does not necessarily need to rely on one model. An understanding–planning–generation pipeline can assign each stage to a model suited to that task.
Data and Engineering Details
The plan also covered:
- Database collections for albums, images, users, and generation records, including index recommendations.
- Separate cloud functions for list queries, upload credentials, and generation tasks, rather than placing too many responsibilities in one function.
- A file upload flow: client-side compression → temporary upload credentials → direct upload to object storage → database record update.
The result resembled an initial technical design document from a junior architect.
That points to an important change in how to use these tools: before asking a model how to implement something, ask it how the system should be designed.
3. Implement Module by Module
Once the architecture was confirmed, I drove implementation one module at a time. The process felt closer to pairing with a full-stack colleague than requesting disconnected snippets.
Wallpaper Gallery
The model generated the cloud database schema and a paginated query function with category filtering.
The masonry component also included image-load callbacks and placeholder handling to reduce layout shifts while images loaded.
Upload Management
The upload module implemented temporary credential retrieval, client-side image compression, and retry handling for failed uploads.
Its compression strategy combined maximum image dimensions with a quality setting, helping prevent large images from overwhelming the upload workflow.
AI Image Generation
The AI workflow followed four stages: upload, analyze, edit, and generate.
User uploads an image→ Cloud Function A calls a vision modeland returns a structured description:{subject: "...",style: "...",atmosphere: "...",key_elements: [...]}→ The frontend populates an editable prompt paneland highlights key elements in red→ Cloud Function B calls a text model to refine the prompt→ Cloud Function C calls an image generation modeland stores the generation record
Users could save a result, regenerate it, or continue editing from the generated image. This created an iterative creative workflow rather than a one-off generation action.
Across the project, the model generated more than 30 files. After building, the application was largely runnable without fatal bugs. Compared with my experience a year earlier, this was a substantial improvement.
4. Stronger Capabilities Still Require Developer Oversight
The experience was positive, but it did not remove the need for engineering judgment. Several limitations deserve attention.
1. Requirement Quality Determines Plan Quality
The model produced a detailed plan because the requirements described the pages, features, and boundaries clearly.
When requirements are vague, the model fills in the gaps with assumptions. Those assumptions can push the design away from what the project actually needs.
2. Architecture Needs Human Review
Models often favor familiar, broadly applicable technology choices. Those choices may not fit a team’s existing stack, budget, or expansion plans.
Treat the architecture as a first draft, not a final decision.
3. Large Tasks Should Be Broken into Steps
Asking for an entire project in one pass can cause the model to lose focus as context grows.
A more reliable rhythm is to work module by module and validate each step before moving on.
4. Security and Authorization Cannot Be Skipped
Cloud function permissions, storage access rules, and user data isolation need explicit review.
A system that runs successfully is not necessarily ready to release. Each relevant access-control rule must be checked rather than accepted because the generated code appears functional.
5. Generated Code Still Needs Inspection
Keep reviewing the code, especially:
- Boundary conditions
- Error-handling branches
- Resource cleanup
These are areas where generated implementations can be incomplete, even when the main workflow works.
5. The Real Change Is the Collaboration Model
The biggest benefit of this project was not the number of lines of code I avoided writing. It was the change in how the work was divided.
Developers can focus more on defining requirements, reviewing architecture, and maintaining quality, while delegating well-defined implementation work to the model.
When an LLM can propose a design and then implement it in stages, it becomes more than an autocomplete tool. It starts to function as an on-demand full-stack collaborator.
For individual developers and small teams, that may be the most practical value of this capability shift: one developer working with a model can take on work that previously required a small team. Human oversight remains essential, but the scope of what that collaboration can accomplish is expanding.
