Files
HAOVP/docs/基于Spring Cloud的高可用在线视频平台项目架构.md
Toys-A ad1e0ac217 docs(readme): refresh platform overview and media docs
- Rework the README to present HAOVP as a complete video platform.
- Clarify features, architecture, and deployment context for readers.
- Align the docs with the current DPlayer-based player stack.
- Refresh the preview image so the README matches the current UI.
2026-08-20 12:58:15 +08:00

48 lines
2.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HAOVP 当前项目架构
本文档根据仓库当前代码、Maven POM、Docker Compose 和前端配置整理,版本变更后应优先检查这些文件。
## 技术栈
- Java 17、Spring Boot 3.2.4、Spring Cloud 2023.0.1、Spring Cloud Alibaba 2023.0.1.0
- Spring Cloud Gateway、Nacos Discovery/Config、OpenFeign、LoadBalancer、Sentinel
- Spring Security、JWT、MyBatis-Plus 3.5.11、MySQL 8、Redis 7
- RocketMQ 5.1.4(内容服务依赖)、MinIO(对象存储)、FFmpeg Java wrapper 0.8.0(内容服务依赖)
- Vue 3、TypeScript、Vite、Pinia;用户端和管理端使用 DPlayer,用户端通过 DPlayer 弹幕配置接入后端弹幕接口,管理端使用 Element Plus、ECharts
- Docker Compose;Prometheus、Grafana、Micrometer Actuator 用于监控
项目当前没有 Seata 或 Spark 运行时依赖,不应在架构描述中宣称已使用分布式事务或 Spark 推荐。推荐服务目前基于用户行为权重、标签兴趣、视频相似度和热门策略组合推荐。
## 后端模块
| 模块 | 端口 | 职责 |
| --- | ---: | --- |
| video-gateway | 9000 | 统一入口、动态路由、JWT 校验、限流与 CORS |
| video-auth | 9001 | 用户认证、验证码、Access/Refresh Token、登录统计 |
| video-user | 9002 | 用户资料、关注、私信、通知、设置 |
| video-content | 9003 | 视频、分类、标签、上传、互动、弹幕、统计与审核接口 |
| video-comment | 9004 | 评论、回复、点赞、置顶与评论治理 |
| video-recommend | 9005 | 首页/热门/相似/标签推荐与用户行为兴趣 |
| video-admin | 9006 | 管理员认证、角色权限、用户/内容/评论管理、运营统计 |
各服务的 `application.yml` 只保留启动参数和 Nacos 导入配置,环境相关数据位于 Nacos:`common.yaml`、`common-redis-{dev|ha}.yaml` 和服务同名 YAML。
## 请求链路
```text
用户端/管理端 -> video-gateway:9000 -> Nacos 服务发现 -> 业务微服务
-> MySQL/Redis/MinIO/RocketMQ
```
业务服务之间通过 OpenFeign 调用,服务不可用时使用 fallback;网关公开路由和白名单以 Nacos 中的 `video-gateway.yaml` 为准。
## 部署形态
- 单机开发/演示:`backend/docker-compose.yml` 或 `docker-compose.1panel.yml`
- 多节点部署:`docker-compose-node-01.yml`、`docker-compose-node-02.yml`、`docker-compose-node-03.yml`,具体节点职责以对应 compose 文件和 Debian 部署手册为准
- 当前 MinIO 高可用部署采用 Node-01 统一业务写入、Node-02 副本同步方案,不是 MinIO 原生纠删码集群
## 配置原则
环境变量 > Nacos 配置 > 本地 `application.yml`。JWT secret、数据库/Redis/Nacos/MinIO 凭据、RocketMQ 地址均不得写入源码或文档;使用 `.env` 或部署平台密钥注入。