# cloudforge-native **Repository Path**: cloud-platform-lab/cloudforge-native ## Basic Information - **Project Name**: cloudforge-native - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-29 - **Last Updated**: 2026-06-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CloudForge IDP CloudForge IDP 是一个面向企业内部研发团队的多租户云原生开发者平台。当前代码实现的是 `PLAN.md` 中的 MVP Phase 1:登录、多租户、团队/项目管理、服务目录和轻量 API 网关。 ## 当前已实现 - Monorepo 基础结构 - 本地开发依赖:PostgreSQL、Redis、RabbitMQ、MinIO - Go 公共包:配置、日志、数据库、JWT、统一响应、中间件、分页、租户上下文 - `identity-svc`:登录、刷新 token、当前用户、用户列表、创建用户 - `tenant-svc`:租户、团队、项目 CRUD - `catalog-svc`:服务目录 CRUD - `cloudforge-gateway`:统一入口、JWT 校验、请求 ID、反向代理 - `cloudforge-web`:登录、Dashboard、租户切换、租户/团队/项目/服务目录页面 ## 端口 | 组件 | 端口 | | --- | --- | | cloudforge-gateway | 8080 | | identity-svc | 8081 | | tenant-svc | 8082 | | catalog-svc | 8083 | | cloudforge-web | 5173 | | PostgreSQL | 5432 | | Redis | 6379 | | RabbitMQ | 5672 / 15672 | | MinIO | 9000 / 9001 | ## 本地启动 ```bash make dev-up ``` 分别启动后端服务: ```bash cd services/identity-svc && go run ./cmd/server cd services/tenant-svc && go run ./cmd/server cd services/catalog-svc && go run ./cmd/server cd services/cloudforge-gateway && go run ./cmd/server ``` 启动前端: ```bash cd web/cloudforge-web npm install npm run dev ``` 访问: ```text http://localhost:5173 ``` 开发默认账号: ```text username: admin password: admin123 ``` > 该账号仅用于本地开发,生产环境必须替换默认密码和 `JWT_SECRET`。 ## API 示例 登录: ```bash curl -X POST http://localhost:8080/api/identity/login \ -H 'Content-Type: application/json' \ -d '{"username":"admin","password":"admin123"}' ``` 查询租户: ```bash curl http://localhost:8080/api/tenants \ -H 'Authorization: Bearer ' \ -H 'X-Tenant-ID: 1' ``` 统一响应格式: ```json { "code": 0, "message": "ok", "request_id": "req_xxx", "data": {} } ``` ## 后续路线 下一阶段按 `PLAN.md` 继续推进: 1. `cluster-svc`:集群注册、节点列表、Namespace 列表 2. `agent-svc`:Agent 注册、心跳、资源状态上报 3. `env-svc`:环境创建、Namespace、ResourceQuota、NetworkPolicy 4. `app-svc`:应用模型、运行时配置 5. `deploy-svc`:发布记录、Helm values 生成、状态同步 6. `audit-svc`:关键操作审计 7. 接入 Kubernetes,完成第一次真实部署