Development Guide
If you are a developer and want to contribute code to this project or build it yourself, please refer to the following guide.
Tech Stack
This project is built with a modern tech stack, balancing performance and development experience:
- Core Framework: Tauri v2 (Rust + Webview)
- Frontend Framework: Vue 3 + TypeScript
- Styling: Tailwind CSS v4
- UI Components: Radix Vue + Lucide Icons
- Database: SQLite (via
rusqlitedriver)
Recent Features & Improvements
- Async OCR Refactor: Windows and macOS OCR logic is now fully async, preventing deadlocks and database lock issues.
- Robust History Management: History deletion now includes confirmation dialogs and protects pinned/collected items unless configured otherwise.
- Advanced Item Editing: You can add or edit text/code/url/email/phone clipboard items directly in the app (images not supported yet).
- Database Reliability: All database operations are now async, ensuring the database is never locked during heavy OCR or history operations.
- Frontend/Backend Sync: Tray menu and frontend state are always synchronized for a seamless experience.
Prerequisites
Before starting, please ensure your development environment has the following tools installed:
- Rust: Please install the latest stable version via rustup.
- Node.js: Recommended v20 or higher.
- pnpm: Package manager (
npm install -g pnpm). - System Dependencies:
- macOS: Requires Xcode Command Line Tools (
xcode-select --install). - Linux: Requires
libwebkit2gtk-4.0-dev,build-essential,curl,wget,libssl-dev,libgtk-3-dev,libayatana-appindicator3-dev, etc.
- macOS: Requires Xcode Command Line Tools (
Quick Start
-
Clone Repository
git clone https://github.com/tipsxBase/clipboard.git
cd clipboard -
Install Dependencies
pnpm install -
Start Development Mode
This command will start both the frontend development server and the Tauri backend, with hot reload enabled.
pnpm tauri dev
Build & Release
Build the production application bundle:
pnpm tauri build
The build artifacts will be located in the src-tauri/target/release/bundle/ directory.
Directory Structure
.
├── src/ # Frontend Vue source code
│ ├── components/ # UI Components
│ ├── composables/ # Composables (Hooks)
│ ├── lib/ # Utility functions
│ └── views/ # Page Views (MainWindow, PopupWindow)
├── src-tauri/ # Rust Backend source code
│ ├── src/
│ │ ├── db.rs # Database operations
│ │ ├── monitor.rs # Clipboard monitoring logic
│ │ └── ...
│ ├── tauri.conf.json # Tauri configuration
│ └── Cargo.toml # Rust dependencies
└── website/ # Documentation Website (Docusaurus)
Contributing
Pull Requests are welcome! Before submitting, please ensure:
- Code passes type check (
vue-tsc --noEmit). - Rust code passes compilation (
cargo check). - Keep code style consistent.