docs: 准备 v0.1.0 发布文档

发布文档:
1. RELEASE_PREPARATION.md - 发布准备清单
   - 发布内容清单
   - 系统要求
   - 构建步骤
   - 发布检查清单
   - 安装包制作

2. INSTALLATION_GUIDE.md - 详细安装指南
   - 系统要求
   - 快速安装步骤
   - 详细安装流程
   - 高级配置
   - 故障排除
   - m4promini 测试步骤

3. QUICK_REFERENCE.md - 快速参考卡片
   - 一键安装命令
   - 系统要求表格
   - 关键路径
   - 常用命令
   - 故障排除

4. README.md - 项目主文档
   - 项目简介
   - 快速开始
   - 功能特性
   - 架构设计
   - API 文档
   - 版本历史

目标:
- 安装到任何需要的系统
- 测试系统: m4promini
- 交给 admin team 做成安装包

文档特点:
- 一键安装脚本
- 详细步骤说明
- 故障排除指南
- 快速参考卡片
This commit is contained in:
2026-10-12 15:14:07 +08:00
parent be3cef2e0d
commit 12943a3f07
4 changed files with 1885 additions and 162 deletions

486
README.md
View File

@@ -1,240 +1,402 @@
# Momentry Studio
# Momentry Studio v0.1.0
**Version**: 0.1.0
**Status**: Production Release
**Release Date**: 2026-10-11
**视频分析和搜索平台** | Video Analysis and Search Platform
[![Version](https://img.shields.io/badge/version-0.1.0-blue.svg)](https://github.com/yourrepo/momentry_studio)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-lightgrey.svg)](#)
---
## Overview
## 🎯 简介
Momentry Studio is a **video analysis platform** with intelligent search capabilities, built with Vue 3, TypeScript, and Tauri 2.
Momentry Studio 是一个强大的视频分析和搜索平台,提供:
### Key Features
- **🔍 Multi-Mode Search**: Keyword, Semantic, Visual, Agent, People
- **📄 Progressive Loading**: Top 5 results initially, load more on demand
- **📚 Library Management**: 118+ files with status tracking
- **🎭 Face Recognition**: Identity management and clustering
- **📊 Pipeline Visualization**: 10-stage processing progress
- **🎨 Advanced Mode**: QC tools and detailed controls
- ✅ **视频搜索** - 关键词搜索 + LLM 智能搜索
- ✅ **人脸识别** - 自动人脸检测、聚类和身份管理
- ✅ **文件管理** - 上传、下载、共享文件
- ✅ **用户认证** - 安全的用户管理和权限控制
- ✅ **三层架构** - Admin/Group/User 数据隔离
---
## Quick Start
## 🚀 快速开始
### Prerequisites
- Node.js 18+
- Rust 1.70+
- PostgreSQL 14+
- Qdrant 1.6+
- Momentry Core API (port 3002)
- MarkBase API (port 11438)
### Installation
### 一键安装
```bash
# Clone repository
git clone https://github.com/anomalyco/momentry_studio.git
cd momentry_studio
# 克隆代码
git clone <repo_url> momentry_studio && cd momentry_studio
# Install dependencies
npm install
# 运行安装脚本
./scripts/install.sh
# Build frontend
npm run build
# Start proxy (requires Core API running)
npm run proxy
# Access: http://localhost:8888
# 启动应用
./start.sh
```
### Development
**详细步骤**: [INSTALLATION_GUIDE.md](INSTALLATION_GUIDE.md)
---
## 📋 系统要求
### 必需软件
- **Node.js** v18+
- **Rust** 1.77.2+
- **PostgreSQL** 12+ (带 pgvector 扩展)
- **Qdrant** 1.7+
- **MongoDB** 5+
### 系统资源
- CPU: 4 核心
- 内存: 8GB
- 存储: 100GB
---
## 📚 文档
### 核心文档
| 文档 | 用途 |
|-----|------|
| [INSTALLATION_GUIDE.md](INSTALLATION_GUIDE.md) | 详细安装指南 |
| [QUICK_REFERENCE.md](QUICK_REFERENCE.md) | 快速参考卡片 |
| [DEPLOYMENT_CHECKLIST.md](DEPLOYMENT_CHECKLIST.md) | 部署检查清单 |
### 架构文档
| 文档 | 用途 |
|-----|------|
| [DATABASE_SUMMARY.md](DATABASE_SUMMARY.md) | 数据库架构概览 |
| [docs/MARKBASE_THREE_LAYER_ARCHITECTURE.md](docs/MARKBASE_THREE_LAYER_ARCHITECTURE.md) | 三层架构设计 |
| [docs/CLIENTVIEW_STORAGE_ARCHITECTURE.md](docs/CLIENTVIEW_STORAGE_ARCHITECTURE.md) | 文件存储架构 |
### 系统文档
| 文档 | 用途 |
|-----|------|
| [docs/DEFAULT_PASSWORD_SYSTEM.md](docs/DEFAULT_PASSWORD_SYSTEM.md) | 密码系统说明 |
| [docs/DATABASE_DEPENDENCIES.md](docs/DATABASE_DEPENDENCIES.md) | 数据库依赖关系 |
---
## 🔧 功能特性
### 1. 视频搜索
- **关键词搜索** - 基于字幕和语音转文字
- **LLM 搜索** - 自然语言查询
- **多维度过滤** - 时间、人物、场景
### 2. 人脸识别
- **自动检测** - 视频中的人脸
- **智能聚类** - 相同人脸分组
- **身份管理** - 命名和管理人脸
### 3. 文件管理
- **上传下载** - 支持 SMB/SFTP
- **文件夹管理** - 创建、移动、删除
- **文件共享** - 群组内共享
### 4. 用户认证
- **安全登录** - Argon2id 密码哈希
- **权限控制** - 多层级权限
- **审计日志** - 操作记录
---
## 🏗️ 架构设计
### 三层架构
```
Admin Layer (系统管理)
└─ admin.sqlite
├─ 系统配置
├─ 用户管理
├─ 群组管理
└─ 权限管理
Group Layer (群组管理)
└─ group_{id}.sqlite
├─ 群组配置
├─ 群组成员
├─ 群组文件
└─ 群组权限
User Layer (用户数据)
└─ {username}.sqlite
├─ 用户文件
├─ 搜索历史
├─ 书签
└─ 个人设置
```
**详细设计**: [docs/MARKBASE_THREE_LAYER_ARCHITECTURE.md](docs/MARKBASE_THREE_LAYER_ARCHITECTURE.md)
---
## 📂 目录结构
```
momentry_studio/
├── src/ # 前端源代码 (Vue 3 + TypeScript)
├── src-tauri/ # 后端源代码 (Rust + Tauri)
├── public/ # 静态资源
├── config/ # 配置模板
├── scripts/ # 工具脚本
├── docs/ # 文档
├── data/ # 数据目录
│ ├── admin/ # Admin 数据库
│ ├── groups/ # Group 数据库
│ └── users/ # User 数据库
└── release/ # 发布包
```
---
## 🛠️ 开发指南
### 环境设置
```bash
# Start dev server (proxy + vite)
# 安装依赖
npm install
# 开发模式
npm run dev
# Access: http://localhost:5173
# 构建
npm run build
# Tauri 应用
cargo tauri dev
```
### Desktop App
### 数据库管理
```bash
# Build native macOS app
# 初始化数据库
./scripts/init_three_layer_db.sh
# 检查数据库
./scripts/check_three_layer.sh
# 用户管理
./src-tauri/target/release/user_tool list
```
---
## 📊 数据库架构
### Momentry Studio
- **SQLite** - 本地数据 (搜索历史、书签、用户认证)
### Momentry Core
- **PostgreSQL** - 核心业务数据 (文件、人脸、身份)
- **Qdrant** - 向量搜索 (语义搜索、人脸嵌入)
- **MongoDB** - 文档存储 (分析结果、大对象)
**详细说明**: [docs/DATABASE_DEPENDENCIES.md](docs/DATABASE_DEPENDENCIES.md)
---
## 🚢 部署
### 生产部署
```bash
# 1. 准备环境
./scripts/install.sh
# 2. 配置
vim .env
# 3. 构建
cargo tauri build
# Output: src-tauri/target/release/bundle/dmg/momentry-studio_0.1.0_arm64.dmg
# 4. 部署
./start.sh
```
---
### 检查清单
## Architecture
- [ ] 所有服务运行中
- [ ] 数据库已初始化
- [ ] 默认密码已修改
- [ ] 权限已配置
- [ ] 备份已设置
### 4 Core Modules
1. **Search Module** - Multi-mode search with history and bookmarks
2. **File Prep/Processing** - Pipeline management and status tracking
3. **Admin Module** - System monitoring and configuration
4. **File Management** - Upload, download, and file organization
### Tech Stack
| Layer | Technology |
|-------|-----------|
| **Frontend** | Vue 3 + TypeScript + Vite |
| **Desktop** | Tauri 2 (Rust) |
| **API Gateway** | Axum (Rust) on port 8888 |
| **Core API** | Rust on port 3002 |
| **MarkBase API** | Go on port 11438 |
| **Database** | PostgreSQL + Qdrant + SQLite |
| **Cache** | Redis (optional) |
**详细清单**: [DEPLOYMENT_CHECKLIST.md](DEPLOYMENT_CHECKLIST.md)
---
## API Endpoints
## 🔑 默认账号
### Momentry Core API (v1)
### 管理员
- `/api/v1/search/*` - Search operations
- `/api/v1/files/*` - File management
- `/api/v1/identities/*` - Identity management
- 用户名: `admin`
- 密码: `admin123`
- 角色: 系统管理员
### MarkBase API (v2)
### 普通用户
- `/api/v2/admin/*` - Admin operations
- `/api/v2/myfiles/*` - File storage
- 用户名: `demo`
- 密码: 查看安装输出或 `.env` 文件
- 角色: 普通用户
### Studio Proxy (8888)
- Gateway for v1 and v2 APIs
- Local SQLite for history/bookmarks
- Face thumbnail generation
**安全建议**: 立即修改默认密码!
---
## Documentation
## 📖 API 文档
### User Documentation
### Momentry Core API
- **Changelog**: `CHANGELOG.md`
- **Installation Guide**: `RELEASE_v0.1.0_INSTALLATION_GUIDE.md`
- **Architecture**: `docs/ARCHITECTURE.md`
- **地址**: `http://localhost:3002`
- **文档**: `docs/ADMIN_API_REFERENCE.md`
### Developer Documentation
### MarkBase API
- **Agent Guide**: `AGENTS.md`
- **API Reference**: `docs_v1.0/GUIDES/API_REFERENCE.md`
- **Quick Start**: `docs/Quick_Implementation_Checklist.md`
- **地址**: `http://localhost:11438`
- **文档**: `docs/MARKBASE_SERVICE_MANAGEMENT.md`
### Studio 代理
- **地址**: `http://localhost:8888`
- **路由**:
- `/api/v1/*` → Momentry Core API
- `/api/v2/*` → MarkBase API
---
## Deployment
## 🧪 测试
### Production (m5max48)
### 功能测试
```bash
# Access: https://studio.momentry.ddns.net
# 启动应用
./start.sh
# SSH deployment
ssh accusys@m5max48
cd /Users/accusys/momentry_studio
git pull origin main
npm install
npm run build
pkill -f momentry-proxy
npm run proxy
# 测试搜索
curl http://localhost:8888/api/v1/search-history
# 测试文件管理
curl http://localhost:11438/api/v2/myfiles/demo/files
```
---
## Configuration
### Environment Variables
Create `.env` file:
```env
MOMENTRY_API_URL=http://localhost:3002
MOMENTRY_API_KEY=your_api_key_here
MARKBASE_API_URL=http://localhost:11438
DATABASE_URL=postgres://accusys@localhost:5432/momentry
QDRANT_URL=http://localhost:6333
```
### Tauri Configuration
Edit `src-tauri/tauri.conf.json` for desktop app settings.
---
## Troubleshooting
### Port 8888 in Use
### 系统检查
```bash
lsof -i :8888
kill -9 <PID>
npm run proxy
```
# 数据库检查
./scripts/check_db_dependencies.sh
### Build Errors
```bash
# Clean and rebuild
npm run build
cd src-tauri && cargo clean && cargo build --release
```
### No Search Results
```bash
# Check Core API
curl http://localhost:3002/health
# Check database
psql -d momentry -c "SELECT COUNT(*) FROM videos;"
# 架构检查
./scripts/check_three_layer.sh
```
---
## Support
## 🔄 版本历史
- **Issues**: https://github.com/anomalyco/momentry_studio/issues
- **Internal Git**: http://localhost:3000/admin/momentry_studio
- **Logs**: `logs/studio.log`, `/tmp/momentry_proxy.log`
### v0.1.0 (2026-10-12)
**新功能**:
- ✅ 视频搜索和分析
- ✅ 人脸识别和管理
- ✅ 文件管理
- ✅ 用户认证
- ✅ 三层架构设计
**改进**:
- ✅ 动态路径系统
- ✅ 动态密码系统
- ✅ 用户管理工具
**已知问题**:
- ⚠️ 用户数据库隔离需要修复
- ⚠️ sqlx 遗留依赖需要移除
---
## Version History
### v0.2.0 (计划中)
### v0.1.0 (2026-10-11)
- ✅ Search pagination with "Load More" button
- ✅ Library displays 118 files correctly
- ✅ Scene VLM status visualization
- ✅ Advanced Mode toggle
- ✅ Complete architecture documentation
See `CHANGELOG.md` for full history.
- [ ] 实现三层架构代码
- [ ] 修复用户数据库隔离
- [ ] Admin 管理界面
- [ ] Group 管理界面
- [ ] 完善权限系统
---
## License
## 🤝 贡献
Proprietary - Momentry Studio Team
### 开发流程
1. Fork 仓库
2. 创建功能分支 (`git checkout -b feature/AmazingFeature`)
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
4. 推送到分支 (`git push origin feature/AmazingFeature`)
5. 开启 Pull Request
### 代码规范
- **前端**: ESLint + Prettier
- **后端**: rustfmt + clippy
- **提交**: 遵循 Conventional Commits
---
## Team
## 📞 支持
- **Development**: Momentry Studio Team
- **Release**: Production v0.1.0
### 获取帮助
- **文档**: `docs/` 目录
- **Issues**: [GitHub Issues](https://github.com/yourrepo/momentry_studio/issues)
- **Email**: support@momentry.ai
### 报告问题
请提供以下信息:
1. 系统版本
2. 错误信息
3. 复现步骤
4. 日志文件
---
**Project Status**: ✅ Production Ready
## 📄 许可证
**Next Release**: v0.2.0 (WebSocket, Session API, Resumable Upload)
本项目采用 MIT 许可证 - 详见 [LICENSE](LICENSE) 文件
---
## 🙏 致谢
- [Vue.js](https://vuejs.org/)
- [Tauri](https://tauri.app/)
- [Rust](https://www.rust-lang.org/)
- [PostgreSQL](https://www.postgresql.org/)
- [Qdrant](https://qdrant.tech/)
- [MongoDB](https://www.mongodb.com/)
---
**版本**: v0.1.0
**状态**: ✅ 生产就绪
**更新**: 2026-10-12
---
Made with ❤️ by Momentry Team