Websoft9 平台的下一代版本 - 云应用管理解决方案。
Webox 是一个现代化的云平台,由两个主要组件构成:
- api-service: 核心后端服务,提供 RESTful API
- websoft9-agent: 部署在服务器节点的客户端代理,负责任务执行和监控
基于 Golang 和 Gin 框架构建的核心后端服务。
技术栈:
- Golang 1.24+
- Gin Web 框架
- GORM ORM 框架
- SQLite 数据库
- Redis 缓存
- InfluxDB 时序数据库
- JWT 认证
- gRPC 通信
部署在服务器节点的客户端代理,负责任务执行和监控。
技术栈:
- Golang
- gRPC (grpc-go)
- Redis (go-redis)
- InfluxDB (influxdb-client-go)
- Docker Engine API
- Go 1.24+
- Docker
- SQLite 3.0+
- Redis 6.0+
- InfluxDB 2.0+
-
克隆仓库
git clone <repository-url> cd webox
-
启动 Web 服务
cd api-service go mod tidy go run main.go
-
启动代理
cd websoft9-agent go mod tidy go build -o websoft9-agent ./cmd/agent sudo ./websoft9-agent
# 构建并运行 web 服务
cd api-service
docker build -t api-service .
docker run -p 8080:8080 -p 9090:9090 api-service
# 构建并运行代理
cd websoft9-agent
docker build -t websoft9-agent .
docker run --privileged websoft9-agent
- API 测试: Apifox
- CI/CD: GitHub Actions
- AI 编程: GitHub Copilot, Claude Code
webox/
├── api-service/ # 后端 API 服务
│ ├── main.go
│ ├── internal/
│ │ ├── config/
│ │ ├── controller/
│ │ ├── service/
│ │ └── repository/
│ └── pkg/
└── websoft9-agent/ # 客户端代理
├── cmd/
├── internal/
└── pkg/
- 遵循 Go 语言编码规范
- 使用依赖注入模式
- 保持接口与实现分离
- 实现完善的错误处理
- 添加适当的日志记录