Trae Assistant commited on
Commit
cbeed7a
·
1 Parent(s): 0b2dc60

chore: update README.md with huggingface metadata

Browse files
Files changed (1) hide show
  1. README.md +66 -54
README.md CHANGED
@@ -1,57 +1,69 @@
1
- # React + TypeScript + Vite
2
-
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
-
5
- Currently, two official plugins are available:
6
-
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
-
10
- ## Expanding the ESLint configuration
11
-
12
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13
-
14
- ```js
15
- export default tseslint.config({
16
- extends: [
17
- // Remove ...tseslint.configs.recommended and replace with this
18
- ...tseslint.configs.recommendedTypeChecked,
19
- // Alternatively, use this for stricter rules
20
- ...tseslint.configs.strictTypeChecked,
21
- // Optionally, add this for stylistic rules
22
- ...tseslint.configs.stylisticTypeChecked,
23
- ],
24
- languageOptions: {
25
- // other options...
26
- parserOptions: {
27
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
28
- tsconfigRootDir: import.meta.dirname,
29
- },
30
- },
31
- })
 
 
 
 
 
 
 
 
 
 
32
  ```
33
 
34
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
35
-
36
- ```js
37
- // eslint.config.js
38
- import reactX from 'eslint-plugin-react-x'
39
- import reactDom from 'eslint-plugin-react-dom'
40
-
41
- export default tseslint.config({
42
- extends: [
43
- // other configs...
44
- // Enable lint rules for React
45
- reactX.configs['recommended-typescript'],
46
- // Enable lint rules for React DOM
47
- reactDom.configs.recommended,
48
- ],
49
- languageOptions: {
50
- // other options...
51
- parserOptions: {
52
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
53
- tsconfigRootDir: import.meta.dirname,
54
- },
55
- },
56
- })
57
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 生成式 UI Agent
3
+ emoji: 🎨
4
+ colorFrom: blue
5
+ colorTo: indigo
6
+ sdk: docker
7
+ app_port: 7860
8
+ short_description: 基于 DeepSeek-V3 AI 驱动 UI 界面生成工具,支持中英文自然语言描述。
9
+ ---
10
+
11
+ # 生成式 UI Agent (Generative UI Agent)
12
+
13
+ 这是一个基于 AI 大模型的智能界面生成工具,用户通过自然语言描述即可自动生成对应的前端 UI 界面代码。
14
+
15
+ ## 核心功能
16
+
17
+ - **AI 对话输入**:支持中英文自然语言描述,通过硅基流 (SiliconFlow) API 调用 DeepSeek-V3 等先进模型。
18
+ - **实时预览与代码查看**:生成的界面代码可即时查看,并提供预览引导。
19
+ - **历史记录管理**:自动保存最近的生成记录,方便快速找回。
20
+ - **响应式设计**:生成的代码默认支持移动端和桌面端适配。
21
+
22
+ ## 技术栈
23
+
24
+ - **前端**:React 18, TypeScript, Vite, Ant Design, Tailwind CSS
25
+ - **后端**:Node.js, Express, Axios
26
+ - **AI 能力**:硅基流 (SiliconFlow) API, DeepSeek-V3 模型
27
+
28
+ ## 快速开始
29
+
30
+ ### 1. 环境准备
31
+
32
+ 确保您的系统中已安装 Node.js 和 pnpm。
33
+
34
+ ### 2. 配置环境变量
35
+
36
+ 在项目根目录下创建 `.env` 文件,并配置以下内容:
37
+
38
+ ```env
39
+ SILICONFLOW_API_KEY=您的硅基流API密钥
40
+ SILICONFLOW_MODEL=deepseek-ai/DeepSeek-V3
41
+ PORT=7860
42
  ```
43
 
44
+ ### 3. 安装依赖
45
+
46
+ ```bash
47
+ pnpm install
48
+ ```
49
+
50
+ ### 4. 启动项目
51
+
52
+ ```bash
53
+ pnpm dev
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  ```
55
+
56
+ 该命令将同时启动前端开发服务器(默认端口 5173)和后端 API 服务(端口 3001)。
57
+
58
+ ## 项目结构
59
+
60
+ - `src/` - 前端源代码
61
+ - `pages/` - 页面组件
62
+ - `components/` - 通用组件
63
+ - `api/` - 后端 API 服务
64
+ - `routes/` - 路由处理逻辑
65
+ - `public/` - 静态资源
66
+
67
+ ## 许可证
68
+
69
+ MIT