An open API service indexing awesome lists of open source software.

https://github.com/jeanlyn/mpfm

A multi-protocol file storage manager client (S3/FTP/...) that support MacOS/Windows/Linux
https://github.com/jeanlyn/mpfm

Last synced: 6 months ago
JSON representation

A multi-protocol file storage manager client (S3/FTP/...) that support MacOS/Windows/Linux

Awesome Lists containing this project

README

          

# Multi-Protocol File Manager (MPFM)

[๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡](README_zh.md) | **๐Ÿ‡บ๐Ÿ‡ธ English**

A cross-platform multi-protocol file manager based on [Apache OpenDALโ„ข](https://opendal.apache.org/), providing both command-line interface and graphical interface.

## ๐Ÿ“‹ Features

- ๐ŸŒ **Multi-Protocol Support**: Support for local filesystem, S3-compatible storage, FTP and other protocols
- ๐Ÿ–ฅ๏ธ **Dual Interface**: Provides both command-line tools and modern graphical interface
- ๐Ÿ”ง **Connection Management**: Save and manage multiple storage connection configurations
- ๐Ÿ“ **Complete File Operations**: Support for file/directory listing, upload, download, delete, create, and more
- ๐Ÿš€ **Cross-Platform**: Support for Windows, Linux, and macOS
- โšก **High Performance**: Built with Rust, featuring async I/O operations

## ๐Ÿ“š Documentation

- [Quick Start Guide (English)](docs/QUICK_START_EN.md) | [ๅฟซ้€Ÿๅผ€ๅง‹ๆŒ‡ๅ— (ไธญๆ–‡)](docs/QUICK_START.md)
- [Adding New Protocol Support (English)](docs/ADDING_NEW_PROTOCOL_EN.md) | [ๆ–ฐๅขžๅ่ฎฎๆ”ฏๆŒๆŒ‡ๅ— (ไธญๆ–‡)](docs/ADDING_NEW_PROTOCOL_ZH.md)
- [FTP Testing Guide](tests/FTP_TEST_README.md)
- [Architecture Overview](docs/ARCHITECTURE.md)

## ๐Ÿ“ธ Demo

### Main Interface Preview

![MPFM Main Interface](image/mpfm_main.png)

*Multi-Protocol File Manager Main Interface - Unified file management experience supporting multiple storage protocols*

## ๐Ÿ—๏ธ Project Architecture

### Overall Structure

```
mpfm/
โ”œโ”€โ”€ ๐Ÿ“ src/ # Rust backend source code
โ”‚ โ”œโ”€โ”€ main.rs # Tauri GUI entry point
โ”‚ โ”œโ”€โ”€ main_cli.rs # Command-line interface entry point
โ”‚ โ”œโ”€โ”€ tauri_commands.rs # Tauri command handlers
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ cli/ # Command-line interface module
โ”‚ โ”‚ โ”œโ”€โ”€ app.rs # CLI application main logic
โ”‚ โ”‚ โ”œโ”€โ”€ commands.rs # CLI command implementations
โ”‚ โ”‚ โ””โ”€โ”€ mod.rs
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ core/ # Core functionality modules
โ”‚ โ”‚ โ”œโ”€โ”€ config.rs # Configuration management
โ”‚ โ”‚ โ”œโ”€โ”€ error.rs # Error handling
โ”‚ โ”‚ โ”œโ”€โ”€ file.rs # File operations
โ”‚ โ”‚ โ””โ”€โ”€ mod.rs
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ protocols/ # Protocol adapters
โ”‚ โ”‚ โ”œโ”€โ”€ fs.rs # Local filesystem
โ”‚ โ”‚ โ”œโ”€โ”€ s3.rs # S3 protocol
โ”‚ โ”‚ โ”œโ”€โ”€ traits.rs # Protocol interface definitions
โ”‚ โ”‚ โ””โ”€โ”€ mod.rs
โ”‚ โ””โ”€โ”€ ๐Ÿ“ utils/ # Utility functions
โ”‚ โ”œโ”€โ”€ logger.rs # Logging utilities
โ”‚ โ””โ”€โ”€ mod.rs
โ”œโ”€โ”€ ๐Ÿ“ ui/ # React frontend source code
โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”œโ”€โ”€ App.tsx # Main application component
โ”‚ โ”‚ โ”œโ”€โ”€ main.tsx # Application entry point
โ”‚ โ”‚ โ”œโ”€โ”€ types.ts # TypeScript type definitions
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“ components/ # React components
โ”‚ โ”‚ โ””โ”€โ”€ ๐Ÿ“ services/ # API service layer
โ”‚ โ”œโ”€โ”€ package.json # Frontend dependencies configuration
โ”‚ โ””โ”€โ”€ vite.config.ts # Vite build configuration
โ”œโ”€โ”€ Cargo.toml # Rust project configuration
โ”œโ”€โ”€ tauri.conf.json # Tauri application configuration
โ””โ”€โ”€ package.json # Tauri CLI configuration
```

### Tech Stack

**Backend (Rust)**
- [OpenDAL](https://opendal.apache.org/) - Unified storage access layer
- [Tauri](https://tauri.app/) - Cross-platform desktop application framework
- [Tokio](https://tokio.rs/) - Async runtime
- [Clap](https://clap.rs/) - Command-line argument parser

**Frontend (TypeScript + React)**
- [React 18](https://react.dev/) - UI framework
- [Ant Design](https://ant.design/) - UI component library
- [Vite](https://vitejs.dev/) - Build tool
- [TypeScript](https://www.typescriptlang.org/) - Type safety

## ๐Ÿš€ Quick Start

### Prerequisites

- Rust 1.87.0+
- Node.js 18+
- pnpm or npm

### Install Dependencies

```bash
# Clone the project
git clone
cd mpfm

# Install Rust dependencies (automatic)
cargo check

# Install frontend dependencies
cd ui && pnpm install && cd ..

# Install Tauri CLI
pnpm install
```

### Launch Application

#### Method 1: GUI Mode (Recommended)

Launch Tauri desktop application with complete graphical interface:

```bash
pnpm run tauri:dev
```

This will:
1. Automatically start the frontend development server (React + Vite)
2. Compile and run the Rust backend
3. Open the desktop application window

#### Method 2: CLI Mode

Use command-line tool only:

```bash
# View help
cargo run --bin main_cli -- --help

# View available commands
cargo run --bin main_cli
```

#### Method 3: Frontend Demo Mode

Launch frontend interface only (demo mode with mock data):

```bash
cd ui
pnpm dev
```

Then visit `http://localhost:1420` in your browser

## ๐Ÿ’ป Usage Guide

### GUI Operations

1. **Launch Application**: Run `npm run tauri:dev`
2. **Add Connection**: Click "Add Connection" in the left panel
3. **Select Connection**: Choose the storage you want to use from the connection list
4. **File Operations**: Perform file operations in the right file manager

### Command Line Operations

#### Connection Management

```bash
# Add local filesystem connection
cargo run --bin main_cli -- connection add

# Add S3 connection
cargo run --bin main_cli -- connection add

# List all connections
cargo run --bin main_cli -- connection list

# Remove connection
cargo run --bin main_cli -- connection remove
```

#### File Operations

```bash
# List files and directories
cargo run --bin main_cli -- ls --connection [path]

# Upload file
cargo run --bin main_cli -- upload --connection

# Download file
cargo run --bin main_cli -- download --connection

# Delete file or directory
cargo run --bin main_cli -- rm --connection

# Create directory
cargo run --bin main_cli -- mkdir --connection

# View file information
cargo run --bin main_cli -- stat --connection
```

## ๐Ÿ”ง Supported Protocols

### Currently Supported

- โœ… **Local Filesystem (fs)**: Local disk file operations
- โœ… **S3 Protocol**: AWS S3, MinIO, Ceph, and other S3-compatible storage
- โœ… **FTP Protocal**: File Transfer Protocol

### Planned Support

- ๐Ÿ”„ SFTP
- ๐Ÿ”„ WebDAV
- ๐Ÿ”„ Azure Blob Storage
- ๐Ÿ”„ Google Cloud Storage
- ๐Ÿ”„ Alibaba Cloud OSS
- ๐Ÿ”„ Tencent Cloud COS

## ๐Ÿ”จ Build Release

```bash
# Build Tauri application
pnpm run tauri:build

# Build CLI tool
cargo build --release --bin main_cli
```

Build artifacts location:
- Tauri application: `target/release/bundle/`
- CLI tool: `target/release/main_cli`

## ๐Ÿ› Troubleshooting

### Common Issues

1. **Port Conflict**: If you encounter port conflicts, modify the port number in `ui/vite.config.ts`
2. **Permission Issues**: Ensure you have read/write permissions for target directories
3. **Connection Failure**: Check network connectivity and storage service configuration
4. **macOS Installation Failure**: If installation shows "mpfm is damaged and can't be opened", run `sudo xattr -r -d com.apple.quarantine /Applications/mpfm.app` to resolve

### Development Debugging

```bash
# Enable debug logging
RUST_LOG=debug cargo run --bin main_cli

# Check code issues
cargo clippy

# Run tests
cargo test
```

## ๐Ÿ“š Documentation

- [Quick Start Guide](docs/QUICK_START.md) - Get started quickly
- [Development Guide](docs/DEVELOPMENT.md) - Detailed development documentation
- [Adding New Protocols](docs/ADD_NEW_PROTOCOL.md) - How to add new protocol support
- [FTP Testing Guide](tests/FTP_TEST_README.md) - FTP protocol testing instructions

## ๐Ÿค Contributing

Welcome to contribute code, report issues, or suggest improvements!

1. Fork the project
2. Create a feature branch: `git checkout -b feature/amazing-feature`
3. Commit your changes: `git commit -m 'Add some amazing feature'`
4. Push to the branch: `git push origin feature/amazing-feature`
5. Submit a Pull Request

Please read our [Development Guide](docs/DEVELOPMENT.md) for coding standards and contribution guidelines.

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™ Acknowledgments

- [Apache OpenDALโ„ข](https://opendal.apache.org/) - Providing unified storage access interface
- [Tauri](https://tauri.app/) - Modern desktop application development framework
- [Rust Community](https://www.rust-lang.org/) - Excellent systems programming language ecosystem