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.0+for a stable release!
Rush Sync Server is an ambitious project to create a professional web server orchestration platform written in Rust. Currently in Phase 0 (Foundation), the project features a robust terminal UI with internationalization, theming, and command system - laying the groundwork for the upcoming server management capabilities.
๐ฏ Project Vision
Rush Sync Server is being developed in phases:
- Phase 0 (Current): Terminal UI foundation with command system โ
- Phase 1: 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.0
๐ง Major Code Optimization & Architecture Improvements
The new version is approximately 17.6% shorter than the previous one:
-
Previous Code: 289,700 characters
-
New Code: 238,817 characters ๐ This represents a reduction of around 18%.
-
๐ฆ Compressed Modules - Removal of redundant code structures
-
๐งน Cleaned Codebase - Optimized imports and reduced boilerplate
-
โก Improved Performance - More efficient widget trait implementations
-
๐ฏ Focused Functionality - Removal of unused features and debug code
-
๐ Simplified APIs - Consolidated functions and better abstraction
๐จ Enhanced 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
- 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
๐ฅ๏ธ Complete Screen Management Overhaul
- ๐ Advanced Scroll System with smooth navigation and position preservation
- ๐ Enhanced Live Theme Updates with complete UI state preservation
- ๐ก๏ธ Bulletproof Input State Management with backup/restore functionality
- ๐ฑ Multi-Terminal Platform Support with intelligent cursor color handling
- โก Optimized Rendering Pipeline - 2-layer rendering (text + terminal cursor)
- ๐จ Emergency Layout Fallbacks for edge cases and small terminals
โจ๏ธ Advanced Input System
- ๐พ Robust State Backup/Restore - History and cursor position preservation
- ๐ Enhanced Clipboard Integration - Cross-platform copy/paste with text cleaning
- ๐ก๏ธ Advanced Input Validation - Better handling of special characters and Unicode
- ๐ Improved History Management - Persistent file-based history with proper loading
- โก Optimized Input Processing - Faster response times and better event handling
๐ Internationalization Improvements
- ๐ฉ๐ช Complete German Translation Coverage for all new features
- ๐จ Enhanced Color Category Mapping with i18n support
- ๐ Localized Error Messages for all new components
- ๐ Runtime Translation Updates with cache management
๐ Installation & Usage
๐ฆ As Binary - Version 0.3.0+
# Install from crates.io
# Run the terminal UI (current functionality)
๐ As Library - Version 0.3.0+
Add to your Cargo.toml:
[]
= "0.3.0"
= { = "1.36", = ["full"] }
Quick Start Examples:
use *;
async
use *;
async
๐ From Source
โ Current Features (Phase 0 - Foundation Complete)
๐๏ธ Core Foundation
- Interactive Terminal UI with asynchronous event loop (Tokio)
- Modular Command System with extensible architecture
- 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
- 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
๐บ Screen & Viewport Management
- ๐ Robust Layout Calculation with emergency fallbacks
- ๐ Advanced Scroll System with auto-scroll detection
- ๐ฏ Precise Content Tracking with intelligent cache management
- ๐ Unified Event System for viewport changes
- ๐จ Error Recovery for layout failures and edge cases
- ๐ Performance-Optimized Rendering with 2-layer architecture
๐ Internationalization
- Runtime Language Switching (German/English)
- Color-coded Command Categories with i18n support
- Localized Error Messages and help texts
- 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
๐ป Available 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 |
๐จ Theme Commands
๐ Log-Level Commands
๐ History Commands
โจ๏ธ 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 |
๐๏ธ Application Control
| Key | Function |
|---|---|
Enter |
Submit command |
ESC (2x) |
Exit application |
โ๏ธ 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)
# 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"
[]
= "Black"
= "Green"
= "BLOCK"
= "Green"
= "LightGreen"
= "Black"
= "$ "
= "BLOCK"
= "Black"
[]
= "White"
= "LightBlue"
= "UNDERSCORE"
= "Blue"
= "Blue"
= "White"
= "> "
= "UNDERSCORE"
= "White"
# ๐ Advanced theme with yellow cursor
[]
= "Black"
= "Yellow"
= "PIPE"
= "Yellow"
= "DarkGray"
= "Yellow"
= "โก "
= "PIPE"
= "Yellow" # Real terminal cursor will be yellow!
๐จ Supported Colors
Standard Colors:
Black, White, Gray, DarkGray, Red, Green, Blue, Yellow, Magenta, Cyan
Light Variants:
LightRed, LightGreen, LightBlue, LightYellow, LightMagenta, LightCyan
๐ฑ๏ธ Cursor Types
- PIPE (
|) - Vertical line cursor - BLOCK (
โ) - Block cursor (inverts character) - UNDERSCORE (
_) - Underscore cursor
๐ Terminal Cursor Colors
Enhanced in v0.3.0: Real terminal cursor color changes based on theme configuration!
- macOS Terminal.app - Standard OSC sequences
- iTerm2 - Native color support with multiple fallback sequences
- VSCode Terminal - Standard compatibility mode
- tmux - Proper tmux-wrapped sequences
- Generic Terminals - Universal fallback sequences
๐ง Advanced Features
๐ก๏ธ 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
๐บ Viewport Management
- ๐ Panic-Safe Layout Calculation - Emergency fallbacks for edge cases
- ๐ Smart Auto-Scroll Detection - Preserves manual scroll position
- ๐ฏ Precise Content Tracking - Optimized message rendering
- ๐ Event-Driven Updates - Unified system for all viewport changes
- ๐ Performance-Optimized Rendering - 2-layer architecture (text + cursor)
๐ Intelligent Logging
# Message logs with timestamps
# Automatic log rotation and size management
๐ Error Recovery
- Graceful Panic Handling with complete terminal cleanup
- Poisoned Mutex Recovery for thread safety
- Config Validation with automatic correction
- File System Error Handling with fallbacks
- Layout Failure Recovery with emergency layouts
- ๐ Terminal State Recovery - Cursor and color reset on exit
๐บ Development Roadmap
Phase 1: Server Management (Next)
- CLI commands:
create,start,stop,delete,status,logs - Dynamic Actix-Web server spawning
- Hash-based server isolation
- Ghost mode (background execution)
- JSON/SQLite server registry
Phase 2: Dev/Prod & Versioning
- Dev mode with hot-reloading
- Prod mode with TLS
- Automatic versioning (v1, v2, ...)
- File watcher with
notify - SCSS compilation
Phase 3: Communication & Security
- Redis Pub/Sub integration
- TLS/HTTPS with
rustls - Session caching
- Inter-server communication
Phase 4: Logging & Automation
- Centralized logging dashboard
- Automated setup scripts
- WebSocket support
- Integration tests
Future Considerations
- Load balancing
- Docker integration
- Kubernetes support
- Web-based monitoring dashboard
๐ Project Structure
Current Structure (v0.3.0)
Planned Structure (Phase 1+)
๐งช Testing & Quality Assurance
๐ Code Quality Checks
# Zero warnings guarantee
# Specific component tests
๐ก๏ธ Security Testing
# Input sanitization tests
# Error recovery tests
๐จ UI System Tests
# Viewport and rendering tests
๐ Version History
v0.3.0 (Current) - Code Optimization & Performance
๐ง Major Code Architecture Improvements:
- ๐ฆ 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
- ๐ฏ Focused Module Structure - Consolidated and simplified APIs
- ๐ Enhanced Widget System - Improved trait implementations
๐ฑ UI/UX Enhancements:
- ๐ฑ๏ธ Refined Cursor System - Better platform detection and color handling
- ๐บ Optimized Viewport Management - Improved scroll and layout calculations
- โจ๏ธ Enhanced Input Processing - Better keyboard handling and validation
- ๐จ Streamlined Theme System - More efficient live updates
๐ Internationalization:
- ๐ Complete Translation Coverage - All new features fully localized
- ๐จ Enhanced Color Mapping - Better category detection and display
- ๐ Improved Cache Management - More efficient translation loading
v0.2.9 - Screen & Cursor System Complete
๐ Major Features:
- ๐ฅ๏ธ Complete screen management overhaul with robust viewport handling
- ๐ Advanced scroll system with smooth navigation and auto-scroll detection
- ๐จ Terminal cursor integration - Real terminal cursor synchronized with text
- ๐ Enhanced live theme updates with complete UI state preservation
- ๐ก๏ธ Bulletproof input state management with backup/restore functionality
๐ Technical Improvements:
- โก 2-layer rendering architecture (text + terminal cursor)
- ๐ฏ Unified cursor API for both input and output cursors
- ๐ฑ Multi-platform terminal detection with cursor color support
- ๐ Panic-safe layout calculations with emergency fallbacks
- ๐ Enhanced viewport event system with unified management
๐จ UI/UX Enhancements:
- ๐ Dynamic terminal cursor colors (yellow, blue, green, etc.)
- ๐ฏ Precise cursor positioning with platform-specific handling
- ๐ Performance-optimized message rendering
- ๐จ Improved error recovery for layout failures
- ๐ฑ Better responsive design for small terminals
v0.2.8 - Foundation Complete
๐ Major Features:
- ๐ Persistent message logging to
.rss/rush.logs - ๐ Persistent command history in
.rss/rush.history - ๐ก๏ธ Advanced terminal compatibility with escape sequence detection
- ๐ง Enhanced error handling throughout codebase
- ๐งน Code architecture cleanup (removed performance module)
v0.2.7 - Input System Complete
- โ Full keyboard input support (Shift + symbols, umlauts)
- โ Platform-specific shortcuts (Cmd/Ctrl)
- โ Terminal reset improvements
- โ Copy/paste integration
v0.2.6 - UI Polish
- โ Fixed PIPE cursor rendering issues
- โ Zero warnings codebase achievement
- โ Enhanced viewport management
v0.2.5 - Theme System
- โ Live theme switching without restart
- โ Advanced cursor system with TOML configuration
- โ Multi-cursor type support (PIPE, BLOCK, UNDERSCORE)
v0.2.3 - Public Release
- โ Binary & library distribution
- โ Public API for developers
- โ Comprehensive documentation
๐ Code Quality Metrics
Rush Sync Server v0.3.0 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)
- โ ๐ Panic-Safe Operations (emergency fallbacks for all critical paths)
- โ ๐ Cross-Platform Compatibility (tested on macOS, Linux, Windows)
- โ ๐ Optimized Codebase (17.6% reduction in code size)
๐ 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 1 Development:
- Web server management with Actix-Web
- Redis integration and caching
- Database design (SQLite/PostgreSQL)
- DevOps automation tools
Core Improvements:
- Additional language translations
- Theme design and UX improvements
- Performance optimizations
- Cross-platform testing
- Terminal compatibility testing
๐ 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
- Ensure zero warnings with
-
Internationalization:
- Add i18n support for all new user-facing text
- Update both
en.jsonandde.jsonfiles - Test language switching functionality
-
Configuration:
- Update config validation for new parameters
- Provide sensible defaults and auto-correction
- Test all theme configurations including cursor settings
-
Documentation:
- Update README.md for new features
- Add inline documentation for public APIs
- Include usage examples
- Document terminal compatibility notes
๐ 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.0 - Optimized foundation with 17.6% code reduction. Enhanced performance, streamlined architecture, and improved maintainability. Ready for Phase 1 server orchestration.