Files
oci-portal-dash/README.md
T
wangdefa 9d0c116ce3
CI / test (push) Successful in 53s
Release / release (push) Successful in 32s
仓库自包含化:CI/文档/规范入库,升级 echarts,填关于页链接
2026-07-09 19:05:28 +08:00

38 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.
# OCI Portal Dash
[OCI Portal](https://github.com/wangdefaa/oci-portal) 的前端工程:Vue 3 + Vite + TypeScript + Naive UI + Tailwind CSS v4 + ECharts + Pinia。
## 开发
```bash
npm install
npm run dev # http://localhost:5173,默认 mock 模式开箱可视
```
| 环境变量 | 默认值 | 说明 |
| --- | --- | --- |
| `VITE_MOCK` | dev 为 `1` | `1` 走内置 mock 数据不依赖后端;置 `0` 走真实请求(dev server 将 `/api``/ai/` 代理到 `http://localhost:8080`,需先启动后端) |
## 质量检查与构建
```bash
npm run lint # ESLint + Prettier(带 --fix)
npm run typecheck # vue-tsc --noEmit
npm run build # 类型检查 + 产物构建到 dist/
```
## 部署
两种形态:
1. **静态直出**`dist/` 交给 Caddy/nginx 伺服,`/api/*``/ai/*` 反代到后端
2. **单文件嵌入**:产物经后端 `go:embed` 打进单个二进制。本仓库 Release 流程(tag `v*`)自动构建并发布 `dist.zip`,后端 Release 流程从这里下载嵌入;本地则 `npm run build` 后把 `dist/` 内容拷入后端 `internal/webui/dist/`
## 规范
编码规范与项目约定见 [AGENTS.md](AGENTS.md) 与 [.trellis/spec/](.trellis/spec/)。
## License
[MIT](LICENSE)