# platform **Repository Path**: heralink/platform ## Basic Information - **Project Name**: platform - **Description**: Heralink platform - backend service + admin panel + dev console - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-14 - **Last Updated**: 2026-07-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Heralink Platform heralink 实时通信 SaaS 平台。 **作者**: yichen · **邮箱**: 2782268022@qq.com · **技术交流 Q 群**: 714566447 ## 包含子模块 | 子模块 | 说明 | |--------|------| | [server](server/) | Go 后端服务 | | [manage](manage/) | 超管运营后台 | | [dev-console](dev-console/) | 开发者面板 | 子模块远程仓库: - `server` → https://gitee.com/heralink/server.git - `manage` → https://gitee.com/heralink/manage.git - `dev-console` → https://gitee.com/heralink/dev-console.git ## 快速启动 ### 方式一:本地开发(热重载) ```bash docker-compose -f server/docker-compose.local.yml up -d mysql redis cd server && go run main.go # 后端 :8180/8181/8182 cd manage && npm install && npm run dev # 超管后台 :5174 cd dev-console && npm install && npm run dev # 开发者面板 :5175 ``` ### 方式二:容器内全量编译(无需本地环境) ```bash docker-compose -f docker-compose.build.yml up -d # 单服务重建 docker-compose -f docker-compose.build.yml build server --no-cache docker-compose -f docker-compose.build.yml up -d server nginx ``` ### 方式三:本地编译后挂载运行 ```bash cd server && go build -o bin/heralink-server . cd manage && npm run build cd dev-console && npm run build docker-compose -f docker-compose.light.yml up -d ``` ### 方式四:生产部署(CI 构建镜像) ```bash docker-compose up -d ``` ### 方式五:生产部署(本地编译产物上传) 详见 [deploy-README.md](deploy-README.md) — 本地编译 Go 二进制 + Vue 前端,只上传产物到服务器,增量更新。 ```bash bash deploy/scripts/deploy-local.sh [all|server|manage|console] ``` ## 服务地址 | 服务 | 地址 | 说明 | |------|------|------| | 开发者面板 | http://localhost:1080/dev-console/ | Nginx 统一入口,/dev-console 路径 | | 超管运营后台 | http://localhost:1080/admin/ | Nginx 统一入口,/admin 路径 | | HTTP API | http://localhost:8180 | REST API | | WebSocket | ws://localhost:8181 | 实时通信 | | TCP | localhost:8182 | 实时通信 | ## 端口一览 | 端口 | 服务 | 说明 | |------|------|------| | 1080 | Nginx(部署) | 统一入口 | | 8180 | HTTP API | REST API | | 8181 | WebSocket | 实时通信 | | 8182 | TCP | 实时通信 | | 8280 | Nginx(本地开发) | 本地模式 | | 3307 | MySQL | 数据库 | | 6379 | Redis | 缓存 | | 3478 | STUN/TURN | WebRTC 穿透 | ## 架构文档 详细设计文档见 [server/docs](server/docs/): - [架构](server/docs/01-architecture/) — 认证流程、数据流、集群设计 - [API](server/docs/02-api/) — 错误码规范 - [SaaS 设计](server/docs/04-saas-plan/) — 数据模型、Key 轮换、配额系统 - [集成指南](server/docs/05-integration/) — 数据库选型、迁移 - [开发规范](server/docs/06-development/) — 编码规范、开发路线 ## Git 提交 ```bash # 1. 先在子模块中提交推送 cd server && git add -A && git commit -m "feat: xxx" && git push && cd .. cd manage && git add -A && git commit -m "feat: xxx" && git push && cd .. cd dev-console && git add -A && git commit -m "feat: xxx" && git push && cd .. # 2. 再提交推送父仓库 git add -A && git commit -m "feat: xxx" && git push ``` 必须先推送子模块,再推送父仓库。 ## License MIT