Skip to content
/ voca Public

High-performance WebRTC signaling server in Rust with frontend SDKs. Self-hostable, stateless, and fast.

License

Notifications You must be signed in to change notification settings

treyorr/voca

voca.vc

Open-source WebRTC voice chat. Ephemeral rooms. No auth. Pure P2P.

CI npm @treyorr/voca-client npm @treyorr/voca-svelte npm @treyorr/voca-react License: MIT

Features

  • πŸ”’ Zero Persistence β€” No data stored, no accounts
  • 🌐 Pure P2P β€” Audio never touches the server (WebRTC mesh)
  • ⚑ Instant β€” One-click room creation
  • πŸ” Encrypted β€” DTLS-SRTP for all audio
  • πŸ”‘ Optional Passwords β€” Protect rooms with alphanumeric passwords
  • πŸ“± Responsive β€” Works on desktop and mobile

SDK Packages

Package Description
@treyorr/voca-client Core TypeScript SDK
@treyorr/voca-react React hooks
@treyorr/voca-svelte Svelte 5 runes wrapper

Quick Install

bun install @treyorr/voca-client
# or for frameworks:
bun install @treyorr/voca-react    # React
bun install @treyorr/voca-svelte   # Svelte 5

Usage Example (React)

import { useVocaRoom } from '@treyorr/voca-react';

function VoiceRoom({ roomId }) {
  const { status, peers, toggleMute, isMuted } = useVocaRoom(roomId, {
    password: 'secret123' // Optional: protect room with password
  });
  return (
    <button onClick={toggleMute}>{isMuted ? 'Unmute' : 'Mute'}</button>
  );
}

πŸ“– Full Documentation β†’


Self-Hosting

Voca is designed for easy self-hosting with Docker. No database or external dependencies required.

πŸ“– Self-Hosting Guide β†’


Development

With mise (recommended)

mise run dev

Manual

# Terminal 1: Signaling server
cd services/signaling && RUST_LOG=info cargo run

# Terminal 2: Web frontend
cd apps/web && bun install && bun run dev

Open http://localhost:5173


API

Endpoint Auth Description
POST /api/room?password=<pwd> - Create room (optional password) β†’ {"room": "abc123", "password": "pwd"}
GET /api/room/{id} - Check if room exists β†’ {"exists": true, "password_required": false}
GET /ws/{id}?password=<pwd> - WebSocket signaling (password required if room protected)
GET /api/admin/rooms Bearer List all rooms
GET /api/admin/metrics Bearer Usage metrics

Contributing

  1. Fork the repo
  2. Create a branch: git checkout -b my-feature
  3. Make your changes and run mise run lint
  4. Submit a PR

Please read our Code of Conduct first.


Documentation

  • voca.vc/docs β€” Full SDK and Self-Hosting documentation

License

MIT

About

High-performance WebRTC signaling server in Rust with frontend SDKs. Self-hostable, stateless, and fast.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published