Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CONTENT_SYNC.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Content synchronization baseline

## ZBoard documentation migration — 2026-09-10

ZBoard documentation is now authored in `docs/projects/zboard/`. Product introductions, installation, basic management, and plugin usage lead the navigation; contracts, design notes and historical acceptance records are separate reference sections. `zboard-document-migration.json` records each source, destination and source digest.

This migration uses ZBoard develop `37d1716c466ce16a1198399ac91c9de3e2c0c4f8` plus local documentation revisions. It is not a claim that every feature is in the published v0.0.1 artifact. Plugin runtime and marketplace documentation explicitly identifies the post-v0.0.1 development scope; shared-pool RAW editor additions are marked pending publication. Payments and other business extensions belong to plugins; the current payment extension interface is not implemented. Core and client evidence remains on the earlier baseline below.

Public ZBoard documentation must be changed here, not copied back into the ignored product `docs/` directory. Product release packaging keeps its own release-note artifact under `.github/release-notes/`.

Verification: source and production-output checks passed for 97 Markdown pages, including every sidebar entry, internal link and anchor, JSON examples and rendered HTML. The migration also removes the product release workflow dependency on its local docs directory.

## Previous main audit — 2026-09-09

Public guides were checked on 2026-09-09 against freshly fetched GitHub `main` revisions. None of the three product repositories has a `master` branch. Source was read from immutable Git archives, excluding develop, feature branches and uncommitted changes. In particular, the client checkout contains ongoing uncommitted work and the panel checkout is on a feature branch; neither is the documentation baseline.

