# Momentry 文檔索引 ## 核心文檔架構 所有文檔由 markbase-core (:11438) 的 CoreDoc 系統管理,源檔存放在 `~/markbase/` 和相關目錄。 --- ## 1. Core API 文檔 (markbase-core) ### 服務資訊 - **Port**: 11438 - **Binary**: `~/momentry/bin/markbase-core` - **Command**: `web-start` - **Health**: `http://localhost:11438/api/v2/health` ### API 端點 (131 routes) #### Auth | Method | Path | 說明 | |--------|------|------| | POST | `/api/v2/auth/login` | 登入 | | POST | `/api/v2/auth/logout` | 登出 | | GET | `/api/v2/auth/verify` | 驗證 token | #### Admin | Method | Path | 說明 | |--------|------|------| | POST | `/api/v2/admin/login` | 管理員登入 | | GET | `/api/v2/admin/verify` | 管理員驗證 | | GET/POST | `/api/v2/admin/users` | 使用者管理 | | GET | `/api/v2/admin/system-stats` | 系統統計 | | POST/GET | `/api/v2/admin/sync` | 同步 | #### File Tree | Method | Path | 說明 | |--------|------|------| | GET | `/api/v2/tree/:user_id` | 檔案樹 | | GET | `/api/v2/tree/:user_id/search` | 搜尋 | | POST | `/api/v2/tree/:user_id/node` | 建立節點 | | DELETE | `/api/v2/tree/:user_id/node/:node_id` | 刪除節點 | #### Files | Method | Path | 說明 | |--------|------|------| | GET | `/api/v2/files/:user_id` | 檔案列表 | | GET | `/api/v2/files/:user_id/:file_uuid/info` | 檔案資訊 | | POST | `/api/v2/upload/:user_id` | 上傳 | | POST | `/api/v2/unregister/:file_uuid` | 取消註冊 | #### MyFiles | Method | Path | 說明 | |--------|------|------| | GET | `/api/v2/myfiles/:username/folders` | 資料夾列表 | | GET | `/api/v2/myfiles/:username/files` | 檔案列表 | | POST | `/api/v2/myfiles/:username/tags` | 標籤 | #### S3 | Method | Path | 說明 | |--------|------|------| | GET | `/s3` | 列出 buckets | | GET | `/s3/:bucket/*key` | 下載 | | GET/PUT/DELETE | `/s3/policy/:bucket` | Policy 管理 | #### WebDAV | Method | Path | 說明 | |--------|------|------| | ANY | `/webdav/*path` | WebDAV | | ANY | `/admin-webdav/*path` | Admin WebDAV | #### Products/Downloads | Method | Path | 說明 | |--------|------|------| | GET | `/api/v2/products` | 產品列表 | | GET | `/api/v2/download/:file_id` | 下載 | #### Backup/Snapshots | Method | Path | 說明 | |--------|------|------| | GET/POST | `/api/v2/backup/config` | 備份配置 | | GET/POST/DELETE | `/api/v2/snapshots/:name` | 快照管理 | #### Settings | Method | Path | 說明 | |--------|------|------| | GET/POST | `/api/v2/settings` | 設定 | | GET | `/api/v2/mbe/models` | MBE 模型 | | GET/POST/DELETE | `/api/v2/search-sessions` | 搜尋 session | --- ## 2. CoreDoc 文檔系統 ### Base URL ``` http://localhost:11438/docs/ ``` ### 認證 - **方式**: HTTP Basic Auth - **User**: `admin` - **Pass**: `admin123` ### 端點 | Path | 說明 | 狀態 | |------|------|------| | `/docs/` | CoreDoc 首頁 | ✅ | | `/docs/legacy/` | 舊版 WASM 文檔 | ⚠️ Deprecated | | `/docs/api/` | API 文檔 | ✅ Active | | `/docs/cli/` | CLI 文檔 | ✅ Active | ### 文檔分類 #### Legacy WASM System - 位置: `momentry_core/docs_v1.0/doc_wasm/` - 狀態: 已棄用但可用 - 用途: 向後相容 #### New Modular System - **API Workspace**: `momentry_core/docs_v1.0/API_WORKSPACE/` - **CLI Workspace**: `momentry_core/docs_v1.0/CLI_WORKSPACE/` --- ## 3. markbase 文檔 (223 files) ### Core API 文檔 (`~/markbase/docs/core-doc/`) | 檔案 | 說明 | |------|------| | `README.md` | CoreDoc 系統概述 | | `ARCHITECTURE.md` | 雙系統架構說明 | | `API_REFERENCE.md` | CoreDoc API 完整參考 | | `QUICK_START.md` | 快速開始指南 | | `DIRECTORY_STRUCTURE.md` | 目錄結構 | | `INTEGRATION_GUIDE.md` | 整合指南 | | `INTEGRATION_REPORT.md` | 整合報告 | | `MAINTENANCE_GUIDE.md` | 維護指南 | ### FSKit 文檔 (`~/markbase/MarkBaseFS/docs/`) | 檔案 | 說明 | |------|------| | `API_DOCUMENTATION.md` | FSKit API 文檔 | | `FSKIT_MODULE_USER_GUIDE.md` | 模組使用指南 | | `FSKIT_MODULE_INSTALLATION.md` | 安裝指南 | | `PHASE2-4_SUMMARY.md` | 各階段總結 | | `PROJECT_FINAL_SUMMARY.md` | 專案最終總結 | ### FSKit Research (`~/markbase/docs/fskit-research/`) - `FSKIT_API.md`, `FSKIT_REAL_API.md` - `ZFS_MVP_ARCHITECTURE.md`, `ZFS_MVP_DESIGN.md` ### SSH 文檔 (30+ files) - Phase 1-9 完整實錄 - SSH2 Refactor Plan - Security Audit Report ### FUSE 文檔 (14 files) - Phase 1-2 完成報告 - Mount Debug & Diagnosis ### 資料庫文檔 - `DATABASE_EVALUATION.md` - `DATABASE_COMPARISON_QUICKREF.md` - `SLED_DATABASE.md` ### WASM 分析 - `WASM_ANALYSIS.md` — WASM 在 MarkBase 的適用性分析 --- ## 4. markbaseengine 文檔 ### 源碼目錄 (`~/markbaseengine_service/`) - `功能概述.md` — 功能概覽 - `支持模型列表.md` — 支持的模型 - `大模型支持分析.md` — 大型模型分析 - `26B/31B 測試報告` — 多個測試文檔 - `MOE_*` — MOE 架構相關文檔 - `OPTIMIZATION_*` — 優化相關文檔 ### API - **Port**: 8082 - **Config**: `~/momentry/config/markbaseengine.json` - **Endpoints**: OpenAI-compatible (`/v1/models`, `/v1/chat/completions`, `/v1/completions`) --- ## 5. momentry_core 文檔 ### 位置 - `~/momentry_core/` — 源碼 (Gitea: warren/momentry_core) - `~/momentry_core/docs_v1.0/` — CoreDoc 文檔源 --- ## 6. momentry_studio 文檔 ### 位置 - `~/momentry_studio/` — 源碼 (Gitea: warren/momentry_studio) - `~/momentry_studio/src-tauri/` — Tauri Rust 後端 - `~/momentry_studio/dist/` — 前端構建產物 --- ## 7. 部署文檔 ### 位置 - `~/momentry/docs/deployment/` — 部署指南 - `~/momentry/docs/deployment/ARCHITECTURE.md` — 系統架構 - `~/momentry/docs/deployment/DEPLOYMENT_GUIDE.md` — 部署指南 --- ## 8. Gitea 倉庫文檔 ### Repo: `warren/environment` (~/admin/environment) - `caddy/m4mini.Caddyfile` — 反向代理配置 - `machines/` — 三台機器文檔 - `docs-index.md` — 此文檔 --- ## 文件系統映射 (MarkBase 納管) ``` MarkBase (:11438) 納管的目錄: ├── /Users/accusys/momentry/var/sftpgo/data/ ← 上傳的影片檔 ├── /Users/accusys/markbase/ ← 源碼 + 文檔 ├── /Users/accusys/momentry_core/ ← 核心源碼 ├── /Users/accusys/momentry_studio/ ← Studio 源碼 └── /Users/accusys/markbaseengine_service/ ← Engine 源碼 ```