Full-Stack App Development with Chinese Large Models: Architecture Design and Code Generation in Practice

    This article examines how the latest generation of Chinese large models can move beyond code snippet generation to architecture planning and full-stack code generation. Using a lightweight mobile app with a masonry wallpaper feed and AI image generation as a case study, it covers technology selection, Serverless backend planning, AI service integration, data structure design, modular implementation, and the changing developer workflow. It also discusses the need for clear requirements and architectural constraints when collaborating with AI.

    With the rapid evolution of artificial intelligence, the role of large language models in software engineering is undergoing a fundamental change. In the past, developers often treated intelligent programming tools as advanced code snippet generators: after entering a simple request such as “write a carousel component for me,” the model would mechanically return a piece of code that developers still had to assemble, debug, and fix. With the capability leap of the latest generation of Chinese large models, this one-way code generation model is being reshaped. Large models can now act as a senior architect colleague and a full-stack engineer, participating deeply in the full project lifecycle. This article uses the development of a lightweight mobile app with a large masonry wallpaper feed and AI image generation features as an example to analyze the model’s practical performance in architecture design and code generation.

    1. From Code Snippet Generation to Architectural Coordination

    In traditional AI-assisted development, models often lack an understanding of the overall business context. In this development practice, however, a relatively complex requirement was entered into the intelligent programming tool: “Build a lightweight mobile app that includes a masonry wallpaper feed, user upload management, and AI image generation features supporting image analysis, prompt editing, one-click outfit change, and image generation.” The large model demonstrated notable architectural coordination capability.

    It did not rush to output code directly. Instead, it first produced a complete and rigorous technical architecture plan:

    1. Frontend selection: It recommended a native development framework for lightweight mobile applications and designed a bottom navigation bar to divide three core pages: the home wallpaper library, the AI image generation workbench, and the personal center. This was intended to ensure native rendering performance and user experience.
    2. Backend selection: It planned a Serverless architecture using a common cloud development solution, integrating cloud database, cloud functions, and cloud storage. This choice greatly reduces operations and maintenance costs and suits rapid iteration of lightweight applications.
    3. AI capability integration plan: The model not only planned the business logic but also directly designed the integration plan for third-party AI capabilities. It explicitly stated that a general vision large model should be called to analyze image content and extract subject style and visual details; a text large model should be called to automatically optimize and expand prompts; and an image generation large model should be called to implement image-to-image and one-click outfit change.
    4. Data structures and module division: At the architecture stage, the model even listed the cloud database table structure design in detail, such as the wallpaper table, user table, and generation record table; the responsibility division of cloud functions, such as pagination query logic, authentication logic, and AI API proxy; and the frontend file upload and compression flow logic.

    This “scaffolding” capability—planning first and executing later—indicates that large models already possess system-level thinking when understanding complex business scenarios.

    2. Full-Stack Modular Code Generation in Practice

    After the architecture plan was confirmed, the next step was to generate code module by module in the intelligent programming tool. In this stage, the large model performed like an experienced full-stack colleague working in collaboration.

    2.1 Masonry Wallpaper Feed and Data Management

    In the wallpaper library module, the large model first implemented the cloud database design and automatically generated cloud functions supporting pagination and category filtering. On the frontend, it encapsulated the lazy-loading logic of the masonry component and handled image loading states and exception fallback. For the user upload management part, the model not only implemented secure acquisition of temporary cloud storage credentials but also integrated image compression logic on the frontend to avoid bandwidth waste and loading lag caused by directly uploading large images.

    The following is a schematic of the cloud function pagination query logic generated by the large model:

    1. // Cloud function: get wallpaper list
    2. exports.main = async (event, context) => {
    3. const { page, pageSize, category } = event;
    4. const db = cloud.database();
    5. const _ = db.command;
    6. let query = {};
    7. if (category && category !== 'all') {
    8. query.category = category;
    9. }
    10. try {
    11. const total = (await db.collection('wallpapers').where(query).count()).total;
    12. const list = await db.collection('wallpapers')
    13. .where(query)
    14. .skip((page - 1) * pageSize)
    15. .limit(pageSize)
    16. .orderBy('createTime', 'desc')
    17. .get();
    18. return {
    19. code: 0,
    20. data: {
    21. list: list.data,
    22. total: total,
    23. hasMore: (page * pageSize) < total
    24. }
    25. };
    26. } catch (err) {
    27. return { code: -1, msg: err.message };
    28. }
    29. };

    2.2 Code Implementation of the AI Image Generation Flow

    AI image generation is the core of the entire application. The large model accurately decomposed the business into a closed loop: “upload -> AI analysis -> edit and generate.” The upload component includes automatic compression and format validation. It then calls the vision model to analyze the image, returning prompts in three dimensions: subject style, visual details, and background atmosphere. On the frontend, key elements are automatically highlighted in red for users to fine-tune. Finally, the optimized prompts are passed to the image generation model.

    The following is the pseudocode logic planned by the large model for the frontend calling the AI analysis API:

    1. // Frontend logic: call cloud function for image analysis
    2. async function analyzeImage(filePath) {
    3. // 1. Upload the image to cloud storage and get a temporary link
    4. const { fileID } = await wx.cloud.uploadFile({ cloudPath: 'temp/' + Date.now() + '.jpg', filePath });
    5. // 2. Call the cloud function to trigger vision model analysis
    6. const res = await wx.cloud.callFunction({
    7. name: 'aiImageAnalysis',
    8. data: { fileID }
    9. });
    10. if (res.result.code === 0) {
    11. const { style, details, atmosphere } = res.result.data;
    12. // 3. Render the extracted prompts to the editing panel and highlight key elements in red
    13. this.setData({
    14. prompts: { style, details, atmosphere },
    15. highlightedKeys: extractKeywords(details)
    16. });
    17. }
    18. }

    3. Reshaping Development Efficiency and Collaboration Models

    Throughout the project development cycle, interaction with the large model generated more than 30 project files at once. Notably, after basic environment configuration, these files ran directly without obvious logic vulnerabilities or bugs. This experience goes beyond traditional “human-machine question and answer” and feels more like pair programming with a rigorous full-stack engineer.

    However, powerful technical tools do not mean the developer’s role is weakened. On the contrary, they require developers to have stronger system architecture control and business abstraction capabilities. Large models can quickly generate high-quality code, but the prerequisite is that developers must provide clear, unambiguous requirement descriptions and architectural constraints. If the requirement description is vague, the large model may still produce hallucinations or deviate from the core business.

    In summary, the performance of the latest Chinese large models in intelligent programming proves that they can handle the responsibilities of complex applications from architecture selection to full-stack code generation. For developers, mastering efficient collaboration with AI and turning “requirement decomposition - architecture planning - AI generation - review and tuning” into a standardized workflow will be key to improving development efficiency. This identity shift—from code writer to architecture designer and AI collaborator—is a core trend in the evolution of current software development paradigms.