团队活动监视器
一个全栈应用程序,使用MCP(模型上下文协议)服务器和OpenAI聚合和总结GitHub和Jira/Atlassian的团队活动。
建筑
- 前端的:React+Vite+Mantine用户界面(端口5173)
- 后端的:FastAPI+Python(端口8000)
- mcp澳大利亚:用于Jira/Confluence集成的MCP服务器(端口3001)
先决条件
- Docker和Docker Compose
- 倾斜 (可选,用于开发)
- OpenAI API密钥
- GitHub个人访问令牌
- Atlassian/Jira API证书
环境变量
创建一个 .env 文件在 根目录 该项目具有以下变量:
# OpenAI Configuration (Required)
OPENAI_API_KEY=your_openai_api_key
# GitHub Configuration (Required)
GITHUB_PERSONAL_ACCESS_TOKEN=your_github_personal_access_token
# Atlassian/Jira Configuration (Required)
ATLASSIAN_URL=https://your-company.atlassian.net
ATLASSIAN_EMAIL=your_email@example.com
ATLASSIAN_API_TOKEN=your_atlassian_api_token
# Jira Configuration (Required - used by mcp-atlassian)
JIRA_URL=https://your-company.atlassian.net
JIRA_USERNAME=your_email@example.com
JIRA_API_TOKEN=your_jira_api_token如何获取证书
- OpenAI API密钥:从 OpenAI平台
- GitHub个人访问令牌:
- 首选 - 生成具有适当作用域的新令牌(repo,read:user,read:org)
- Atlassian/Jira API代币:
- 首选 大西洋API代币 - 创建新的API令牌
入门指南
使用Docker Compose
- 克隆存储库
- 创建
.env根目录中包含所需变量的文件(见上文)
- 启动所有服务:
docker-compose up --build- 访问应用程序:
- 前端:http://localhost:5173 - 后端API:http://localhost:8000 - 后端API文档:http://localhost:8000/docs
使用倾斜(开发)
- 安装 倾斜
- 创建
.env根目录中的文件
- 跑步倾斜度:
tilt up- 打开Tilt UIhttp://localhost:10350监控服务
手动设置(无Docker)
后端
cd back-end
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000前端
cd front-end
npm install
npm run devMCP Atlassian
mcp atlassian服务已从 ghcr.io/sooperset/mcp-atlassian:latest。有关手动设置,请参阅 mcp-atlassian文档.
API终点
GET /-健康检查POST /prompt-发送提示以获取和总结团队活动
{
"prompt": "What has John been working on this week?"
}服务
| 服务 | 端口 | 描述 |
|---|---|---|
| 前端 | 5173 | React前端应用程序 |
| 后端 | 8000 | FastAPI后端服务器 |
| mcp atlasian | 3001 | Jira/Confluence的mcp服务器 |
发展
该应用程序在开发过程中对前端和后端都使用热重载:
- 前端更改通过Vite HMR自动反映
- 后端更改触发uvicorn重新加载
