Files
rust_raidguardx/README_GUI.md
T

3.8 KiB

RAIDGuard X - GUI Client/Server Architecture

A modern Rust-based GUI application for managing RAID storage systems.

Architecture

┌─────────────────────────────────────────────────────────────────────┐
│  raidguard_x_gui_client (Slint GUI)                                │
│  - Cross-platform UI (macOS, Windows, Linux)                        │
│  - TCP connection to server                                        │
│  - Real-time data display                                          │
└─────────────────────────┬───────────────────────────────────────────┘
                          │ TCP JSON Protocol (:8923)
                          ▼
┌─────────────────────────────────────────────────────────────────────┐
│  raidguard_x_gui_server (Mock/Real Backend)                        │
│  - Provides RAID controller data                                    │
│  - Currently serves mock data                                       │
│  - Future: In-Band API to real RAID systems                         │
└─────────────────────────────────────────────────────────────────────┘

Project Structure

raidguard_x_gui_server/   # Data server
├── Cargo.toml
├── src/
│   ├── main.rs           # Entry point
│   ├── lib.rs
│   ├── server.rs         # TCP server
│   ├── protocol/         # JSON message protocol
│   ├── handlers/         # Request handlers
│   └── mock/             # Mock data provider

raidguard_x_gui_client/   # GUI client
├── Cargo.toml
├── build.rs              # Slint build script
├── src/
│   ├── main.rs           # Entry point + Slint integration
│   ├── lib.rs
│   ├── app.rs            # App state management
│   ├── models/           # Data models
│   └── protocol/         # Client protocol
└── ui/
    └── main_window.slint # Slint UI definition

Build Requirements

  • Rust 1.70+
  • For GUI client: xcode-select (macOS) or equivalent

Build Instructions

Server

cd raidguard_x_gui_server
cargo build --release

Run:

# Default port 8923
cargo run --release

# Custom port
SERVER_ADDR=127.0.0.1:8923 cargo run --release

Client

cd raidguard_x_gui_client
cargo build --release

Run:

cargo run --release

Protocol

Request Format

{
  "id": "uuid-v4",
  "type": "request",
  "action": "get_controllers",
  "params": {}
}

Response Format

{
  "id": "uuid-v4",
  "type": "response",
  "status": "success",
  "data": { ... },
  "error": null
}

Available Actions

Action Description
get_controllers Get all controllers
get_raids Get RAID arrays
get_disks Get physical disks
get_events Get event log
ping Health check

Development

Testing the Server

# Terminal 1: Start server
cd raidguard_x_gui_server
cargo run --release

# Terminal 2: Connect with netcat
nc localhost 8923

# Send request:
{"id":"test","type":"request","action":"get_controllers","params":{}}

# Response:
{"id":"test","type":"response","status":"success","data":{"controllers":[...]}}

License

Proprietary - Accusys Inc.