Rush Sync Server
NOTE: Version
0.2.2on crates.io has a critical bug in language file loading (*.jsonnot embedded correctly). Please use version0.3.2+for a stable release!
Rush Sync Server is a professional web server orchestration platform written in Rust. The project features a robust terminal UI with internationalization, theming, command system, and NEW in v0.3.2: Full web server management with Actix-Web integration.
Project Vision
Rush Sync Server development phases:
- Phase 0 โ : Terminal UI foundation with command system
- Phase 1 โ NEW: Dynamic Actix-Web server management
- Phase 2: Dev/Prod modes with hot-reloading
- Phase 3: Redis integration & secure communication
- Phase 4: Centralized logging & automation
What's New in v0.3.2
๐ Complete Web Server Management System
The new version introduces professional Actix-Web server orchestration:
- ๐ Dynamic Server Creation - Create unlimited web servers with custom names and ports
- โก Instant Start/Stop Control - Full lifecycle management of running servers
- ๐ฏ Smart Port Management - Automatic port allocation from 8080+ range
- ๐ Real-time Server Status - Track running/stopped/failed server states
- ๐งน Intelligent Cleanup - Remove stopped or failed servers from registry
- ๐ Comprehensive Server Listing - Chronological overview with status indicators
๐ New Server Management Commands
๐ฏ Advanced Server Features
- Professional Web Interface - Each server provides HTML status page with server info
- REST API Endpoints -
/status,/api/info,/api/metrics,/healthfor monitoring - Graceful Shutdown - 5-second timeout with force-stop fallback
- Server Identification - Unique UUID-based IDs with short display format
- Chronological Indexing - Access servers by creation order (1, 2, 3...)
- Concurrent Operation - Multiple servers running simultaneously
- Memory Efficient - Single worker per server, optimized for embedded use
๐ง Enhanced Core System (from v0.3.1)
- Central System Command Architecture - All confirmations use unified, type-safe processing
- Anti-Flicker Color Engine - Pre-compiled display text to color mappings for zero-delay rendering
- Enhanced Startup Experience - Professional startup message with color-coded categories
- Streamlined Command Architecture - Multiple command files optimized for maintainability
- Type-Safe Confirmations - No more string-based confirmation states
๐ Installation & Usage
๐ฆ As Binary - Version 0.3.2+
# Install from crates.io
# Run the application (terminal UI + server management)
๐ As Library - Version 0.3.2+
Add to your Cargo.toml:
[]
= "0.3.2"
= { = "1.36", = ["full"] }
Quick Start Examples:
use *;
async
use *;
async
๐ From Source
โ Current Features (Phase 1 Complete)
๐ Web Server Management (NEW in v0.3.2)
- Dynamic Actix-Web Server Creation - Unlimited servers with UUID-based identification
- Smart Port Allocation - Automatic port finding from 8080-8180 range
- Custom Server Configuration - Name and port customization support
- Professional Web Interface - HTML status pages with server information and API endpoints
- Real-time Server Monitoring - Status tracking (Running/Stopped/Failed)
- Graceful Lifecycle Management - Clean startup and shutdown processes
- Concurrent Server Operation - Multiple servers running simultaneously
- Registry-based Management - Persistent server information storage
๐๏ธ Core Foundation (Phase 0 Complete)
- Interactive Terminal UI with asynchronous event loop (Tokio)
- Central System Commands with type-safe confirmation processing
- Advanced Error Handling with graceful recovery
- Zero Warnings Codebase (cargo clippy clean)
- Memory-Safe Operations with proper resource management
๐ Logging & Persistence
- Color-coded Logging with levels (
ERROR,WARN,INFO,DEBUG,TRACE) - Runtime Log-level Switching with persistent config save
- ๐ Message Logging to
.rss/rush.logswith timestamps - ๐ Command History in
.rss/rush.historywith file persistence - Auto-scroll & Message History with smart viewport management
๐จ Advanced UI System
- ๐ฑ๏ธ Intelligent Dual-Cursor System - Text rendering + real terminal cursor
- ๐ฏ Multi-Platform Terminal Detection (macOS Terminal, iTerm2, VSCode, tmux)
- ๐ Dynamic Terminal Cursor Colors with real-time color changes
- Anti-Flicker Color System - Zero-delay color processing with pre-compiled mappings
- Live Theme Switching without restart (TOML-based)
- Typewriter Effect with configurable speed and cursor
- Unicode Support (grapheme-based text handling)
- ๐ฏ Advanced Viewport with smooth scrolling and position preservation
- ๐ฑ Responsive Layout System with panic-safe dimension handling
โจ๏ธ Input & Navigation
- Full Keyboard Support - Shift + symbols, umlauts, Unicode & emoji
- Platform Shortcuts - Cmd (macOS) / Ctrl (Win/Linux) navigation
- Input History Navigation with arrow keys and persistent storage
- ๐ Enhanced Copy/Paste Integration with text cleaning and validation
- ๐ก๏ธ Smart Input Validation with length limits and sanitization
- ๐พ State Backup/Restore - Complete input state preservation
- Central Confirmation System - Unified, type-safe confirmation processing
๐ Internationalization
- Runtime Language Switching (German/English)
- Centralized Color Categories with consistent i18n support
- Localized Error Messages and help texts
- Professional Startup Messages with language adaptation
- Extensible Translation System for future languages
โ๏ธ Configuration & Themes
- Smart Config Validation with auto-correction
- TOML-based Theme System with live updates
- Internal Restart without process termination
- Persistent Settings with automatic backup
- Enhanced Error Recovery with comprehensive fallback handling
๐ป Available Commands
๐ Server Management Commands (NEW)
| Command | Description | Examples |
|---|---|---|
create |
Create new web server | create, create myserver, create 8090 |
list |
Show all servers | list |
start |
Start server | start 1, start myserver, start abc123 |
stop |
Stop server | stop 1, stop myserver, stop abc123 |
cleanup |
Remove inactive servers | cleanup, cleanup failed, cleanup all |
๐ Core System Commands
| Command | Description | Examples |
|---|---|---|
version / ver |
Show application version | version |
lang / language |
Switch language (EN/DE) | lang de, lang en |
theme |
Change themes live | theme dark, theme light |
clear / cls |
Clear all messages | clear |
exit / q |
Exit with confirmation | exit |
restart |
Internal restart | restart, restart --force |
history -c |
Clear input history | history -c |
log-level |
Change log level | log-level debug |
๐ Server Management Examples
Creating Servers
# Auto-generated name and port
# Result: Server created: 'rush-sync-server-001' (ID: abc12345) on Port 8080
# Custom name with auto port
# Result: Server created: 'myapi' (ID: def67890) on Port 8081
# Custom port with auto name
# Result: Server created: 'rush-sync-server-002' (ID: ghi13579) on Port 9000
# Custom name and port
# Result: Custom Server created: 'myapi' (ID: jkl24680) on Port 9000
Server Control
# Start by index (chronological order)
# Result: Server 'myapi' successfully started on http://127.0.0.1:9000
# Start by name
# Result: Server 'myapi' successfully started on http://127.0.0.1:9000
# Start by ID prefix
# Result: Server 'rush-sync-server-001' successfully started on http://127.0.0.1:8080
# List all servers
# Result:
# Server List:
# 1. myapi - def67890 (Port: 9000) [Running]
# 2. rush-sync-server-001 - abc12345 (Port: 8080) [Stopped]
# 3. testserver - ghi13579 (Port: 8082) [Failed]
# Stop server
# Result: Server 'myapi' stopped
# Cleanup inactive servers
# Result: 1 stopped server removed
# Result: 1 failed server removed
# Result: 2 stopped servers removed
# 1 failed server removed
Web Interface Access
Each created server provides a professional web interface:
http://127.0.0.1:8080/ # Welcome page with server info
http://127.0.0.1:8080/status # JSON status information
http://127.0.0.1:8080/api/info # Complete API information
http://127.0.0.1:8080/api/metrics # Server metrics
http://127.0.0.1:8080/health # Health check endpoint
Enhanced Confirmation System
All system commands use the centralized confirmation processor:
# Shows: [CONFIRM] Do you really want to exit? (y/n)
โจ๏ธ Enhanced Keyboard Shortcuts
๐ค Text Navigation
| Key | Function |
|---|---|
โ / โ |
Move cursor in text |
Home / End |
Jump to start/end |
Cmd/Ctrl + A |
Jump to start |
Cmd/Ctrl + E |
Jump to end |
โ๏ธ Text Editing
| Key | Function |
|---|---|
Backspace |
Delete previous char |
Delete |
Delete next char |
Cmd/Ctrl + U |
Clear entire line |
Cmd/Ctrl + C |
Copy current input |
Cmd/Ctrl + V |
Paste from clipboard |
Cmd/Ctrl + X |
Cut current input |
๐ History & Navigation
| Key | Function |
|---|---|
โ / โ |
Navigate input history |
Shift + โ / โ |
Scroll messages |
Page Up / Down |
Page scroll |
โ๏ธ Configuration System
๐ File Locations
- Config:
.rss/rush.toml(auto-created) - History:
.rss/rush.history(persistent command history) - Logs:
.rss/rush.logs(timestamped message log)
๐ Configuration File
[]
= 1000 # Message buffer size
= 5 # Typewriter effect speed (0 = disabled)
= 100 # Maximum input length
= 30 # Command history entries
= 16 # UI refresh rate (16ms = 62.5 FPS)
= "info" # Log level (error/warn/info/debug/trace)
= "dark" # Active theme name
[]
= "en" # Language (en/de)
# Server Management Configuration (NEW)
[]
= 8080 # Starting port for auto-allocation
= 8180 # Maximum port for auto-allocation
= 10 # Maximum simultaneous servers
= 5 # Graceful shutdown timeout (seconds)
# Built-in themes with advanced cursor configuration
[]
= "Black"
= "White"
= "PIPE" # PIPE, BLOCK, UNDERSCORE
= "White" # Terminal cursor color for typewriter
= "White"
= "Black"
= "/// " # Prompt text
= "PIPE" # Input cursor type
= "Black" # Input cursor color (real terminal cursor)
[]
= "White"
= "Black"
= "PIPE"
= "Black"
= "Black"
= "White"
= "/// "
= "PIPE"
= "White"
# Additional themes: green, blue, yellow available
๐ง Advanced Features
๐ Server Architecture Details
- Actix-Web Integration - Professional-grade web server framework
- Single Worker Design - Optimized for embedded server management
- UUID-based Identification - Unique server IDs with collision avoidance
- Graceful Shutdown Protocol - 5-second timeout with force-stop fallback
- Memory Efficient Operation - Minimal resource footprint per server
- Concurrent Server Support - Run multiple servers simultaneously
- Professional Web Interface - HTML status pages with comprehensive server information
๐ก๏ธ Terminal Compatibility
- macOS Terminal.app - Optimized sequences with RGB color support
- iTerm2 - Native color support with multiple sequence types
- VSCode Terminal - Standard compatibility with fallback handling
- tmux Sessions - Proper tmux-wrapped escape sequence handling
- Generic Terminals - Universal fallback support with error recovery
๐ฑ๏ธ Advanced Cursor System
# Real-time cursor changes in terminal
# Cursor debugging
Central Command Processing
// Example: Type-safe, compiler-verified, zero race conditions
match confirmed_action
๐บ Development Roadmap
Phase 2: Dev/Prod & Versioning
- Dev mode with hot-reloading for server content
- Production mode with TLS/HTTPS support
- Automatic versioning (v1, v2, ...) for server instances
- File watcher integration with
notifycrate - SCSS compilation for web assets
Phase 3: Communication & Security
- Redis Pub/Sub integration for inter-server communication
- TLS/HTTPS with
rustlsfor secure connections - Session caching and management
- Advanced authentication and authorization
- Server-to-server communication protocols
Phase 4: Logging & Automation
- Centralized logging dashboard for all servers
- Automated deployment and setup scripts
- WebSocket support for real-time communication
- Comprehensive integration test suite
- Performance monitoring and metrics collection
Future Considerations
- Load balancing between multiple server instances
- Docker containerization support
- Kubernetes deployment configurations
- Web-based management dashboard
- Plugin system for server extensions
๐งช Testing & Quality Assurance
โ Code Quality Checks
# Zero warnings guarantee
# Server management tests
๐ก๏ธ Security Testing
# Input sanitization tests
# Server security tests
๐ Version History
v0.3.2 (Current) - Complete Server Management
๐ Major Server Management Features:
- Complete Actix-Web Integration - Professional web server creation and management
- Dynamic Server Lifecycle - Create, start, stop, and cleanup web servers
- Smart Port Management - Automatic port allocation with conflict avoidance
- Professional Web Interface - HTML status pages with comprehensive server information
- REST API Endpoints -
/status,/api/info,/api/metrics,/healthfor monitoring - Concurrent Server Support - Run multiple servers simultaneously with efficient resource usage
๐ New Server Commands:
- create - Server creation with custom names and ports
- list - Comprehensive server listing with status indicators
- start/stop - Full server lifecycle control
- cleanup - Intelligent removal of inactive servers
๐ง Enhanced Architecture:
- Server Registry System - Persistent server information storage
- UUID-based Identification - Unique server IDs with short display format
- Chronological Indexing - Access servers by creation order
- Graceful Shutdown Protocol - Clean server termination with timeout handling
v0.3.1 - Central Command Architecture
- Central Confirmation System - Type-safe confirmation processing
- Anti-Flicker Color System - Pre-compiled color mappings with O(1) lookup performance
- Professional Startup Experience - Enhanced startup messages with color coding
- Type-Safe Operations - Eliminated string-based states with robust enum architecture
v0.3.0 - Code Optimization & Performance
- 17.6% Code Reduction - From 289,700 to 238,817 characters
- Complete Code Cleanup - Removed redundant structures and debug code
- Performance Optimizations - Streamlined rendering and input processing
๐ Code Quality Metrics
Rush Sync Server v0.3.2 maintains exceptional standards:
- โ Zero Clippy Warnings (all lints passing)
- โ Zero Cargo Check Errors (clean compilation)
- โ Memory Safe (Rust guarantees + manual verification)
- โ Thread Safe (proper async/sync boundaries)
- โ Comprehensive Error Handling (Result types throughout)
- โ Clean Architecture (modular design patterns)
- โ Extensive Testing (unit + integration tests)
- โ Documentation Coverage (all public APIs documented)
- โ Central Command Architecture (type-safe system operations)
- โ Anti-Flicker Performance (O(1) color processing)
- โ Race-Condition Free (centralized state management)
- โ Professional Server Management (Actix-Web integration)
- โ Cross-Platform Compatibility (tested on macOS, Linux, Windows)
๐ License
Dual-Licensing Model
- Community License (GPLv3) โ Free for private and non-commercial use
- Commercial License โ Required for commercial applications
For commercial licensing inquiries: ๐ง l.ersen@icloud.com
๐ค Contributing
๐ฏ Areas Looking for Contributors:
Phase 2 Development:
- Hot-reloading system for development mode
- TLS/HTTPS integration with rustls
- File watcher integration with notify
- SCSS compilation for web assets
Server Management Enhancements:
- Load balancing between server instances
- Advanced monitoring and metrics collection
- WebSocket support for real-time communication
- Docker integration and containerization
Core Improvements:
- Additional language translations (Spanish, French, Japanese)
- Advanced theme design and UX improvements
- Performance optimizations and benchmarking
- Cross-platform testing and compatibility
๐ Development Guidelines:
-
Code Quality:
- Ensure zero warnings with
cargo clippy - Add comprehensive tests for new features
- Maintain memory safety and thread safety
- Include panic-safe error handling
- Follow the central command architecture pattern
- Ensure zero warnings with
-
Server Management:
- Test all server lifecycle operations
- Ensure proper resource cleanup
- Validate port allocation logic
- Test concurrent server scenarios
-
Internationalization:
- Add i18n support for all new user-facing text
- Update both
en.jsonandde.jsonfiles - Test language switching functionality
- Use centralized color categories for consistent theming
๐ Contact & Support
- Primary Contact: ๐ง l.ersen@icloud.com
- GitHub Repository: LEVOGNE/rush.sync.server
- Issues & Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
Rush Sync Server v0.3.2 - Professional web server orchestration with Actix-Web integration, dynamic server management, and comprehensive terminal UI.