AI-Cloud 的前端项目,基于 React + TypeScript + Vite,提供文件管理、知识库管理、模型管理、Agent 配置与对话界面。
- React 18
- TypeScript
- Vite
- Ant Design
- Tailwind CSS
- Redux Toolkit
- Node.js >= 16
- npm >= 8
npm installnpm run dev默认开发代理会将 /api 转发到 http://localhost:8080,如需修改请查看 vite.config.ts。
npm run build适用于后端已经独立部署完成的场景。
- 构建前端:
npm install
npm run build-
根据你的部署环境调整 nginx.conf 中
/api的上游地址。 -
如果使用 Docker:
docker build -t ai-cloud-frontend .
docker run -d -p 80:80 --name ai-cloud-frontend ai-cloud-frontend也可以直接把 dist/ 部署到任意静态资源服务器。
适用于前后端一起部署的场景。
mkdir ai-cloud
cd ai-cloud
git clone https://github.com/RaspberryCola/AI-Cloud-Frontend.git frontend
git clone https://github.com/RaspberryCola/AI-Cloud-Go.git backend
cd backend/deploy
cp .env.example .env
make up联合部署由后端仓库的部署目录统一编排。详细说明见后端仓库中的 deploy/README.md。
src/main.tsx: 应用入口src/App.tsx: 路由入口src/pages/: 页面src/components/: 组件src/services/: API 请求vite.config.ts: 开发代理配置nginx.conf: 生产反向代理配置