douyinWEB/desktop/README.md
eric 1112a4d055 Handle YouTube Video Uploads daily quota (429) with project budget and pause-until-reset.
Add shorts_yt_quota module, Shorts UI quota banner, overview tweaks (hide upcoming opens, align events panel height), Electron desktop client scaffold, and deploy scripts; update README.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 02:04:44 -05:00

61 lines
1.6 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.

# Windows 桌面客户端(Electron + React)
本目录是 **独立 Windows 客户端**:启动时在本机拉起 **PocketBase + FastAPI + youtube-svc**,UI 连本地 API,**不依赖** `dylive.nomadro.com`。
## 要求
- Windows 10/11 x64
- Node.js 20+
- Python 3.10+(已 `pip install -r ../backend/requirements.txt`)
- 仓库内 `pb/pocketbase.exe`
- (可选)`ffmpeg` 在 PATH,用于封面/Shorts
## 开发
```bat
cd desktop
npm install
npm run electron:dev
```
流程:
1. Electron main 启动本地 PB `:8090`、API `:8014`、youtube-svc `:8020`
2. Vite `:5173`(代理 `/api`、`/covers` → API)
3. 打开桌面窗口加载 UI
仅预览 UI(需你已手动起后端):
```bat
npm run dev
```
## 打包
```bat
npm run pack
```
产物在 `desktop/release/`(NSIS 安装包 + portable)。打包会把 `backend/`、`pb/`、`youtube-svc/` 打进 `extraResources`(不含 `pocketbase.exe` 时需自行放入 runtime/pb)。
## 端口
| 服务 | 默认 |
|------|------|
| FastAPI | `127.0.0.1:8014` |
| PocketBase | `127.0.0.1:8090` |
| youtube-svc | `127.0.0.1:8020` |
| Vite / UI | `127.0.0.1:5173`(开发)或 `:18574`(打包) |
## 客户端能力
- 系统托盘(关闭窗口可托盘驻留)
- 开播/风控等 **Windows 原生通知**
- 单实例锁;外链用系统浏览器
- 设置页「Windows 客户端 · 本地后端」:服务状态、日志目录、诊断复制
- 窗口失焦时降低轮询频率(SSE 仍保持以便通知)
## 登录
与 Web 相同:本地 API 的站点登录(默认见后端 `DY_ADMIN_*` / 设置页改密)。