A modern, real-time clipboard synchronization solution built with Cloudflare Workers, WebSockets, and a native Windows client.
- Real-time Synchronization: WebSocket-based instant clipboard sync
- Cloudflare Infrastructure: Serverless, global, and scalable
- Cross-platform: Windows client + Web interface
- Dual Communication: WebSocket + HTTP API fallback
- Persistent Storage: Durable Objects for reliable data persistence
- Token-based Security: Simple authentication without accounts
- Silent Operation: Background mode with system tray integration
Windows Client (C#) ←→ WebSocket/HTTP ←→ Cloudflare Worker ←→ Durable Storage
Web Interface (Next.js) ←→ WebSocket ←→ Cloudflare Worker ←→ Durable Storage
- Cloudflare Worker: WebSocket server with Durable Objects and HTTP API
- Next.js Web App: Modern web interface with real-time sync
- Windows Client (Corridor): Native C# application with system tray
- Durable Storage: Persistent clipboard history and room management
sync/
├── server/ # Cloudflare server infrastructure
│ ├── worker/ # WebSocket Worker backend
│ │ ├── src/
│ │ │ ├── index.ts # Main worker entry point
│ │ │ ├── durable-object.ts # Durable Object for WebSocket handling
│ │ │ ├── types.ts # TypeScript definitions
│ │ │ └── handlers/ # Modular request handlers
│ │ │ ├── api-handler.ts # HTTP API endpoints
│ │ │ ├── websocket-handler.ts # WebSocket management
│ │ │ └── room-manager.ts # Room/token management
│ │ ├── wrangler.toml # Cloudflare Worker configuration
│ │ └── package.json
│ └── web/ # Next.js web interface
│ ├── src/
│ │ ├── app/ # Next.js App Router
│ │ │ ├── [token]/ # Token-based rooms
│ │ │ ├── about/ # About page
│ │ │ └── blogs/ # Documentation pages
│ │ ├── components/ # React components
│ │ │ ├── ClipboardHistory.tsx
│ │ │ ├── ClipboardInput.tsx
│ │ │ ├── ConnectionStatus.tsx
│ │ │ └── TokenInput.tsx
│ │ └── hooks/ # Custom React hooks
│ │ └── useWebSocket.ts
│ ├── public/ # Static assets
│ ├── package.json
│ └── next.config.ts
├── windows/ # Windows native client (C#)
│ ├── Core/ # Core functionality
│ │ ├── ConfigManager.cs # Configuration management
│ │ ├── ConnectionManager.cs # Network connection handling
│ │ ├── HotkeyManager.cs # Global hotkey support
│ │ └── MessageQueue.cs # Message queuing system
│ ├── Network/ # Network communication
│ │ ├── HttpClient.cs # HTTP client implementation
│ │ └── WebSocketClient.cs # WebSocket client
│ ├── UI/ # User interface
│ │ ├── MainApplication.cs # Main application window
│ │ ├── SetupWindow.cs # Initial setup dialog
│ │ ├── AboutDialog.cs # About dialog
│ │ └── NotificationManager.cs # System notifications
│ ├── Resources/ # Application resources
│ │ └── Icons/ # Application icons
│ ├── scripts/ # Build and deployment scripts
│ ├── Program.cs # Application entry point
│ ├── Corridor.csproj # C# project configuration
│ └── README.md
├── vercel.json # Vercel deployment configuration
├── package.json # Root package configuration
└── README.md
# Install dependencies
npm install
# Deploy the worker
npm run deploy:worker# Deploy to Vercel
vercel --prod# Build optimized executable
npm run build:windows- Visit your deployed web app
- Enter a token to create/join a room
- Start copying and pasting - it syncs in real-time!
- Run
Corridor.exefrom thewindows/publish/directory - Configure your settings in the setup window
- Choose normal mode (with GUI) or silent mode (background only)
- Your clipboard will sync automatically!
- Node.js 18+
- .NET 9.0 SDK (for Windows client)
- Cloudflare account (for worker deployment)
# Start web interface
npm run dev
# Start worker in development
npm run dev:worker
# Build Windows client
npm run build:windowsCLOUDFLARE_ACCOUNT_ID: Your Cloudflare account IDWORKER_NAME: Name for your workerCUSTOM_DOMAIN: Custom domain (optional)CLOUDFLARE_API_TOKEN: API token for deployment
- WebSocket URL:
wss://your-worker.workers.dev/ws - HTTP URL:
https://your-worker.workers.dev - Token: Your room token
- Silent Mode: Run in background without GUI