2026-01-23 16:31:54 +08:00
|
|
|
|
# v0 Code Generation Rules - Claude Opus
|
|
|
|
|
|
|
|
|
|
|
|
## Model Selection
|
|
|
|
|
|
- Production components: claude-opus (默认)
|
|
|
|
|
|
- Rapid prototyping: v0-1.5-turbo
|
|
|
|
|
|
- Code review: claude-3.5-sonnet
|
|
|
|
|
|
|
|
|
|
|
|
## Code Standards
|
|
|
|
|
|
- Framework: Next.js App Router
|
|
|
|
|
|
- Styling: Tailwind CSS v4
|
|
|
|
|
|
- Components: shadcn/ui
|
|
|
|
|
|
- No placeholders
|
|
|
|
|
|
- Production-ready only
|
|
|
|
|
|
|
|
|
|
|
|
## Design System
|
|
|
|
|
|
- Use design tokens from globals.css
|
|
|
|
|
|
- Follow color system (3-5 colors max)
|
|
|
|
|
|
- Max 2 font families
|
|
|
|
|
|
- Mobile-first approach
|
|
|
|
|
|
- 所有页面组件保持一致性
|
|
|
|
|
|
- 使用现有导航系统
|
|
|
|
|
|
- 遵循毛玻璃设计风格
|
|
|
|
|
|
- 精简文字,增加流程图
|
|
|
|
|
|
|
|
|
|
|
|
## v0 Usage
|
|
|
|
|
|
- 使用 @v0 前缀调用v0生成代码
|
|
|
|
|
|
- 默认使用 claude-opus 模型
|
|
|
|
|
|
- 生成前先说明需求,确保理解正确
|
2026-01-29 12:18:51 +08:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## 自动部署规则
|
|
|
|
|
|
|
|
|
|
|
|
### 服务器信息
|
|
|
|
|
|
- **服务器IP**: 122.51.107.140
|
|
|
|
|
|
- **用户**: ubuntu
|
|
|
|
|
|
- **项目路径**: /www/wwwroot/soul
|
|
|
|
|
|
- **PM2进程名**: soul
|
|
|
|
|
|
- **端口**: 3006
|
|
|
|
|
|
|
|
|
|
|
|
### GitHub仓库
|
|
|
|
|
|
- **地址**: https://github.com/fnvtk/Mycontent.git
|
|
|
|
|
|
- **分支**: soul-content
|
|
|
|
|
|
|
|
|
|
|
|
### 小程序
|
|
|
|
|
|
- **AppID**: wxb8bbb2b10dec74aa
|
|
|
|
|
|
- **项目路径**: ./miniprogram
|
|
|
|
|
|
|
|
|
|
|
|
### 部署流程(每次提交后自动执行)
|
|
|
|
|
|
1. **提交代码到Git**
|
|
|
|
|
|
```bash
|
|
|
|
|
|
git add -A
|
|
|
|
|
|
git commit -m "描述"
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
2. **推送到GitHub**
|
|
|
|
|
|
```bash
|
|
|
|
|
|
git push origin soul-content
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
3. **部署到服务器**
|
|
|
|
|
|
```bash
|
|
|
|
|
|
ssh ubuntu@122.51.107.140 "cd /www/wwwroot/soul && git pull && pnpm build && pm2 restart soul"
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
如果SSH连接失败,手动登录宝塔面板执行:
|
|
|
|
|
|
```bash
|
|
|
|
|
|
cd /www/wwwroot/soul
|
|
|
|
|
|
git pull
|
|
|
|
|
|
pnpm build
|
|
|
|
|
|
pm2 restart soul
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
4. **上传小程序**
|
|
|
|
|
|
```bash
|
|
|
|
|
|
/Applications/wechatwebdevtools.app/Contents/MacOS/cli upload --project "./miniprogram" -v "版本号" -d "描述"
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
5. **打开微信公众平台**
|
|
|
|
|
|
```bash
|
|
|
|
|
|
open "https://mp.weixin.qq.com/"
|
|
|
|
|
|
```
|
|
|
|
|
|
在「版本管理」设为体验版测试
|
|
|
|
|
|
|
|
|
|
|
|
### 注意事项
|
|
|
|
|
|
- 小程序版本号:未发布前保持 1.14,正式发布后递增
|
|
|
|
|
|
- 后台部署后需等待约30秒生效
|
|
|
|
|
|
- 数据库:腾讯云MySQL,读取优先级:数据库 > 本地文件
|