Skip to content

Commit 5a0a598

Browse files
committed
📝 Update more documentations (phase 7)
1 parent 7fd469d commit 5a0a598

File tree

4 files changed

+76
-14
lines changed

4 files changed

+76
-14
lines changed

doc/docs/en/getting-started/development-guide.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,57 @@ nexent/
4747
- Node.js 18+
4848
- Docker & Docker Compose
4949
- uv (Python package manager)
50+
- pnpm (Node.js package manager)
51+
52+
### Infrastructure Deployment
53+
Before starting backend development, you need to deploy infrastructure services. These services include databases, caching, file storage, and other core components.
54+
55+
```bash
56+
cd docker
57+
./deploy.sh --mode infrastructure
58+
```
59+
60+
::: info Important Notes
61+
Infrastructure mode will start PostgreSQL, Redis, Elasticsearch, and MinIO services. The deployment script will automatically generate keys and environment variables needed for development and save them to the `.env` file in the root directory. Generated keys include MinIO access keys and Elasticsearch API keys. All service URLs will be configured as localhost addresses for convenient local development.
62+
:::
5063

5164
### Backend Setup
5265
```bash
5366
cd backend
54-
uv sync && uv pip install -e ../sdk
67+
uv sync --all-extras
68+
uv pip install ../sdk
5569
```
5670

71+
::: tip Notes
72+
`--all-extras` will install all optional dependencies, including data processing, testing, and other modules. Then install the local SDK package.
73+
:::
74+
5775
### Frontend Setup
5876
```bash
5977
cd frontend
60-
npm install
61-
npm run dev
78+
pnpm install
79+
pnpm dev
6280
```
6381

6482
### Service Startup
83+
Before starting services, you need to activate the virtual environment:
84+
85+
```bash
86+
# Execute in the project root directory
87+
source venv/bin/activate # Activate virtual environment
88+
```
89+
6590
Nexent includes three core backend services that need to be started separately:
6691
```bash
67-
python backend/data_process_service.py # Data processing service
68-
python backend/main_service.py # Main service
69-
python backend/nexent_mcp_service.py # MCP service
92+
source .env && python backend/data_process_service.py # Data processing service
93+
source .env && python backend/main_service.py # Main service
94+
source .env && python backend/nexent_mcp_service.py # MCP service
7095
```
7196

97+
::: warning Important Notes
98+
All services must be started from the project root directory. Each Python command should be preceded by `source .env` to load environment variables. Ensure infrastructure services (database, Redis, Elasticsearch, MinIO) are started and running properly.
99+
:::
100+
72101
## 🔧 Development Module Guide
73102

74103
### 🎨 Frontend Development
@@ -136,6 +165,8 @@ For detailed build instructions, see [Docker Build Guide](../deployment/docker-b
136165
2. **Code Changes**: Restart related services after code modifications
137166
3. **Development Mode**: Use debug mode in development environment
138167
4. **Prompt Testing**: System prompts need thorough testing
168+
5. **Environment Variables**: Ensure configuration in `.env` file is correct
169+
6. **Infrastructure**: Ensure infrastructure services are running properly before development
139170

140171
## 💡 Getting Help
141172

doc/docs/en/sdk/core/agents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,4 @@ Standard execution pattern for problem-solving agents:
210210
3. **Scaling Strategy**: Plan for increased load and usage
211211
4. **Security Considerations**: Validate inputs and protect API access
212212

213-
For detailed implementation examples and advanced patterns, please refer to [Development Guide](../getting-started/development-guide).
213+
For detailed implementation examples and advanced patterns, please refer to [Development Guide](../../getting-started/development-guide).

doc/docs/zh/getting-started/development-guide.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,57 @@ nexent/
4747
- Node.js 18+
4848
- Docker & Docker Compose
4949
- uv (Python 包管理器)
50+
- pnpm (Node.js 包管理器)
51+
52+
### 基础设施部署
53+
在开始后端开发之前,需要先部署基础设施服务。这些服务包括数据库、缓存、文件存储等核心组件。
54+
55+
```bash
56+
cd docker
57+
./deploy.sh --mode infrastructure
58+
```
59+
60+
::: info 重要说明
61+
基础设施模式会启动 PostgreSQL、Redis、Elasticsearch 和 MinIO 服务。部署脚本会自动生成开发环境所需的密钥和环境变量,并保存到根目录的 `.env` 文件中。生成的密钥包括 MinIO 访问密钥和 Elasticsearch API 密钥。所有服务 URL 会配置为 localhost 地址,方便本地开发。
62+
:::
5063

5164
### 后端设置
5265
```bash
5366
cd backend
54-
uv sync && uv pip install -e ../sdk
67+
uv sync --all-extras
68+
uv pip install ../sdk
5569
```
5670

71+
::: tip 说明
72+
`--all-extras` 会安装所有可选依赖,包括数据处理、测试等模块。然后安装本地 SDK 包。
73+
:::
74+
5775
### 前端设置
5876
```bash
5977
cd frontend
60-
npm install
61-
npm run dev
78+
pnpm install
79+
pnpm dev
6280
```
6381

6482
### 服务启动
83+
在启动服务之前,需要先激活虚拟环境:
84+
85+
```bash
86+
# 在项目根目录下执行
87+
source venv/bin/activate # 激活虚拟环境
88+
```
89+
6590
Nexent 包含三个核心后端服务,需要分别启动:
6691
```bash
67-
python backend/data_process_service.py # 数据处理服务
68-
python backend/main_service.py # 主服务
69-
python backend/nexent_mcp_service.py # MCP 服务
92+
source .env && python backend/data_process_service.py # 数据处理服务
93+
source .env && python backend/main_service.py # 主服务
94+
source .env && python backend/nexent_mcp_service.py # MCP 服务
7095
```
7196

97+
::: warning 重要提示
98+
所有服务必须在项目根目录下启动。每个 Python 命令前都需要先执行 `source .env` 来加载环境变量。确保基础设施服务(数据库、Redis、Elasticsearch、MinIO)已经启动并正常运行。
99+
:::
100+
72101
## 🔧 开发模块指南
73102

74103
### 🎨 前端开发
@@ -136,6 +165,8 @@ python backend/nexent_mcp_service.py # MCP 服务
136165
2. **代码修改**: 修改代码后需重启相关服务
137166
3. **开发模式**: 开发环境建议用调试模式
138167
4. **提示词测试**: 系统提示词需充分测试
168+
5. **环境变量**: 确保 `.env` 文件中的配置正确
169+
6. **基础设施**: 开发前确保基础设施服务正常运行
139170

140171
## 💡 获取帮助
141172

doc/docs/zh/sdk/core/agents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,4 @@ def my_tool(param1: str, param2: int) -> str:
210210
3. **扩展策略**: 规划增加的负载和使用
211211
4. **安全考虑**: 验证输入并保护API访问
212212

213-
详细的实现示例和高级模式,请参阅 [开发指南](../getting-started/development-guide)
213+
详细的实现示例和高级模式,请参阅 [开发指南](../../getting-started/development-guide)

0 commit comments

Comments
 (0)