Portal is an always-on WebRTC-based peer-to-peer video tool for intra-office communication. All communication is encrypted, decentralized and peer-to-peer, except for the initial signaling which must be done through a central server because of the limitations of WebRTC.
- Always-on - A connection will always be re-established if it is lost
- Real-time peer-to-peer communication using WebRTC
- Zero-configuration - No need to join a room or wait for an invite
- Efficient signaling through Cloudflare Workers
- Simple and lightweight implementation
- Ring button to get the attention of a muted participant
- Morse code button to send a message to a participant
The project consists of two main components:
-
Backend (Cloudflare Worker)
- Extremely minimal - No user authentication, no user accounts, no user profiles
- Handles WebSocket connections for signaling
- Manages room state using Cloudflare KV
-
Frontend
- Zero-configuration - No need to join a room or wait for an invite
- Simplified interface
- Sound effects
- Built on Cloudflare Workers platform
- Uses WebSocket for signaling
- Implements WebRTC for peer-to-peer communication
- Stores room state in Cloudflare KV
- Supports automatic role assignment (offerer/answerer)
- Handles connection cleanup and room management
- Cloudflare account
- Wrangler CLI installed
- Node.js and npm
-
Clone the repository:
git clone [repository-url] cd portal -
Install dependencies:
npm install
-
Configure your Cloudflare Workers project:
- Update
wrangler.tomlwith your Cloudflare account details - Set up a KV namespace named
PORTAL_KV
- Update
-
Deploy to Cloudflare Workers:
wrangler deploy
- Access the application through your deployed worker URL
- The first user to join becomes the offerer
- Subsequent users become answerers
- WebRTC connection is established automatically
- Audio/video communication begins once the connection is established
To run the project locally:
wrangler devThe application can be tested by:
- Opening multiple browser windows
- Connecting to the same room
- Verifying audio/video communication
Contributions are welcome! Please feel free to submit a Pull Request.
MIT