Repository navigation
1 Architecture Overview
Your Name edited this page Aug 26, 2026
·
1 revision
Tincan CLI is built from the ground up to provide serverless multi-channel voice and text communication inside standard terminal emulators.
Centralized communications systems (Discord, Teams, Slack) rely on server infrastructure to route all traffic. Tincan decouples communication into two independent network planes:
┌─────────────────────────────────┐
│ Coordinator (Room Host) │
└────────┬───────────────┬────────┘
│ │
Control Stream │ │ Control Stream
(Reliable QUIC)│ │ (Reliable QUIC)
│ │
┌───────▼───────┐ ▼───────┐
│ Peer B │◄─────►│Peer C │
└───────────────┘ └───────┘
Direct Voice Mesh (Datagrams)
-
Host / Coordinator: The first user who creates a room via
tincan hostacts as the room coordinator. - Responsibility: Authoritative room state, roster management, channel definition, password admission verification, and text chat message broadcast.
-
Protocol: Reliable QUIC streams using Postcard binary serialization (
src/proto.rs,src/net/control.rs). - Traffic: Tiny footprint (~300 B/s per client).
- Peers: Every client in a voice channel connects directly to all other peers in that same channel.
- Responsibility: Real-time Opus audio transmission.
-
Protocol: QUIC unreliable datagrams (
src/net/voice.rs). - Coordinator Isolation: Voice payloads never pass through the coordinator. The host is not an audio relay or bottleneck.
The room state is managed by the Room struct (src/room.rs).
-
State Initialization: Host creates a room with custom or default channels (
general,gaming,music). -
Peer Join Sequence:
- Joining client connects over Iroh QUIC endpoint.
- Host sends password challenge nonce (
Argon2id). - Client sends proof.
- Host validates proof, assigns a unique
PeerId, and returns aWelcomesnapshot containing channels, roster, and chat history.
-
Roster Convergence: When a peer switches channels, mutes, or deafens, a
RosterUpdatenotice is broadcast to all participants.
Voice mesh bandwidth scales with active voice participants
For standard 48 kHz mono speech at 24 kbps with 20ms frames:
- 2 Peers: 24 kbps upload / 24 kbps download
- 4 Peers: 72 kbps upload / 72 kbps download
- 6 Peers: 120 kbps upload / 120 kbps download
For 2–8 participants, full mesh P2P delivers sub-50ms latency without server hosting costs.