Real-Time Code Collaboration for Hackathon Teams
No cloud. No signup. No config. Just your IDE and your team.
What is HackPair?
HackPair lets you and your teammates code together in real time. See each other's cursors, code, and files right in VS Code — with zero setup and zero accounts.
One extension. One link. Instant collaboration.
Features
| 🔴 Live Cursors | See where your teammates are working in your editor |
| 📝 Real-Time Sync | Code edits sync instantly across all members |
| 👥 Team Awareness | See who's online, click to view their file tree |
| 📂 Shared Workspaces | Browse any teammate's files from your sidebar |
| 🔒 End-to-End Secure | Your code stays on your machine; nothing leaves without permission |
| 🔄 Auto-Reconnect | Reopen VS Code → back in the room instantly |
| 🌐 Public Tunnels | Built-in Cloudflare tunnel — remote teammates connect automatically |
| 🛡️ Edit Permissions | Host controls who can edit; guests request access |
Requirements
- VS Code 1.85 or later
- Node.js 18 or later (bundled with VS Code)
Quick Start
Install
Download the latest .vsix from Releases and install:
code --install-extension hackpair-0.3.1.vsix
Or install from the VS Code Marketplace (coming soon).
Create a Room
- Click the HackPair icon (⇄) in the VS Code sidebar
- Enter your display name
- Click Create Room
- Select your workspace folder to share
- Copy the invite link → share it with your team
Join a Room
- Click the HackPair icon in the VS Code sidebar
- Enter your display name
- Paste the invite link (or just the 6-character invite code)
- Click Join Room
- Select your workspace folder to share
How It Works
┌──────────────────────────────────────────────────────────┐
│ HackPair │
├──────────────────────────────────────────────────────────┤
│ │
│ My Room │
│ http://192.168.1.100:3001?room=ABC123 │
│ [Copy Link] [Copy Code] │
│ │
│ Team (3) │
│ ──────────────── │
│ 🔵 Alice (you) │
│ 🟢 Bob ← click to view their files │
│ 🟡 Charlie ← click to view their files │
│ │
│ [Leave Room] │
│ │
└──────────────────────────────────────────────────────────┘
- Host creates a room → local server starts + Cloudflare tunnel (automatic)
- Host shares the link → teammates paste it into their HackPair sidebar
- Everyone connects → cursors, edits, and file trees sync in real-time
- Click any teammate → browse their file tree → click a file → read their code
Network & Security
| Scenario | How it Works |
|---|---|
| Same WiFi / LAN | Direct connection via local IP (http://192.168.x.x:3001) |
| Remote Team | Cloudflare Quick Tunnel — automatic, no account or token needed |
| Custom Port | Set PORT environment variable (defaults to 3001) |
Security
- No cloud — your code stays on your machine. The server runs locally.
- No accounts. No usernames, passwords, or personal data collected.
- Cryptographic tokens (64-char random hex) authenticate each member.
- Path traversal protection — remote members cannot access files outside your shared workspace.
- Edit permissions — host controls who can edit files.
- CORS allows only localhost, LAN IPs, and
*.trycloudflare.com.
Commands & Contributing
| Command | Description |
|---|---|
npm run build |
Build all packages (shared, server, extension) |
npm run typecheck |
TypeScript type checking (all packages) |
npm run package |
Build + create .vsix for distribution (run in packages/extension) |
Development Setup
git clone https://github.com/Hussaincodes01/hackpair.git
cd hackpair
npm install
npm run build
npm run package # creates packages/extension/hackpair-0.3.1.vsix
Tech Stack
| Layer | Technology |
|---|---|
| Server | Fastify |
| Real-time | Socket.IO |
| Database | sql.js (SQLite / WASM) |
| CRDT | Y.js |
| Tunneling | cloudflared |
| Extension | VS Code API |
Project Structure
hackpair/
├── packages/
│ ├── extension/ # VS Code extension
│ │ ├── src/ # TypeScript source
│ │ ├── dist/ # Bundled output
│ │ └── node_modules/ # cloudflared (bundled in vsix)
│ ├── server/ # Server source (bundled into extension/dist/)
│ ├── shared/ # Zod schemas & shared types
│ └── dashboard-tool/ # Standalone server + web dashboard
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open a Pull Request
License
MIT License — see LICENSE for details.