Building an AI Fat‑Loss Assistant with Zhipu GLM‑5.2: Results Surpass Expectations

The author demonstrates how to use Zhipu's GLM‑5.2 via Claude Code and CC Switch to automatically generate a complete WeChat mini‑program, Vue3 admin panel, and Java Spring Boot backend for a diet‑tracking assistant, detailing the prompt design, tool setup, code output, and token usage.

Pan Zhi's Tech Notes
Pan Zhi's Tech Notes
Pan Zhi's Tech Notes
Building an AI Fat‑Loss Assistant with Zhipu GLM‑5.2: Results Surpass Expectations

Background

Motivated by the growing interest in personal body‑shape management, the author asked an AI to design a product specification for an AI‑driven fat‑loss assistant that could recommend meals and help users manage weight more scientifically and cost‑effectively.

Implementation Process

2.1 Product Positioning Design

The AI first produced a product brief that defined core and non‑core features, then generated interaction flow diagrams for both the user‑facing WeChat mini‑program and the backend operations view.

A second diagram illustrated the data exchange steps required for AI‑generated recommendations.

2.2 AI Programming Tools

The author compared several AI coding assistants such as Claude Code, Codex, and Cursor, and chose Claude Code for its generality. Because Claude’s large model is inaccessible in China, the CC Switch proxy was used to forward requests to domestic models, specifically Zhipu’s GLM‑5.2.

Installation steps (VS Code, Claude Code extension, CC Switch) are summarized; the VS Code marketplace search for “Claude Code” and installation of the “Claude Code for VS Code” extension are shown.

After installation, the Claude Code dialog appears in VS Code’s side panel, ready for interaction.

3.3 Project Development Introduction

With the finalized product brief, the author asked the AI to output a detailed development prompt, describing system architecture, database choices, and required features. The prompt was copied into the Claude Code dialog, executed, and the generated code was reviewed and run.

The initial prompt (shown below) includes specifications for three components: a WeChat mini‑program (uni‑app + Vue3 + TypeScript), a Vue3 web admin panel, and a Java 8 Spring Boot 2 backend with MyBatis‑Plus and MySQL 8. It also lists required tables, core functionalities, and constraints such as a monolithic architecture and no external vector databases.

你是一名资深全栈工程师,请开发一个 AI 减脂助手 MVP。

项目包含三个端:
1. 微信小程序(用户端)
2. Vue3 Web运营后台
3. Java后端服务

技术要求:
后端:Java8 + Spring Boot2 + MyBatis-Plus + MySQL8
后台:Vue3 + TypeScript + Vite + Ant Design Vue
小程序:uni-app + Vue3 + TypeScript

要求:单体架构,不使用微服务、Redis、Spring AI、LangChain、向量数据库。

核心功能:
一、微信小程序
1. 微信登录
2. 健康档案(性别、年龄、身高、体重、目标体重、减脂目标)自动计算每日推荐热量
3. 饮食记录(文字或图片)调用 AI 分析食物名称、热量、蛋白质、脂肪、碳水、健康评分、建议并保存
4. 菜谱中心(列表、详情、食材、步骤、营养信息、推荐理由)
5. AI智能推荐菜谱(从数据库中挑选10条候选,调用模型选出3条)

二、运营后台
1. 用户管理
2. 饮食记录查看
3. 菜谱管理(分类、增删、食材、步骤、标签)
4. AI配置(模型名称、API地址、API Key)
5. Prompt管理(后台维护 AI 系统提示词)

三、菜谱知识库(用户表、健康档案表、饮食记录表、体重记录表、菜谱分类表、菜谱主表、食材表、步骤表、标签表、标签关联表、AI配置表)

四、AI能力(OpenAI 兼容接口,返回 JSON)

五、开发流程(系统架构、数据库设计、页面设计、接口设计)

最终实现一个完整可运行的 AI 减脂助手 MVP。

After generating the code, the author launched the front‑end, back‑end, and mini‑program services to preview the MVP.

Conclusion

The project consumed approximately 180 million tokens, which is relatively high, but the resulting AI‑driven diet assistant performed better than expected, demonstrating that non‑developers can quickly prototype functional applications using AI code generation tools.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

AI code generationWeChat Mini Programspring-bootVue3Claude CodeGLM5.2
Pan Zhi's Tech Notes
Written by

Pan Zhi's Tech Notes

Sharing frontline internet R&D technology, dedicated to premium original content.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.