LLM-Assisted Programming: From Architecture Design to a Full-Stack Working App
Modern AI coding assistants have moved beyond generating snippets — in practice, they can now help build a complete project from scratch. This article reviews a real project that tests that claim: an integrated application spanning frontend interaction, backend services, data storage, and multimodal AI capabilities. It covers three areas in turn: architecture design, module-by-module implementation, and reusable prompting methodology. It also includes notes on cloud function code, pagination and lazy loading, image compression and temporary credentials, and the three-stage vision-text-image pipeline used for AI image generation. The main takeaway: the real skill lies not in whether a model can generate code, but in whether the engineer can steer it — clarifying requirements, choosing the right architecture, and taking responsibility for the output.
Introduction: The Conclusion First
From recent hands-on work, I have formed one judgment: the value of a new generation of large language models in coding tools has shifted from “write me a piece of code” to “build a complete project with me from scratch.” An integrated application is an ideal test case for that claim, because its requirements span frontend interaction, backend services, data storage, and multimodal AI capabilities — enough to check whether a model has architecture-level understanding. Below I review the whole effort across three layers: architecture design, module implementation, and the methodology I distilled from it.
1. The Shift in Role: From Snippet Generation to Architecture First
The classic pattern of assisted programming is order-based: you say “write me a carousel,” the tool returns a code block, and you assemble, debug, and patch the gaps yourself. At its core it is a code snippet generator playing a filler role.
Working on the integrated application this time, the model’s response path was clearly different. When I gave it the full set of requirements (waterfall-style wallpaper browsing, user upload and management, AI image generation with image analysis, prompt editing, outfit changes, and generation), it did not immediately start stacking up code. Instead, it first produced a complete technical architecture. That “design first, code later” ordering is the dividing line between it and an ordinary completion tool:
- It first decomposed the functional module boundaries;
- Then it made layered technology choices;
- Then it planned the data model and API divisions;
- Only after that did it move to concrete implementation.
The ability to put “thinking it through” ahead of “writing code” is exactly the signal that tells you whether a model can act as an architecture collaborator.
2. Architecture First: How the Model Makes Technology Choices
A high-quality technical plan normally makes explicit trade-offs across four dimensions. What follows is the selection logic I observed in this project, which has general reference value.
Frontend choice
For a consumer-facing app built mainly around browsing and interaction, the reasonable default is platform-native development rather than a cross-platform framework: native solutions are more direct in startup performance, interaction smoothness, and access to platform capabilities, and they shorten the debugging path. The page structure was planned as a typical bottom three-tab layout (TabBar), for example “Home / AI Create / Me,” which makes the information architecture immediately clear.
Backend choice
For a project like this one, with obvious traffic fluctuation and a small team, serverless cloud development is a strong cost-performance choice. It breaks backend capability into three common components:
- Cloud database: holds structured data (wallpaper metadata, categories, user works, and so on);
- Cloud functions (FaaS): hold business logic, scale elastically per request, and require no operations work;
- Object storage / cloud storage: holds large unstructured files such as images.
Taking general-purpose cloud products offered by vendors such as Baidu AI Cloud as an example, this combination of “database + function compute + object storage” has become the mainstream pattern for lightweight full-stack applications. Developers can ship quickly without running their own servers.
AI capability choice
A multimodal capability like AI image generation should not be handled by a single model doing everything; the right approach is to choose per task:
| Task | Capability type | Purpose |
|---|---|---|
| Image analysis | Vision understanding model | Extract subject, style, background, and other dimensions |
| Prompt optimization | Text generation model | Turn the analysis into a structured, controllable prompt |
| Image-to-image / generation | Image generation model | Produce a new image from the prompt or the original |
This three-stage chain — vision understanding + text orchestration + image generation — is more controllable than “one model solves it end to end,” and it makes it easier to swap or gradually roll out different capabilities later.
Data model and cloud function boundaries
In the end, the value of a plan has to land on something implementable. The mature approach is to hand over the database table structure, the responsibility boundaries of each cloud function, and the handling logic for file upload and compression at the same time, so that later coding follows a plan instead of guessing as it goes.
3. Modular Implementation: Like Pair Programming with a Full-Stack Colleague
Once the architecture was settled, we moved into generating each module in turn. What best shows the model’s “engineering literacy” here is how proactively it handles edge conditions and performance.
Wallpaper library module
The model did not start with UI. It landed the data layer first, then built upward:
// Cloud function: wallpaper list (category filter + pagination)exports.main = async (event) => {const { category = 'all', page = 1, pageSize = 20 } = event;const db = getDatabase();let query = db.collection('wallpapers');if (category !== 'all') {query = query.where({ category });}const skip = (page - 1) * pageSize;const result = await query.orderBy('createdAt', 'desc').skip(skip).limit(pageSize).get();return {list: result.data,page,hasMore: result.data.length === pageSize, // whether another page exists};};
On the frontend it wrapped lazy loading for the waterfall layout, fetching the next page automatically when scrolling reaches the bottom, so that loading everything at once never weighs down the first screen:
// Load on scroll to bottom, with hasMore and loading as double debounceonReachBottom() {if (this.hasMore && !this.loading) {this.loadPage(this.page + 1);}}
Upload management module
The engineering detail here is the clearest sign of maturity: images are compressed before upload to cut both bandwidth and storage cost, and writes to storage go through temporary credentials rather than a long-lived key, balancing security against user experience.
// Compress before upload to control size and clarityasync function compressImage(filePath, quality = 80) {const { tempFilePath } = await compress({ src: filePath, quality });return tempFilePath;}
AI image generation module
The whole chain was orchestrated clearly as “upload → vision analysis → prompt editing → generation,” with support for saving, regenerating, and continuing to edit the result:
// AI image generation: three-stage orchestrationasync function generateImage(filePath) {const compressed = await compressImage(filePath);const url = await uploadToStorage(compressed);const analysis = await callVisionModel(url); // 1. vision understandingconst prompt = await callTextModel(analysis); // 2. prompt optimizationconst output = await callImageModel(prompt, url); // 3. image generationreturn { analysis, prompt, output };}
In one run, the model produced more than 30 files at once, almost all directly runnable with no blocking defects. That experience — discussing architecture like a colleague, delivering code like a full-stack engineer — is what sets it apart from a completion tool.
4. Distilling a Vibe Coding Methodology
From this project I pulled out several reusable lessons:
- Ask for the plan first, then the code: instructing it with “give me the architecture and technology choices first; once we confirm, we implement module by module” significantly reduces rework.
- Break work into small increments: splitting a big requirement into modules such as “wallpaper library / upload management / AI image generation” and pushing them one at a time is more stable than generating the whole site in one pass.
- State engineering constraints: proactively mentioning “pagination is required, compression is required, concurrency and errors must be handled” makes the model far more likely to produce production-grade code.
- Require it to explain boundaries: asking it to spell out the inputs, outputs, and failure scenarios of each part lets you review the work instead of trusting it blindly.
- Keep a human in the loop: responsibility for architecture review, code review, and pre-release verification always stays with the human. The tool is only an amplifier.
5. A Sober View: The Stronger the Tool, the More It Tests Engineering Judgment
It must be said: no matter how strong the tool, it still depends on the judgment of whoever uses it. A model can produce a workable plan quickly, but whether the requirements are clear, whether the architecture fits real traffic, whether security boundaries are complete, and whether cost and performance stay under control still need an engineer to sign off. The real barrier to Vibe Coding is not “can it generate” but “can you steer it” — turning a vague intuition into a precise requirement description, and owning the output.
Conclusion
This project convinced me of one thing: large models have grown from “assistants that write code” into “partners that raise the structure.” What they bring is not the replacement of developers, but relief from repetitive work — returning developers to the higher-value work of architecture decisions, quality control, and product thinking. When technology selection, module implementation, and multimodal integration can all be completed conversationally and at high quality, the efficiency boundary of full-stack delivery is being redefined.