| Repository | Main revision |
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The production site is published from `main`, while the development preview is p
| --- | --- | --- |
| Zero Core | Documentation for the ZeroDeNet network runtime, protocols, control interfaces, and deployment. | [zerodenet/core](https://github.com/zerodenet/core) |
| ZNet Sink | Usage, configuration, and platform compatibility documentation for the ZeroDeNet desktop proxy client. | [zerodenet/znet-sink](https://github.com/zerodenet/znet-sink) |
| Zboard | Deployment, initialization, node management, and usage documentation for the service operations platform. | [zerodenet/zboard](https://github.com/zerodenet/zboard) |
| Zboard | Installation, basic panel management, and plugin extension documentation. | [zerodenet/zboard](https://github.com/zerodenet/zboard) |

Each project has its own navigation, page hierarchy, and documentation boundaries so that versions, configuration semantics, and usage guidance remain project-specific.

Expand Down Expand Up @@ -193,3 +193,7 @@ After running the scaffold:
## License

Documentation in this repository is published under the license declared by this repository. Source code licenses are defined by the corresponding project repositories.

## ZBoard documentation ownership

ZBoard documentation is maintained in `docs/projects/zboard/`, including installation, plugin usage and technical references. The product repository retains only entry-point READMEs and build-owned release notes. Historical materials are labeled and grouped separately. See `zboard-document-migration.json` for migration provenance.
4 changes: 4 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,7 @@ pnpm create:project -- \
## License

本仓库中的文档内容按照仓库所声明的许可协议发布。各项目代码的许可协议以对应项目仓库为准。

## ZBoard 文档维护

ZBoard 的安装、插件使用与技术参考统一维护在 `docs/projects/zboard/`。产品仓库保留入口说明和构建使用的发布文案,历史资料在文档站单独归档。迁移来源记录在 `zboard-document-migration.json`。
62 changes: 48 additions & 14 deletions docs/.vitepress/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,25 +138,59 @@ const sinkSidebar: DefaultTheme.SidebarItem[] = [
]

const zboardSidebar: DefaultTheme.SidebarItem[] = [
page('Zboard 文档', '/projects/zboard/'),
page('ZBoard 基础面板', '/projects/zboard/'),
group('开始使用', [
page('用户指南入口', '/projects/zboard/guides/'),
page('用户指南', '/projects/zboard/guides/'),
page('安装与部署', '/projects/zboard/guides/installation'),
page('首次初始化', '/projects/zboard/guides/first-setup'),
page('后台导航与日常运营', '/projects/zboard/guides/daily-operations'),
page('日常管理', '/projects/zboard/guides/daily-operations'),
page('数据存储与备份', '/projects/zboard/guides/storage-and-backups'),
], false),
group('功能说明', [
page('节点与协议服务管理', '/projects/zboard/guides/node-management'),
page('协议服务配置', '/projects/zboard/guides/protocol-services'),
page('套餐、订单与用户交付', '/projects/zboard/guides/plans-and-orders'),
page('订阅交付与流量展示', '/projects/zboard/guides/subscriptions-and-traffic'),
page('公告、注册验证与邮件', '/projects/zboard/guides/announcements-and-email'),
page('系统维护与数据库迁移', '/projects/zboard/guides/maintenance'),
page('DNS 与证书管理', '/projects/zboard/guides/dns-and-certificates'),
group('基础功能', [
page('节点管理', '/projects/zboard/guides/node-management'),
page('协议服务', '/projects/zboard/guides/protocol-services'),
page('网络前置与共享代理池', '/projects/zboard/guides/network-fronting'),
page('套餐与订单', '/projects/zboard/guides/plans-and-orders'),
page('订阅与流量', '/projects/zboard/guides/subscriptions-and-traffic'),
page('订阅筛选', '/projects/zboard/guides/subscription-filtering'),
page('公告与邮件', '/projects/zboard/guides/announcements-and-email'),
page('DNS 与证书', '/projects/zboard/guides/dns-and-certificates'),
page('系统维护', '/projects/zboard/guides/maintenance'),
page('节点清理', '/projects/zboard/guides/node-cleanup'),
page('故障排查', '/projects/zboard/guides/troubleshooting'),
]),
group('参与项目', [
page('参与 Zboard', '/projects/zboard/contributing/'),
group('插件市场与使用', [
page('插件能力与边界', '/projects/zboard/plugins/'),
page('配置市场与安装插件', '/projects/zboard/plugins/marketplace'),
page('启用第三方登录', '/projects/zboard/plugins/login'),
page('安装安全与信任', '/projects/zboard/plugins/trust'),
], false),
group('开发与技术参考', [
page('参与项目', '/projects/zboard/contributing/'),
page('本地开发', '/projects/zboard/contributing/development'),
page('插件开发', '/projects/zboard/plugins/development'),
page('身份接口', '/projects/zboard/plugins/identity-reference'),
page('插件治理', '/projects/zboard/plugins/governance'),
page('技术参考入口', '/projects/zboard/reference/'),
page('核心边界', '/projects/zboard/reference/core-baseline'),
page('数据模型', '/projects/zboard/reference/data-model'),
page('数据库迁移', '/projects/zboard/reference/database-migrations'),
page('节点配置交付', '/projects/zboard/reference/node-config-delivery'),
page('内核生命周期', '/projects/zboard/reference/node-kernel-lifecycle'),
page('规则兼容性', '/projects/zboard/reference/managed-rule-compatibility'),
page('Mieru 内核契约', '/projects/zboard/reference/mieru-kernel-contract'),
]),
group('设计与历史资料', [
page('插件架构设计', '/projects/zboard/reference/plugin-system-design'),
page('插件市场设计', '/projects/zboard/reference/plugin-marketplace-design'),
page('0.0.1 发布记录', '/projects/zboard/reference/history/v0.0.1'),
page('核心 RC 验收记录', '/projects/zboard/reference/history/core-rc'),
page('历史发布清单', '/projects/zboard/reference/history/launch-checklist'),
page('历史路线图', '/projects/zboard/reference/history/roadmap'),
]),
group('English', [
page('Installation', '/projects/zboard/guides/installation-en'),
page('Plugin installation trust', '/projects/zboard/plugins/trust-en'),
]),
]

Expand All @@ -172,6 +206,6 @@ export const sidebar: DefaultTheme.Sidebar = {
page('实现与文档进度', '/progress'),
group('应用', [page('ZNet Sink', '/projects/znet-sink/')]),
group('内核', [page('Zero Core', '/projects/core/')]),
group('运营平台', [page('Zboard', '/projects/zboard/')]),
group('基础面板', [page('ZBoard', '/projects/zboard/')]),
],
}
6 changes: 3 additions & 3 deletions docs/.vitepress/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
},
{
"id": "zboard",
"name": "Zboard",
"tagline": "代理服务运营管理",
"description": "基础设施、协议服务、节点组、商品、订单、订阅、配置交付和流量管理。",
"name": "ZBoard",
"tagline": "基础面板与插件扩展",
"description": "管理 Zero 节点、用户、订阅和流量,按需通过插件扩展。",
"kind": "application",
"status": "active",
"repository": "https://github.com/zerodenet/zboard",
Expand Down
8 changes: 6 additions & 2 deletions docs/progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ TUN、DNS/Fake-IP 和多协议能力已提供配置与控制接口;具体协

0.0.1 已发布 Windows x86_64、macOS Intel/Apple Silicon 和 Linux x86_64 安装包。该版本的[发布记录](https://github.com/zerodenet/znet-sink/blob/6d822fb96140be87cdccdd0bea472ba0b089cf04/docs/releases/v0.0.1.md)明确保留四个平台安装运行验收的豁免:DNS 与接管模式组合、升级中断恢复、退出清理及跨资源故障注入等仍待补验。不能把发布成功写成这些场景已经安装验收通过。

## Zboard
## ZBoard

::: info 文档迁移与开发版补充(2026-09-10)
以下表格保留 2026-09-09 的 main 核对记录。新迁入的[插件说明](/projects/zboard/plugins/)覆盖 0.0.1 发布后的开发分支能力;不代表原始 0.0.1 安装包已包含插件运行时。ZBoard 定位为基础面板,在线支付等业务扩展通过插件实现,当前尚未开放支付业务接口。
:::

| 已实现能力 | 对运营者的实际作用 | 使用说明与源码依据 |
| --- | --- | --- |
Expand All @@ -52,7 +56,7 @@ TUN、DNS/Fake-IP 和多协议能力已提供配置与控制接口;具体协
| 本地删除与独立远端清理 | 节点或供应商不可达时可清理面板记录;远端停机另行执行 | [节点清理](/projects/zboard/guides/node-management#删除节点与远端清理);[删除实现](https://github.com/zerodenet/zboard/blob/e1b7246cc4ef805bf39b22d634ba209114eb3b14/backend/internal/handler/node_delete_cascade.go) |
| 规则集按客户端能力交付 | Clash/sing-box 可保留进程条件,Zero 模板拒绝不支持的规则集 | [规则兼容](/projects/zboard/guides/subscriptions-and-traffic#规则集与客户端兼容性);[兼容检查](https://github.com/zerodenet/zboard/blob/e1b7246cc4ef805bf39b22d634ba209114eb3b14/backend/internal/handler/managed_rule_client_compatibility.go) |

当前提供用户、节点、订阅、基础订单和流量计量闭环。在线支付集成与插件运行时仍是后续方向,不作为 main 已交付能力;详见[当前范围](https://github.com/zerodenet/zboard/blob/e1b7246cc4ef805bf39b22d634ba209114eb3b14/docs/core-baseline.md)。[0.0.1 发布记录](https://github.com/zerodenet/zboard/blob/e1b7246cc4ef805bf39b22d634ba209114eb3b14/docs/release/v0.0.1.md)也未将 24 小时长稳、500 events/s 突发或完整多节点恢复标为验收完成。
当前提供用户、节点、订阅、基础订单和流量计量闭环。 main 快照尚未包含后来在开发分支实现的插件运行时。在线支付属于插件扩展范围,支付业务接口仍待实现;历史范围见[当前范围](https://github.com/zerodenet/zboard/blob/e1b7246cc4ef805bf39b22d634ba209114eb3b14/docs/core-baseline.md)。[0.0.1 发布记录](https://github.com/zerodenet/zboard/blob/e1b7246cc4ef805bf39b22d634ba209114eb3b14/docs/release/v0.0.1.md)也未将 24 小时长稳、500 events/s 突发或完整多节点恢复标为验收完成。

## 本轮核对范围

Expand Down
166 changes: 166 additions & 0 deletions docs/projects/zboard/contributing/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Local development

This guide contains the contributor setup that does not belong in the project
overview. For product architecture and supported capabilities, start with the
repository `README.md`.

## Toolchain

Use the versions declared by the repository instead of choosing local defaults:

- Go and the exact toolchain are declared in `backend/go.mod`;
- Node.js is pinned by the frontend and Docker build;
- pnpm is declared by `frontend/package.json#packageManager`;
- MySQL 8 is required for the current local service.

The environment checks can resolve the repository Go toolchain automatically:

```powershell
.\scripts\verify-env.ps1
```

```bash
./scripts/verify-env.sh
```

## One-command startup

The development launcher verifies dependencies, starts MySQL through Docker
Compose when necessary, creates ignored local runtime configuration,
starts the backend and optionally starts the frontend.

PowerShell:

```powershell
.\scripts\start-dev.ps1 -WithFrontend
```

Bash:

```bash
./scripts/start-dev.sh --with-frontend
```

Use `-SkipDependencies` or `--skip-deps` when MySQL already runs
outside the repository Compose stack. Both launchers expose additional port,
timeout and datasource options in their built-in help or parameter list.

The backend is available at `http://127.0.0.1:8080`; the frontend development
server defaults to `http://127.0.0.1:5173`.

## Manual backend startup

Manual startup requires a datasource, a JWT secret of at least 32 bytes and one
stable 32-byte credential-encryption key:

```powershell
Set-Location backend
$env:ZBOARD_ENVIRONMENT = "development"
$env:ZBOARD_DATA_SOURCE = "zboard:<password>@tcp(127.0.0.1:3306)/zboard?charset=utf8mb4&parseTime=true&loc=Local"
$env:ZBOARD_JWT_SECRET = "<at-least-32-random-bytes>"
$env:ZBOARD_CREDENTIAL_ENCRYPTION_KEY = "<32-random-bytes-as-base64-or-hex>"
go run ./cmd/zboard -f ./etc/zboard.yaml.example
```

On an empty database the service enters installation mode. Open `/setup` to
create the first administrator and finish site initialization.

The embedded SQL baseline is applied during startup. To run migrations without
starting the HTTP service, use `scripts/migrate.ps1` or `scripts/migrate.sh`.
See [database-migrations.md](/projects/zboard/reference/database-migrations) before opening an existing
development database with a newer build.

## Manual frontend startup

```powershell
Set-Location frontend
$env:VITE_API_BASE = "http://127.0.0.1:8080/api/v1"
pnpm install --frozen-lockfile
pnpm dev
```

On Bash-compatible shells:

```bash
cd frontend
VITE_API_BASE=http://127.0.0.1:8080/api/v1 pnpm install --frozen-lockfile
VITE_API_BASE=http://127.0.0.1:8080/api/v1 pnpm dev
```

## Verification

Run checks in proportion to the changed area. A complete local verification is:

```powershell
Set-Location backend
go test ./...
go vet ./...

Set-Location ..\frontend
pnpm test
pnpm build
```

`pnpm build` includes Vue and TypeScript type checking. API changes must also
update `backend/api/openapi.yaml` and its contract tests.

The repository also provides:

- `scripts/smoke-test.*` for a running service;
- `scripts/build-all.*` for combined backend and frontend builds;
- `scripts/check-go-version.*` and `scripts/sync-go-baseline.*` for toolchain
maintenance.

## Performance and stability verification

Run these commands from the repository root with the pinned Go toolchain
(`GO_BIN` can select its executable):

```bash
bash scripts/benchmark-accounting.sh local
bash scripts/benchmark-accounting.sh container
bash scripts/acceptance-mixed.sh
```

The accounting benchmark defaults to 100 batches per scenario and three runs;
`BENCH_TIME` and `BENCH_COUNT` override these settings. Container checks require
Docker. The mixed workload defaults to 10 nodes, 1,000 subscriptions, 100,000
historical records, four concurrent readers and 100 events/second for 300 seconds.
`DURATION_SECONDS`, `EVENT_RATE` and `READERS` select other workload profiles.
The application and database share the 1 CPU / 1 GiB budget; the load generator
runs outside it. The [roadmap](/projects/zboard/reference/history/roadmap#资源和性能预算) defines latency and memory
budgets. Also verify exact accounting under replay and reordering, no OOM,
explained failures and a fully drained backlog.

Real Zero revocation checks use isolated nodes and test credentials:

```bash
ZERO_ARTIFACT_DIR=/path/to/verified-linux-zero-artifact \
NODE_SCENARIO=expiry bash scripts/acceptance-node.sh
```

The artifact directory must contain `zero` and its matching `verification.json`.
Other scenarios are `exhaustion`, `group_change` and `recovery`. Verify data-plane
access after revocation and publication recovery, including existing connections;
control-plane status or a mock SSH server alone is insufficient. See also
[node publication](/projects/zboard/reference/node-config-delivery#重跑-mysql-验证) for real MySQL checks.

Keep raw logs, profiles, environment details, source/build hashes and per-run
reports under the ignored `.codex-local-artifacts/acceptance/` directory. A dirty
build needs source hashes as well as Git HEAD. Share selected evidence through
CI/release artifacts when needed, without committing workstation journals.

A 500-events/second, 60-second burst and a 24-hour soak are separate acceptance
profiles. Record fault injection, restarts, queue recovery and resource trends;
restart the soak clock after changing the build or resetting the environment.
Short runs do not establish long-term stability or production capacity.

## Restricted networks

`scripts/ensure-go-env.*` can install the pinned Go toolchain when it is
missing. Set `ZBOARD_GO_DOWNLOAD_BASE` to an approved mirror when direct
downloads from `go.dev` are unavailable. A preinstalled Go directory can be
selected with `ZBOARD_GOROOT_FALLBACK`.

Do not weaken production secrets or commit generated runtime configuration to
work around a local environment problem.
19 changes: 11 additions & 8 deletions docs/projects/zboard/contributing/index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# 参与 Zboard
# 参与 ZBoard

Zboard 的代码、版本规划和实现讨论维护在项目仓库中
ZBoard 专注于基础面板能力。扩展业务通过插件实现,贡献前请先确认功能属于面板本身还是插件

## 文档贡献

公开使用文档位于本仓库:
ZBoard 的使用指南、安装教程、插件说明和技术参考统一维护在 [zerodenet/docs](https://github.com/zerodenet/docs) 的 `docs/projects/zboard/`。产品仓库中的本地 `docs/` 不再参与版本管理,请直接向文档仓库提交修改。

- 修正文档错误;
- 补充部署和运维经验;
- 完善用户使用流程。
新增页面时同步更新侧边导航,并运行 `pnpm check:build` 验证链接与构建。

## 项目贡献
## 代码与插件贡献

开发、Issue 和技术讨论请访问 [Zboard 仓库](https://github.com/zerodenet/zboard)。
- [本地开发与检查命令](/projects/zboard/contributing/development)
- [插件开发接口](/projects/zboard/plugins/development)
- [插件治理与权限](/projects/zboard/plugins/governance)
- [技术参考](/projects/zboard/reference/)

产品代码、缺陷和功能讨论请提交到 [ZBoard 仓库](https://github.com/zerodenet/zboard)。文案、教程和链接问题请提交到文档仓库。
Loading
Loading