Files
dashboard/.qoder/repowiki/knowledge/zh/音频设备 CMS 管理系统(前后端全栈)/架构设计.md
T
eafonyang 003b44e2bd ui 优化
2026-07-14 18:56:13 +08:00

5 lines
1.2 KiB
Markdown
Raw 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.
仓库为典型的前后端分离单仓结构:
- `backend/src` 采用 Express 应用层 + Sequelize ORM 的数据访问层划分:`config/` 集中加载 `.env`、数据库、Redis、日志;`middleware/` 放置全局中间件(鉴权、bodyLimit);`models/` 通过 `index.js` 统一 `sync()` 并导出;`routes/` 按资源拆分路由文件并在 `routes/index.js` 聚合挂载;`services/` 封装外部依赖(S3、Curve、EQ 缓存、OTA 存储、用户引导);`validators/` 使用 zod 做入参校验;入口 `app.js` 在启动时执行 `sequelize.sync()` 与超级管理员引导。
- `frontend/src` 基于 Vite + Vue3 + Element Plus`main.js` 引入 Element Plus 暗黑 CSS 变量与自定义 `lux-theme.css``router/index.js` 声明式路由,`api/` 目录按资源一一对应后端 REST 接口,`views/` 按功能域组织页面组件,`components/` 存放跨页面复用组件。
- 部署由根级 `docker-compose.yml` 编排:`backend` 容器暴露 8083`frontend` 使用 nginx:alpine 静态托管 `dist` 并通过 `nginx.conf` 反向代理到后端,共享 `audio-network` 网络。
- 顶层 `autoeq/` 存放测量数据 CSV/TXT 样本,`scripts/upload.sh` 用于上传脚本,`DEPLOY.md` / `DESIGN.md` 记录部署与设计说明。