# ai-code-review **Repository Path**: jgre/ai-code-review ## Basic Information - **Project Name**: ai-code-review - **Description**: 开源企业级 AI Code Review 系统,支持 Claude、Codex 等主流模型,一键部署、开箱即用,自动代码审查,企业微信、邮件通知。 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-06 - **Last Updated**: 2026-07-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: AI ## README # AI Code Review 开源企业级 AI Code Review 系统,支持 Claude、Codex 等主流模型,一键部署、开箱即用,自动代码审查,企业微信、邮件通知。 ## 目录结构 ```text backend/ FastAPI 后端 frontend/ Vue 管理后台 scripts/init_database.py requirements.txt Python 依赖 Dockerfile 单镜像构建 ``` ## 配置方式 业务配置只通过管理后台写入数据库,不再维护示例配置文件。 ![输入图片说明](frontend/public/ai_code_review_2.png) 基础运行配置写在根目录 `config.ini`: ```ini [database] host = 127.0.0.1 port = 3306 user = root password = name = ai_code_review [security] jwt_secret = change-this-jwt-secret crypto_secret = change-this-crypto-secret [admin] username = admin password = admin123 [ai_sdk] claude_base_url = https://aikopen.com/api/claudecode codex_base_url = https://aikopen.com/api/codex/v1 ``` 项目只使用 MySQL。`security.crypto_secret` 用于加密数据库中的敏感业务配置,部署后不要随意更换。 ## 初始化 ```bash pip install -r requirements.txt python scripts/init_database.py ``` 初始化脚本只负责创建数据库表和默认管理员账号,不做任何历史数据或配置迁移。 ## 本地运行 ```bash cd frontend npm install npm run build rm -rf ../backend/static cp -R dist ../backend/static cd .. uvicorn backend.main:app --host 0.0.0.0 --port 8000 ``` 访问 `http://localhost:8000/` 登录管理后台,在后台完成业务配置。GitLab Webhook 地址为 `http://localhost:8000/gitlab/webhook`。 ![输入图片说明](frontend/public/ai_code_review_1.png) ## Docker ```bash docker build -t ai-code-review . docker run --rm -p 8000:8000 ai-code-review ``` AI审核结果通知企业微信示例(如果没有企业微信可以设置邮箱方式): ![输入图片说明](frontend/public/ai_code_review_r.png)_