Files
makelore/.project-docs/20-architecture/data-flow.md
brother7 2e737dee31
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled
晋升客户端项目类型文档
2026-08-09 13:41:51 +08:00

27 lines
1.3 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.

# Data Flow
## Primary Flows
| Flow | Source | Destination | Notes |
|---|---|---|---|
| 登录续期 | Renderer 活动信号 | Main Works Session | 连续 7 天未使用才清除会话 |
| 项目创建 | 新建项目对话框 | Host API → Main 项目初始化 | 创建时固定 `ProjectType`;小游戏/小程序原子生成受控模板,自定义只生成项目空间 |
| 一键提交 | 可发布项目配置 | Main → Works Square | 只对小游戏/小程序开放Main 打包、自动版本、幂等重试和脱敏 |
| 运营发布 | Works Square 审核 | 公共 Runtime | 审核通过后服务端直接发布 |
| 真机预览 | 项目空间 | Main → Owner preview / Runtime | 核对 app、version、release 和同源 HTTPS |
## State Ownership
- Main 持有刷新凭据、发布 Token、临时 ZIP、幂等键和本地 app/version/review 映射。
- 项目内 `.niancode/project.json` 保存 `ProjectType`Main 在配置写入和目录复用时保持其不可变,并在打包时重新读取校验。
- Renderer 仅持有短效公开会话状态、提交展示状态和短时预览 URL。
## External Interfaces
- Works Square 项目创建、版本上传、Owner 状态与 Release preview API。
- 本机 Host API 的发布与真机预览路由。
## Last Updated
2026-08-09