# agent-share **Repository Path**: knqiufan/agent-share ## Basic Information - **Project Name**: agent-share - **Description**: 一个基于 Vue 3 + TypeScript + Express 的 Trae 智能体分享平台。 很简单的一个项目,本意是为了易于 Trae 智能体的分享管理,所以只有简单的发布、修改、分类、标签、搜索功能。 只要在网页中进行 Trae Agent 的注册添加,点击卡片可以跳转链接安装 Trae 智能体。 - **Primary Language**: TypeScript - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2025-09-12 - **Last Updated**: 2025-11-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Trae 智能体分享平台 (Trae Agent Share Platform) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Vue](https://img.shields.io/badge/Vue-3.4+-4FC08D?logo=vue.js&logoColor=white)](https://vuejs.org/) [![TypeScript](https://img.shields.io/badge/TypeScript-5.3+-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/) [![Vite](https://img.shields.io/badge/Vite-5.0+-646CFF?logo=vite&logoColor=white)](https://vitejs.dev/) [![Express](https://img.shields.io/badge/Express-5.1+-000000?logo=express&logoColor=white)](https://expressjs.com/) [![Node.js](https://img.shields.io/badge/Node.js-18+-339933?logo=node.js&logoColor=white)](https://nodejs.org/) 一个基于 Vue 3 + TypeScript + Express 的 Trae 智能体分享平台。 很简单的一个项目,本意是为了易于 Trae 智能体的分享管理,所以只有简单的发布、修改、分类、标签、搜索功能。 只要在网页中进行 Trae Agent 的注册添加,点击卡片可以跳转链接安装 Trae 智能体。 ![image-20250915103523668](./public/image-20250915103523668.png) ## 🚀 技术栈 ### 前端技术 - **框架**: Vue 3.4+ (Composition API) - **语言**: TypeScript 5.3+ - **构建工具**: Vite 5.0+ - **UI 组件库**: Element Plus 2.8+ - **样式方案**: - Tailwind CSS 3.4+ (原子化CSS) - Sass/SCSS (预处理器) - PostCSS (后处理器) - **动画库**: GSAP 3.12+ (高性能动画) - **图标库**: - Lucide Vue Next (现代图标) - Element Plus Icons - **路由**: Vue Router 4.2+ - **HTTP 客户端**: Axios 1.12+ - **工具库**: - UUID (唯一标识符生成) - clsx + tailwind-merge (样式合并) ### 后端技术 - **运行时**: Node.js - **框架**: Express 5.1+ - **语言**: TypeScript 5.9+ - **安全中间件**: - Helmet (安全头设置) - CORS (跨域资源共享) - Express Rate Limit (请求限流) - **数据验证**: Express Validator 7.2+ - **文件系统**: fs-extra 11.3+ - **日志记录**: Morgan 1.10+ - **开发工具**: - Nodemon (热重载) - ts-node (TypeScript 直接执行) ### 开发工具 - **代码检查**: ESLint + TypeScript ESLint - **类型检查**: Vue TSC - **包管理**: npm - **版本控制**: Git ## 📦 项目启动 ### 环境要求 - Node.js >= 16.0.0 - npm >= 8.0.0 - Git ### 本地开发环境配置 #### 1. 克隆项目 ```bash git clone cd agent-share ``` #### 2. 安装前端依赖 ```bash # 安装前端依赖 npm install ``` #### 3. 安装后端依赖 ```bash # 进入服务器目录 cd server # 安装后端依赖 npm install ``` #### 4. 环境配置 项目已包含环境配置文件: - `.env.development` - 开发环境配置 - `.env.production` - 生产环境配置 开发环境默认配置: ```bash # 前端开发服务器 VITE_API_BASE_URL=http://localhost:3001 # 后端服务器 PORT=3001 HOST=0.0.0.0 ``` #### 5. 启动开发服务器 **方式一:分别启动(推荐)** ```bash # 终端1:启动后端服务器 cd server npm run dev # 终端2:启动前端开发服务器 npm run dev ``` **方式二:并行启动** ```bash # 同时启动前后端(需要安装 concurrently) npm install -g concurrently concurrently "cd server && npm run dev" "npm run dev" ``` #### 6. 访问应用 - 前端应用: http://localhost:5173 - 后端API: http://localhost:3001 ### 可用脚本命令 #### 前端命令 ```bash npm run dev # 启动开发服务器 npm run build # 构建生产版本 npm run preview # 预览生产构建 npm run check # TypeScript 类型检查 npm run lint # 代码检查 npm run lint:fix # 自动修复代码问题 ``` #### 后端命令 ```bash cd server npm run dev # 启动开发服务器(热重载) npm run build # 编译 TypeScript npm start # 启动生产服务器 npm run clean # 清理构建文件 ``` ## 🚀 部署指南 ### 🐳 Docker 部署(推荐) **快速启动:** ```bash # Linux/macOS chmod +x docker-start.sh ./docker-start.sh start # Windows docker-start.bat start # 手动启动 docker compose up -d --build ``` **访问地址:** - 前端应用: http://localhost:80 - 后端 API: http://localhost:3001 ### 传统部署方式 **环境要求:** Node.js >= 16.0.0, PM2 ```bash # 1. 安装 PM2 npm install -g pm2 # 2. 构建应用 npm run build cd server && npm run build # 3. 启动服务 cd server pm2 start dist/app.js --name "agent-share-api" pm2 startup && pm2 save ``` **配置文件:** 创建 `.env.production` 设置生产环境变量 ## 📋 待办事项 以下功能正在开发中,敬请期待: - [ ] **分类管理** - 智能体分类的增删改查功能 - [ ] **标签管理** - 标签系统的完善和优化 - [ ] **用户管理** - 用户权限和账户管理系统 ## 🐛 问题反馈 如果您在使用过程中遇到问题或有功能建议,欢迎提交 Issue。 ## 🤝 贡献指南 欢迎贡献代码、报告问题或提出建议! ## 📄 许可证声明 本项目采用 [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) 许可证。