docs: Add an explanation of how the frontend code is used (#182)
This commit is contained in:
parent
9ed2f8be67
commit
04f0491454
|
|
@ -1 +1,122 @@
|
||||||
TODO: something here
|
# Coze Studio Frontend
|
||||||
|
|
||||||
|
This is the frontend project of Coze Studio, an AI Agent development platform built with monorepo architecture, based on React 18 and modern frontend technology stack.
|
||||||
|
|
||||||
|
## 🏗️ Project Architecture
|
||||||
|
|
||||||
|
### Core Technology Stack
|
||||||
|
- **Framework**: React 18 + TypeScript
|
||||||
|
- **Build Tool**: Rsbuild
|
||||||
|
- **Package Manager**: Rush + PNPM
|
||||||
|
- **Routing**: React Router v6
|
||||||
|
- **State Management**: Zustand
|
||||||
|
- **UI Components**: @coze-arch/coze-design
|
||||||
|
- **Internationalization**: @coze-arch/i18n
|
||||||
|
|
||||||
|
### Directory Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
frontend/
|
||||||
|
├── apps/ # Application layer
|
||||||
|
│ └── coze-studio/ # Main application
|
||||||
|
├── packages/ # Core packages
|
||||||
|
│ ├── agent-ide/ # AI Agent development environment
|
||||||
|
│ ├── arch/ # Architecture infrastructure
|
||||||
|
│ ├── common/ # Common components and utilities
|
||||||
|
│ ├── components/ # UI component library
|
||||||
|
│ ├── data/ # Data layer
|
||||||
|
│ ├── devops/ # DevOps tools
|
||||||
|
│ ├── foundation/ # Foundation infrastructure
|
||||||
|
│ ├── project-ide/ # Project development environment
|
||||||
|
│ ├── studio/ # Studio core features
|
||||||
|
│ └── workflow/ # Workflow engine
|
||||||
|
├── config/ # Configuration files
|
||||||
|
│ ├── eslint-config/ # ESLint configuration
|
||||||
|
│ ├── rsbuild-config/ # Rsbuild build configuration
|
||||||
|
│ ├── ts-config/ # TypeScript configuration
|
||||||
|
│ ├── postcss-config/ # PostCSS configuration
|
||||||
|
│ ├── stylelint-config/ # Stylelint configuration
|
||||||
|
│ ├── tailwind-config/ # Tailwind CSS configuration
|
||||||
|
│ └── vitest-config/ # Vitest testing configuration
|
||||||
|
└── infra/ # Infrastructure tools
|
||||||
|
├── idl/ # Interface Definition Language tools
|
||||||
|
├── plugins/ # Build plugins
|
||||||
|
└── utils/ # Utility libraries
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🚀 Quick Start
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
- Node.js >= 21
|
||||||
|
- PNPM 8.15.8
|
||||||
|
- Rush 5.147.1
|
||||||
|
|
||||||
|
### Install Dependencies
|
||||||
|
```bash
|
||||||
|
# Run in project root directory
|
||||||
|
rush install
|
||||||
|
# update
|
||||||
|
rush update
|
||||||
|
```
|
||||||
|
|
||||||
|
### Development Mode
|
||||||
|
```bash
|
||||||
|
# Start development server
|
||||||
|
cd apps/coze-studio
|
||||||
|
npm run dev
|
||||||
|
# or use rushx
|
||||||
|
rushx dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Production Build
|
||||||
|
```bash
|
||||||
|
# Build application
|
||||||
|
cd apps/coze-studio
|
||||||
|
npm run build
|
||||||
|
# or use rushx
|
||||||
|
rushx build
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📦 Core Modules
|
||||||
|
|
||||||
|
### Agent IDE
|
||||||
|
- **agent-ide**: AI Agent integrated development environment
|
||||||
|
- **prompt**: Prompt editor
|
||||||
|
- **tool**: Tool configuration management
|
||||||
|
- **workflow**: Workflow integration
|
||||||
|
|
||||||
|
### Architecture Layer (arch)
|
||||||
|
- **bot-api**: API interface layer
|
||||||
|
- **bot-hooks**: React Hooks library
|
||||||
|
- **foundation-sdk**: Foundation SDK
|
||||||
|
- **i18n**: Internationalization support
|
||||||
|
- **bot-flags**: Feature flags management
|
||||||
|
- **web-context**: Web context utilities
|
||||||
|
|
||||||
|
### Workflow Engine (workflow)
|
||||||
|
- **fabric-canvas**: Canvas rendering engine
|
||||||
|
- **nodes**: Node component library
|
||||||
|
- **sdk**: Workflow SDK
|
||||||
|
- **playground**: Debug runtime environment
|
||||||
|
|
||||||
|
### Data Layer (data)
|
||||||
|
- **knowledge**: Knowledge base management
|
||||||
|
- **memory**: Memory system
|
||||||
|
- **common**: Common data processing
|
||||||
|
|
||||||
|
## 🔧 Development Standards
|
||||||
|
|
||||||
|
### Code Quality
|
||||||
|
- Code formatting with ESLint + Prettier
|
||||||
|
- TypeScript strict mode
|
||||||
|
- Unit test coverage requirements
|
||||||
|
- Team-based tier management (level-1 to level-4)
|
||||||
|
|
||||||
|
### Team Collaboration
|
||||||
|
- Rush-based monorepo management
|
||||||
|
- Workspace dependency management
|
||||||
|
- Unified build and release process
|
||||||
|
|
||||||
|
## 📄 License
|
||||||
|
|
||||||
|
Apache License 2.0
|
||||||
|
|
@ -1,26 +1,15 @@
|
||||||
// 所有声明在 rush.json 中的包,需要在 tags 配置中,添加团队和分级描述。描述的枚举如下
|
|
||||||
{
|
{
|
||||||
"$schema": "./rushx-config.schema.json",
|
"$schema": "./rushx-config.schema.json",
|
||||||
// 团队情况,可以自行添加
|
|
||||||
"team": [
|
"team": [
|
||||||
// 负责人:@xukai.luics
|
|
||||||
"team-automation",
|
"team-automation",
|
||||||
// 负责人:@changyang.liu
|
|
||||||
"team-builder",
|
"team-builder",
|
||||||
// 负责人:@linyibin
|
|
||||||
"team-community",
|
"team-community",
|
||||||
// 负责人:@sunshengda
|
|
||||||
"team-data",
|
"team-data",
|
||||||
// 负责人:@xuyuantong, @dingquan
|
|
||||||
"team-devops",
|
"team-devops",
|
||||||
// 负责人:@fanwenjie.fe
|
|
||||||
"team-arch",
|
"team-arch",
|
||||||
// 负责人:@sunkuo
|
|
||||||
"team-studio",
|
"team-studio",
|
||||||
"team-qa"
|
"team-qa"
|
||||||
],
|
],
|
||||||
// 全部分级包
|
|
||||||
// delete 将被删除包,暂不做分级
|
|
||||||
"level": ["level-1", "level-2", "level-3", "level-4"],
|
"level": ["level-1", "level-2", "level-3", "level-4"],
|
||||||
"codecov": {
|
"codecov": {
|
||||||
"coverage": 20,
|
"coverage": 20,
|
||||||
|
|
@ -33,7 +22,6 @@
|
||||||
"coverage": 30,
|
"coverage": 30,
|
||||||
"incrementCoverage": 60
|
"incrementCoverage": 60
|
||||||
},
|
},
|
||||||
// 后续逐步提升这个 level 的增量覆盖率
|
|
||||||
"level-3": {
|
"level-3": {
|
||||||
"coverage": 0,
|
"coverage": 0,
|
||||||
"incrementCoverage": 0
|
"incrementCoverage": 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue