SkillAgentSearch skills...

FlowRust

Write a cross-platform, multifunctional CMS in Rust, supporting content such as videos, audio, image galleries, and comics. RUST编写全平台多功能CMS,支持视频、音频、图集漫画等内容。

Install / Use

/learn @TFTG-CLOUD/FlowRust
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

FlowRust CMS

FlowRust CMS

Video Screenshot

Project Demo Video

🚀 Project Introduction / 项目简介

FlowRust CMS is a high-performance multi-functional content management system (CMS) developed in Rust language, compatible with Mac CMS 10 collection APIs, focusing on performance, concurrent processing, and memory management, supporting various content forms including videos, audio, and image galleries.

FlowRust CMS 是基于 Rust 语言开发的高性能多功能内容管理系统(CMS),兼容苹果 CMS 10 采集接口,注重性能、并发处理和内存管理,支持视频、音频和图集漫画等多种内容形式。

It comes with a complete multi-server system for storage + multimedia processing (audio, video, images, archives): https://github.com/TFTG-CLOUD/cms-back. The CMS can connect to unlimited processing servers for unlimited scaling and horizontal expansion, supporting expansion for videos, audio, and image galleries.

拥有配套的完整储存+多媒体处理(音频,视频,图片,压缩包)的多服务器系统:https://github.com/TFTG-CLOUD/cms-back CMS 可对接无限个处理服务器,无限扩容,支持水平扩展,无论是视频、音频,图集漫画都能扩展。

✨ Core Advantages / 核心优势

  • 🔥 Extreme Performance: Under the same server configuration, concurrent processing capability is 10x+ that of traditional PHP CMS

  • 🛡️ Memory Safety: Guaranteed by Rust language, eliminating memory leaks and buffer overflows

  • ⚡ Async Architecture: Based on Tokio and Actix Web, supporting high-concurrency I/O operations

  • 📊 Real-time Monitoring: Built-in task progress monitoring and performance statistics

  • 🎯 Backward Compatibility: Fully compatible with Mac CMS database structure and APIs

  • 🔥 极致性能: 相同配置服务器下,并发处理能力是传统 PHP CMS 的 10 倍以上

  • 🛡️ 内存安全: Rust 语言保障,杜绝内存泄漏和缓冲区溢出

  • ⚡ 异步架构: 基于 Tokio 和 Actix Web,支持高并发 I/O 操作

  • 📊 实时监控: 内置任务进度监控和性能统计

  • 🎯 向后兼容: 完全兼容苹果 CMS 数据库结构和 API

📋 System Requirements / 系统要求

  • Operating System: Linux/macOS/Windows

  • Memory: Minimum 512MB, Recommended 2GB+

  • Storage: Minimum 1GB available space

  • Database: MongoDB 4.0+

  • Network: Support for high-concurrency connections

  • 操作系统: Linux/macOS/Windows

  • 内存: 最低 512MB,推荐 2GB+

  • 存储: 最低 1GB 可用空间

  • 数据库: MongoDB 4.0+

  • 网络: 支持高并发连接

🚀 Quick Start / 快速开始

For production environments, it's recommended to install MongoDB first and then use the Release package for installation.

如果是生产环境,建议安装了 mongodb 之后,直接使用 Release 包安装。

1. Environment Setup / 环境准备

# Install Rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install MongoDB (Ubuntu/Debian)
sudo apt-get install gnupg curl
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
   --dearmor

# Ubuntu 22.04 other versions refer to official documentation
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list

sudo apt update
sudo apt-get install -y mongodb-org

# Start MongoDB
sudo systemctl start mongod
# 安装 Rust 工具链
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# 安装 MongoDB (Ubuntu/Debian)
sudo apt-get install gnupg curl
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
   --dearmor

# Ubuntu 22.04 其他版本参考官方文档
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list

sudo apt update
sudo apt-get install -y mongodb-org

# 启动 MongoDB
sudo systemctl start mongod

2. Clone Project / 克隆项目

git clone https://github.com/TFTG-CLOUD/FlowRust
cd FlowRust

3. Configure Environment Variables / 配置环境变量

# Edit configuration file
nano .env

Environment variable configuration example:

环境变量配置示例:

# Database connection
DATABASE_URL=mongodb://localhost:27017
DATABASE_NAME=flowrust_cms

# Server configuration
SERVER_HOST=127.0.0.1
SERVER_PORT=8080

# Admin account
ADMIN_USER=admin
ADMIN_PASS=your_secure_password

# Session secret key
SESSION_SECRET_KEY=your_session_secret_key
# 数据库连接
DATABASE_URL=mongodb://localhost:27017
DATABASE_NAME=flowrust_cms

# 服务器配置
SERVER_HOST=127.0.0.1
SERVER_PORT=8080

# 管理员账户
ADMIN_USER=admin
ADMIN_PASS=your_secure_password

# 会话密钥
SESSION_SECRET_KEY=your_session_secret_key

4. Build and Run / 编译运行

# Run in development mode
cargo run

# Compile in production mode
cargo build --release

# Copy production version to root directory
cp target/release/flowrust_cms ../../

# Run production version
./flowrust_cms
# 开发模式运行
cargo run

# 生产模式编译
cargo build --release

# 复制生产版本到根目录
cp target/release/flowrust_cms ../../

# 运行生产版本
./flowrust_cms

5. Access System / 访问系统

  • Frontend: http://localhost:8080

  • Admin Backend: http://localhost:8080/admin

  • API Endpoints: http://localhost:8080/api

  • 前台页面: http://localhost:8080

  • 管理后台: http://localhost:8080/admin

  • API 接口: http://localhost:8080/api

🏗️ System Architecture / 系统架构

Technology Stack / 技术栈

  • Backend Framework: Actix Web 4.x

  • Async Runtime: Tokio 1.x

  • Database: MongoDB 8.x

  • Template Engine: Tera 1.x

  • Serialization: Serde + Serde JSON

  • Password Encryption: bcrypt

  • HTTP Client: reqwest

  • Image Processing: image + webp

  • 后端框架: Actix Web 4.x

  • 异步运行时: Tokio 1.x

  • 数据库: MongoDB 8.x

  • 模板引擎: Tera 1.x

  • 序列化: Serde + Serde JSON

  • 密码加密: bcrypt

  • HTTP 客户端: reqwest

  • 图片处理: image + webp

Project Structure / 项目结构

src/
├── main.rs              # Application entry point
├── models.rs            # Data models (Vod, Type, Collection, Binding, Config, etc.)
├── api_handlers.rs      # Frontend API interface handlers
├── web_handlers.rs      # Web page handlers
├── admin_handlers.rs    # Admin backend API handlers
├── collect_handlers.rs  # Collection function handlers
├── db.rs                # Database connection
├── auth.rs              # Authentication module
├── dto.rs               # Data transfer objects
├── template.rs          # Template rendering
├── index_manager.rs     # Index management
├── init_data.rs         # Initial data
└── site_data.rs         # Site data cache management
src/
├── main.rs              # 应用入口
├── models.rs            # 数据模型(Vod、Type、Collection、Binding、Config等)
├── api_handlers.rs      # 前台API接口处理器
├── web_handlers.rs      # Web页面处理器
├── admin_handlers.rs    # 管理后台API处理器
├── collect_handlers.rs  # 采集功能处理器
├── db.rs                # 数据库连接
├── auth.rs              # 认证模块
├── dto.rs               # 数据传输对象
├── template.rs          # 模板渲染
├── index_manager.rs     # 索引管理
├── init_data.rs         # 初始数据
└── site_data.rs         # 站点数据缓存管理

🔧 Core Features / 核心功能

1. Video Management / 视频管理

  • ✅ Video CRUD operations

  • ✅ Batch operations

  • ✅ Status management (Published/Pending Review/Disabled)

  • ✅ Category management

  • ✅ Advanced search and filtering

  • ✅ Pagination support (20-100 items per page)

  • ✅ Sorting functionality

  • ✅ 视频增删改查

  • ✅ 批量操作

  • ✅ 状态管理(已发布/待审核/已禁用)

  • ✅ 分类管理

  • ✅ 高级搜索和筛选

  • ✅ 分页显示(支持每页 20-100 条)

  • ✅ 排序功能

2. Category Management / 分类管理

  • ✅ Multi-level category support

  • ✅ Category binding

  • ✅ Sorting and status control

  • ✅ Template configuration

  • ✅ 多级分类支持

  • ✅ 分类绑定

  • ✅ 排序和状态控制

  • ✅ 模板配置

3. Collection System / 采集系统

  • ✅ Multi-source collection support

  • ✅ Real-time task monitoring

  • ✅ Batch collection

  • ✅ Image localization

  • ✅ WebP format conversion

  • ✅ Retry mechanism

  • ✅ Progress tracking

  • ✅ 多源采集支持

  • ✅ 实时任务监控

  • ✅ 批量采集

  • ✅ 图片本地化

  • ✅ WebP 格式转换

  • ✅ 重试机制

  • ✅ 进度追踪

4. Playback Source Management / 播放源管理

  • ✅ Multi-playback source support

  • ✅ Playback URL parsing

  • ✅ Source status monitoring

  • ✅ Automatic switching

  • ✅ 多播放源支持

  • ✅ 播放地址解析

  • ✅ 源状态监控

  • ✅ 自动切换

5. User System / 用户系统

  • ✅ Admin login

  • ✅ Session management

  • ✅ Permission control

  • ✅ Security authentication

  • ✅ 管理员登录

  • ✅ 会话管理

  • ✅ 权限控制

  • ✅ 安全认证

6. System Configuration / 系统配置

  • ✅ Website configuration

  • ✅ Collection configuration

  • ✅ Playback configuration

  • ✅ Template configuration

  • ✅ 网站配置

  • ✅ 采集配置

  • ✅ 播放配置

  • ✅ 模板配置

📊 Performance Comparison / 性能对比

Benchmark Environment / 基准测试环境

  • Server: 4-core 8GB RAM VPS

  • Database: MongoDB 8.0

  • Testing Tool: Apache Bench (ab)

  • Concurrency: 1000

  • Requests: 10000

  • 服务器: 4 核 8GB 内存 VPS

  • 数据库: MongoDB 8.0

  • 测试工具: Apache Bench (ab)

  • 并发数: 1000

  • 请求数: 10000

Performance Metrics / 性能指标

Actually, the performance of the FlowRust version is even higher than shown in the chart!

实际上,FlowRust 版本的性能要比图示的更高!

| Metric / 指标 | Traditional PHP CMS | FlowRust CMS | Improvement / 提升倍数 | | ------------------------------------ | ------------------- | ------------ | ---------------------- | | Concurrent Processing / 并发处理能力 | ~100 QPS | ~1200 QPS | 12x | | Memory Usage / 内存使用 | ~512MB | ~128MB | 4x | | Response Time / 响应时间 | ~200ms | ~15ms | 13x | | CPU Usage / CPU 使用率 | ~80% | ~25% | 3.2x | | Database Queries / 数据库查询 | ~50ms | ~5ms | 10x |

Performance Optimization Techniques / 性能优化技术

  1. Async I/O: Non-blocking I/O based on Tokio

  2. Connection Pool: MongoDB connection pool optimization

  3. Memory Management: Rust zero-cost abstractions

  4. Index Optimization: Automatic database index management

  5. Caching Strategy: Intelligent caching mechanism

  6. Concurrency Model: Actor model concurrent processing

  7. 异步 I/O: 基于 Tokio 的非阻塞 I/O

  8. 连接池: MongoDB 连接池优化

View on GitHub
GitHub Stars16
CategoryCustomer
Updated9d ago
Forks2

Languages

HTML

Security Score

95/100

Audited on Mar 24, 2026

No findings