create-steedos-app 3.0.13 → 3.0.14-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-steedos-app",
3
- "version": "3.0.13",
3
+ "version": "3.0.14-beta.10",
4
4
  "keywords": [
5
5
  "react",
6
6
  "steedos"
@@ -49,5 +49,5 @@
49
49
  "engines": {
50
50
  "node": ">=14"
51
51
  },
52
- "gitHead": "a71381a476ebd1183cd2c7096005b7d99820e21c"
52
+ "gitHead": "f508d51da8f6f0436fba72aab808563dbadcb6ba"
53
53
  }
@@ -1,92 +1,184 @@
1
- # Steedos Example App
1
+ # Steedos 项目模板
2
2
 
3
- This is an enterprise-grade low-code/no-code application built on the [Steedos Platform](https://www.steedos.com/).
3
+ 基于 [Steedos 低代码平台](https://www.steedos.com/) 构建的企业级应用项目模板。
4
4
 
5
- This project was scaffolded using `create-steedos-app`. It provides a foundation for rapid metadata modeling, API extensions, and business logic development.
5
+ 通过 `create-steedos-app` 脚手架生成,提供元数据建模、API 扩展和业务逻辑开发的完整基础框架,帮助开发者快速启动企业应用。
6
6
 
7
- ## 🛠 Prerequisites
7
+ ## 环境要求
8
8
 
9
- Before you begin, ensure you have the following installed in your development environment:
9
+ 开始前,请确保本地已安装以下依赖:
10
10
 
11
- - **Node.js**: v22.0 or higher
12
- - **MongoDB**: v7.0 or higher
13
- - **Redis**:
14
- - **Yarn**
11
+ | 依赖 | 版本要求 |
12
+ |------|---------|
13
+ | Node.js | v22.0 及以上 |
14
+ | MongoDB | v7.0 及以上 |
15
+ | Redis | 最新稳定版 |
16
+ | Yarn | 最新稳定版 |
15
17
 
16
- ## 🚀 Quick Start
18
+ ## 快速开始
17
19
 
18
- ### 1. Start Db Services
20
+ ### 第一步:启动数据库服务
19
21
 
20
- Make sure your MongoDB and Redis services are running. You can start them using the following commands:
22
+ 确保 MongoDB Redis 服务正常运行,执行以下命令通过 Docker 启动:
21
23
 
22
24
  ```bash
23
25
  yarn start:db
24
26
  ```
25
- ### 2. Install Dependencies
26
27
 
27
- Run the following command in the project root to install the required Node packages:
28
+ ### 第二步:安装依赖
29
+
30
+ 在项目根目录执行以下命令安装所需 Node 依赖包:
28
31
 
29
32
  ```bash
30
- yarn install
31
33
  yarn
32
34
  ```
33
35
 
34
- ### 3. Start the Server
36
+ ### 第三步:启动开发服务器
35
37
 
36
- Start the development server. Steedos will output the access URL in the console.
38
+ 启动 Steedos 开发服务器,控制台会输出访问地址:
37
39
 
38
40
  ```bash
39
41
  yarn start
40
42
  ```
41
43
 
42
- ### 4. Access the Application
43
-
44
- Once the server starts successfully, open your browser and visit:
45
- `http://localhost:5100` (Default port)
44
+ ### 第四步:访问应用
46
45
 
46
+ 服务启动成功后,打开浏览器访问:
47
47
 
48
- ## 📂 Project Structure
48
+ ```
49
+ http://localhost:5100
50
+ ```
49
51
 
50
- Here is an overview of the core file structure:
52
+ ## 项目结构
51
53
 
52
54
  ```text
53
- my-project/
54
- ├── .env # Environment variables (Do not commit sensitive info)
55
- ├── .env.local # Local environment overrides
56
- ├── package.json # Project dependencies and scripts
57
- ├── steedos-config.js # Core Steedos configuration
58
- ├── steedos-packages/example-app/ # Core app directory
59
- │ ├── main/
60
- │ │ └── default/
61
- │ │ ├── objects/ # Object definitions (Metadata)
62
- │ │ ├── app/ # app definitions (Metadata)
63
- └── package.json # Business package definition
55
+ steedos-project-template/
56
+ ├── .env # 环境变量配置(勿提交敏感信息)
57
+ ├── .env.local # 本地环境变量覆盖
58
+ ├── package.json # 项目依赖与脚本配置
59
+ ├── steedos-config.js # Steedos 核心配置
60
+ ├── docker-compose.yml # Docker 服务编排配置
61
+ └── steedos-packages/
62
+ └── example-app/ # 示例业务包
63
+ ├── package.json # 业务包定义
64
+ └── main/
65
+ └── default/
66
+ ├── objects/ # 对象元数据定义
67
+ └── apps/ # 应用元数据定义
64
68
  ```
65
69
 
66
- ## ⚙️ Configuration
70
+ ## 环境变量配置
67
71
 
68
- Create or modify the `.env` file in the project root to configure the database connection and service ports:
72
+ 在项目根目录创建或修改 `.env` 文件,配置数据库连接和服务端口:
69
73
 
70
74
  ```shell
71
- # Service Port
75
+ # 服务端口
72
76
  PORT=5100
73
77
 
74
- # Database Connection (MongoDB)
78
+ # MongoDB 连接地址
75
79
  MONGO_URL=mongodb://127.0.0.1:27017/steedos
76
80
 
77
- # Root URL (Important for attachments and API callbacks)
81
+ # 根地址(附件存储和 API 回调必须正确配置)
78
82
  ROOT_URL=http://localhost:5100
79
83
 
80
- # Metadata Storage Directory
84
+ # 元数据存储目录
81
85
  STEEDOS_STORAGE_DIR=./storage
82
86
  ```
83
87
 
84
- ## 💻 Development Guide
88
+ ## 开发指南
89
+
90
+ ### 元数据导出
91
+
92
+ 通过界面(Steedos 设置)修改配置后,可使用 Steedos CLI 或 VS Code 插件将变更同步回本地代码,保持代码与配置一致。
93
+
94
+ ### 开发建议
95
+
96
+ - 将业务逻辑封装在 `steedos-packages/` 下各自的业务包中
97
+ - 使用 `.env.local` 存放本地开发专用配置,避免污染共享配置
98
+ - 元数据文件(对象、字段、按钮等)建议纳入版本控制
99
+
100
+ ## 使用 AI 开发 Steedos 项目
101
+
102
+ 借助 AI 编程助手,可大幅提升 Steedos 项目的开发效率。以下是推荐的 AI 开发工作流。
103
+
104
+ ### 准备工作
105
+
106
+ 1. **安装工具**:提前安装 [VS Code](https://code.visualstudio.com/),以及 Claude Code 插件(选装)。
107
+
108
+ 2. **安装 Steedos Skills**:让 AI 具备 Steedos 领域知识,执行:
109
+ ```bash
110
+ npx skills add steedos/steedos-platform
111
+ ```
112
+ > 安装时,按空格键选中所有 Steedos skills,然后确认安装。
113
+
114
+ ### AI 计划模式(需求分析)
115
+
116
+ 在开始编码前,先让 AI 理解需求并制定实现计划:
117
+
118
+ 1. 新开一个会话窗口,在 Chat 页面将 **Mode** 切换为 **Plan Mode**
119
+ 2. 在输入框描述需求并发送,例如:
120
+ ```
121
+ 帮我设计一个 CRM 系统
122
+ ```
123
+ 3. 也可以上传 `.txt` 文本或图片类型的需求文档,再发送:
124
+ ```
125
+ 基于以上文件中的需求,请分析并提供解决方案
126
+ ```
127
+ 4. AI 分析完成后会输出实现计划,确认无误后,告知 AI 按计划执行
128
+ 5. 如对计划不满意,可继续沟通调整,直到满意后再让 AI 开始实现
129
+
130
+ ### AI 开发
131
+
132
+ 计划确认后,让 AI 进入开发模式,自动生成对象、字段、业务逻辑等元数据文件。
133
+
134
+ ### 人工测试确认
135
+
136
+ 1. 启动服务:
137
+ ```bash
138
+ yarn start
139
+ ```
140
+ 2. 登录系统,验证功能是否符合需求
141
+ 3. 将测试中发现的问题反馈给 AI,等待其修复
142
+ 4. **每次 AI 修改完成后,需重启服务使代码生效**
143
+
144
+ > **异常处理**:若控制台出现报错,直接将错误信息粘贴到 AI Chat 输入框发送,AI 会自动定位并修复问题。
145
+
146
+ ### AI 自动化测试(可选)
147
+
148
+ 对于复杂功能,可让 AI 自主驱动浏览器进行端到端测试:
149
+
150
+ 1. 在 VS Code 扩展市场搜索 `@mcp`,找到 **Playwright** 插件并安装
151
+ 2. 向 AI 发送测试指令,例如:
152
+ ```
153
+ 请测试 CRM 模块的功能。
154
+ 访问地址:http://localhost:5100
155
+ 账号:admin@example.com 密码:admin123
156
+ ```
157
+ 3. AI 将自动操作浏览器,完成功能验证直到测试通过
158
+
159
+ ### 初始化演示数据
160
+
161
+ 功能开发完成后,可让 AI 生成演示数据便于展示和测试:
162
+
163
+ ```
164
+ 请帮我初始化演示数据
165
+ ```
166
+
167
+ ### 前端项目开发
168
+
169
+ AI 也支持开发完全自定义的前端项目,包括网页、小程序、移动客户端,后端对接 Steedos API:
85
170
 
86
- ### Exporting Metadata
171
+ - Chat 页面通过上传图片或文字描述告知 UI 需求,例如:
172
+ ```
173
+ 还需要这样的页面,请用 React 帮我实现
174
+ ```
175
+ - 如果是 Web 端项目,可集成到 Steedos 服务器中运行,发送:
176
+ ```
177
+ React 项目需要通过 Steedos Router 提供 SPA 访问
178
+ ```
87
179
 
88
- If you modify configurations via the UI (Steedos Objects), you can sync changes back to your local code using the Steedos command line tools or the VS Code extension.
89
- ## 📚 Resources
180
+ ## 相关资源
90
181
 
91
- - [Steedos Documentation](https://docs.steedos.com/)
92
- - [Steedos GitHub Repository](https://github.com/steedos/steedos-platform)
182
+ - [Steedos 官方文档](https://docs.steedos.com/)
183
+ - [Steedos GitHub 仓库](https://github.com/steedos/steedos-platform)
184
+ - [Steedos 社区](https://community.steedos.com/)