Technical Documentation
Technical Documentation
Section titled “Technical Documentation”Architecture Overview
Section titled “Architecture Overview”Technology Stack
Section titled “Technology Stack”- Frontend: React + TypeScript
- Backend: Rust + Tauri
- Database: SQLite
- Build System: Vite
Project Structure
Section titled “Project Structure”clippy-rs/├── src/ # Frontend source code│ ├── components/ # React components│ │ ├── lib/ # Utility libraries│ │ ├── store/ # State management│ │ ├── types/ # TypeScript type definitions│ │ └── utils/ # Helper functions│ ├── src-tauri/ # Rust backend│ │ ├── src/│ │ │ ├── commands/ # Tauri commands│ │ │ ├── config/ # Configuration management│ │ │ ├── events/ # Event handling│ │ │ ├── service/ # Core services│ │ │ └── utils/ # Utility functions│ │ └── Cargo.toml # Rust dependencies│ └── docs/ # DocumentationDevelopment Setup
Section titled “Development Setup”Prerequisites
Section titled “Prerequisites”- Rust toolchain
- Node.js
- Tauri CLI
- Platform-specific dependencies:
- Linux:
pkg-config,libglib2.0-dev,libwebkit2gtk-4.1-dev,libgtk-3-dev,libayatana-appindicator3-dev,librsvg2-dev - Windows: Visual Studio Build Tools
- macOS: Xcode Command Line Tools
- Linux:
Installation
Section titled “Installation”- Clone the repository
- Install frontend dependencies:
Terminal window npm install - Install backend dependencies:
Terminal window cd src-tauricargo build
Development Commands
Section titled “Development Commands”npm run d: Start development server with hot reloadnpm run build: Build the applicationnpm run tauri dev: Run Tauri development server
Core Components
Section titled “Core Components”Frontend Architecture
Section titled “Frontend Architecture”- Components: React components organized by feature
- State Management: Local state with React hooks
- Styling: CSS modules with responsive design
- Type Safety: TypeScript for type checking
Backend Architecture
Section titled “Backend Architecture”- Commands: Tauri commands for IPC
- Services: Core business logic
- Events: System event handling
- Configuration: App settings management
Database Schema
Section titled “Database Schema”- Clipboards: Stores clipboard history
- Settings: User preferences
- Hotkeys: Keyboard shortcuts
- Sync: Cloud sync configuration
Security Implementation
Section titled “Security Implementation”Encryption
Section titled “Encryption”- End-to-end encryption for sensitive data
- Password-based protection
- Secure key storage
Privacy
Section titled “Privacy”- Local-first architecture
- Configurable data retention
- Secure cloud sync
Platform-Specific Notes
Section titled “Platform-Specific Notes”- X11 support required
- KDE Plasma: Disable Focus Stealing Prevention
- GNOME: Wayland may need to be disabled
Windows
Section titled “Windows”- Standard Windows API integration
- System tray support
- Autostart capabilities
- Hotkey configuration may need adjustment
- Apple Silicon support
- Intel Mac support
Build and Deployment
Section titled “Build and Deployment”Build Process
Section titled “Build Process”- Frontend build with Vite
- Rust compilation
- Tauri bundling
- Platform-specific packaging
Distribution
Section titled “Distribution”- Windows:
.exeinstaller - Linux:
.deb,.rpm,.AppImage - macOS:
.dmgpackage
Contributing
Section titled “Contributing”Development Guidelines
Section titled “Development Guidelines”- Follow TypeScript best practices
- Use Rust idioms and patterns
- Maintain test coverage
- Document new features
Code Style
Section titled “Code Style”- Frontend: Prettier + ESLint
- Backend: rustfmt
- Documentation: Markdown
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”- Hotkey conflicts
- Database corruption
- Sync issues
- Platform-specific quirks
Debug Mode
Section titled “Debug Mode”- Enable debug logging
- Check system logs
- Verify permissions