feat: cut over rust web main shell

This commit is contained in:
lix-2026
2026-04-29 12:24:44 +08:00
parent 7965c6c107
commit 048fe28a4d
97 changed files with 9396 additions and 1263 deletions
+10 -6
View File
@@ -1,6 +1,6 @@
# MNOTE 当前架构梳理
> 更新时间:2026-04-23
> 更新时间:2026-04-28
本文只描述当前仓库中真实成立的主线结构,以及当前最优先的架构收口点。
@@ -16,7 +16,7 @@
1. `tree-first graph kernel` 是长期对象真相层
2. `Convex` 继续保留为当前自托管存储 / 实时 / 文件协作底座
3. `mnote-web` 是当前 Rust Web 承载层,负责 query / command / projection / transport,但 `3000` 已是唯一前端公开入口;`3104` 已退役为仅显式 debug/internal 使用的边界,`/tree``/document-debug` 等 debug 壳默认关闭,只在显式 debug 场景启用
3. `mnote-web` 是当前 Rust Web 主执行面,负责 3000 gateway、server-first shell、query / command / projection / transport 与 realtime streamNext App Router 已降为 legacy compat / island bundle source,不再是当前主入口
4. 文档页默认主编辑器已切到页面内 `leptos-tiptap` island
5. `BlockNote` 当前保留为 fallback / 对照链,不再代表默认主编辑器方向
@@ -24,16 +24,20 @@
> **Rust 持有语义主导权,Convex 保留底座,前端逐步从重壳转向消费稳定 projection 与少量交互 island。**
补充口径:
> **主 Web 执行面当前以 `mnote-web` 为 3000 ownerNext App Router 只保留为 legacy compat、交互 island bundle source 与显式 debug/迁移辅助边界。**
## 2. 当前主线目录
- `/mnt/Data1T/mnote/wolai-frontend/`
当前主前端,Next.js App Router,文档页、Sidebar、搜索、OnlyOffice 页面都在这里
当前 React island 与 legacy compat 代码来源;Next.js App Router 不再作为 3000 主入口,只在显式 legacy/debug 迁移边界继续服务重交互运行态与对照链
- `/mnt/Data1T/mnote/rust/crates/core-protocol/`
Kernel 类型、projection 协议、编辑器协议、树 / 图核心术语。
- `/mnt/Data1T/mnote/rust/crates/bridge-runtime/`
Kernel query / command、bridge transport、Tiptap <-> editor document 适配、命令解释层。
- `/mnt/Data1T/mnote/rust/crates/mnote-web/`
Rust Web route、kernel projection、documents route、stream transport、compat,以及显式开启时的 debug shell。
Rust Web route、kernel projection、documents/search/mindmap shell、Hermes bridge、stream transport、compat,以及显式开启时的 debug shell;它是当前主 Web gateway / shell / transport owner
- `/mnt/Data1T/mnote/wolai-frontend/convex/`
仍在使用的 Convex functions 与数据侧逻辑。
- `/mnt/Data1T/mnote/infra/convex/`
@@ -204,11 +208,11 @@
- tree stream
- preferred snapshot 选择
正式的 snapshot + delta 主链还没有完全成为唯一事实来源
正式的 snapshot + delta 主链已经固定到 `mnote-web``/api/tree/events`Next `/api/mnote-web/stream` 只保留 compat alias
因此当前正确表述应是:
> **树域已经开始消费 Rust projection 与 tree stream,但实时主链仍处于从补偿式 freshness 选择向正式 realtime contract 过渡的阶段。**
> **树域 realtime 主链由 Rust Web `/api/tree/events` 持有,前端只消费稳定 stream contract 与 projection。**
## 7. Mindmap 与 OnlyOffice