โ— PHANTOM
๐Ÿ‡ฎ๐Ÿ‡ณ IN
โœ•
Skip to content

Secure P2P communication platform with E2E encrypted video calls, messaging, and file sharing. Built on WebRTC, Hyperswarm DHT and Nostr protocols. No central servers - your data stays on your devices.

License

Notifications You must be signed in to change notification settings

P2Pigeon/Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P2Pigeon ๐Ÿ•Š๏ธ

Secure Peer-to-Peer Communications Platform

TypeScript React Vite Tailwind CSS WebRTC License

Security Architecture Protocol Encryption Signatures PRs Welcome

Enterprise grade encrypted peer-to-peer communications with zero-knowledge architecture. No servers store your data. No intermediaries access your keys. Complete operational security.


Executive Summary

P2Pigeon is a decentralized communications platform designed for organizations requiring the highest levels of security and privacy. Unlike traditional video conferencing solutions that route all traffic through centralized servers, P2Pigeon establishes direct encrypted connections between participants.

Key Differentiators:

  • Zero-Knowledge Architecture โ€” Encryption keys never leave user devices
  • Serverless Operation โ€” No infrastructure to compromise or subpoena
  • Metadata Protection โ€” IP addresses, network topology, and timing information are stripped
  • Censorship Resistant โ€” Distributed hash table discovery prevents blocking
  • Open Source โ€” Full audit capability, no hidden backdoors

System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                           P2PIGEON SYSTEM ARCHITECTURE                              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚                            PRESENTATION LAYER                                โ”‚   โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  Video UI   โ”‚  โ”‚  Chat UI    โ”‚  โ”‚ Data Room   โ”‚  โ”‚  Contacts   โ”‚          โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  (RoomPage) โ”‚  โ”‚  (Nostr)    โ”‚  โ”‚  (Files)    โ”‚  โ”‚  (ED25519)  โ”‚          โ”‚   โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚            โ”‚                โ”‚                โ”‚                โ”‚                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚                          PROTOCOL ABSTRACTION LAYER                          โ”‚   โ”‚
โ”‚  โ”‚                                                                              โ”‚   โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚   โ”‚
โ”‚  โ”‚  โ”‚                        ProtocolManager.ts                             โ”‚   โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  โ€ข Unified API for all communication protocols                        โ”‚   โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  โ€ข Automatic protocol negotiation and fallback                        โ”‚   โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  โ€ข Event normalization across protocol adapters                       โ”‚   โ”‚   โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚   โ”‚ 
โ”‚  โ”‚                                    โ”‚                                         โ”‚   โ”‚
โ”‚  โ”‚           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                โ”‚   โ”‚
โ”‚  โ”‚           โ–ผ                        โ–ผ                        โ–ผ                โ”‚   โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ WebRTCAdapter   โ”‚    โ”‚ServerlessMesh   โ”‚    โ”‚  NostrAdapter   โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚                 โ”‚    โ”‚    Adapter      โ”‚    โ”‚                 โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ โ€ข ICE/STUN/TURN โ”‚    โ”‚ โ€ข DHT Discovery โ”‚    โ”‚ โ€ข Relay-based   โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ โ€ข DTLS-SRTP     โ”‚    โ”‚ โ€ข Mesh Topology โ”‚    โ”‚ โ€ข NIP-04 E2E    โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ โ€ข DataChannel   โ”‚    โ”‚ โ€ข VAD Routing   โ”‚    โ”‚ โ€ข Persistence   โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜           โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚              โ”‚                      โ”‚                      โ”‚                        โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚                           TRANSPORT LAYER                                    โ”‚   โ”‚
โ”‚  โ”‚                                                                              โ”‚   โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚    WebRTC       โ”‚    โ”‚   Hyperswarm    โ”‚    โ”‚  Nostr Relays   โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚                 โ”‚    โ”‚      DHT        โ”‚    โ”‚                 โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ โ€ข P2P Media     โ”‚    โ”‚ โ€ข Distributed   โ”‚    โ”‚ โ€ข Decentralized โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ โ€ข NAT Traversal โ”‚    โ”‚ โ€ข Serverless    โ”‚    โ”‚ โ€ข Redundant     โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ โ€ข Encrypted     โ”‚    โ”‚ โ€ข Holepunching  โ”‚    โ”‚ โ€ข Censorship-   โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚   Resistant     โ”‚           โ”‚   โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜           โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                                                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚                           SECURITY LAYER                                     โ”‚   โ”‚
โ”‚  โ”‚                                                                              โ”‚   โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  AES-256-GCM โ”‚  โ”‚   X25519     โ”‚  โ”‚   ED25519    โ”‚  โ”‚    BLAKE3    โ”‚      โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  Symmetric   โ”‚  โ”‚   Key        โ”‚  โ”‚   Digital    โ”‚  โ”‚    Hashing   โ”‚      โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  Encryption  โ”‚  โ”‚   Exchange   โ”‚  โ”‚   Signatures โ”‚  โ”‚              โ”‚      โ”‚   โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚   โ”‚
โ”‚  โ”‚                                                                              โ”‚   โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚   โ”‚
โ”‚  โ”‚  โ”‚                     Metadata Protection                                โ”‚  โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  โ€ข SDP Sanitization (removes private IPs, MACs, hardware IDs)          โ”‚  โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  โ€ข ICE Candidate Filtering (strips host candidates, mDNS)              โ”‚  โ”‚   โ”‚
โ”‚  โ”‚  โ”‚  โ€ข Timing Attack Mitigation (randomized delays)                        โ”‚  โ”‚   โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                                                                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Communication Modes

Mode 1: Serverless Mesh (Experimental)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    SERVERLESS MESH TOPOLOGY                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                 โ”‚
โ”‚           โ”Œโ”€โ”€โ”€โ”€โ”€โ”                           โ”Œโ”€โ”€โ”€โ”€โ”€โ”             โ”‚
โ”‚           โ”‚  A  โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€ WebRTC โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚  B  โ”‚             โ”‚
โ”‚           โ””โ”€โ”€โ”ฌโ”€โ”€โ”˜         (E2E)             โ””โ”€โ”€โ”ฌโ”€โ”€โ”˜             โ”‚
โ”‚              โ”‚                                 โ”‚                โ”‚
โ”‚              โ”‚         Hyperswarm DHT          โ”‚                โ”‚
โ”‚              โ”‚      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”‚                โ”‚
โ”‚              โ””โ”€โ”€โ”€โ”€โ”€โ–บโ”‚   Discovery   โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                โ”‚
โ”‚                     โ”‚   (No Server) โ”‚                           โ”‚
โ”‚              โ”Œโ”€โ”€โ”€โ”€โ”€โ–บโ”‚               โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                โ”‚
โ”‚              โ”‚      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ”‚                โ”‚
โ”‚              โ”‚                                 โ”‚                โ”‚
โ”‚           โ”Œโ”€โ”€โ”ดโ”€โ”€โ”                           โ”Œโ”€โ”€โ”ดโ”€โ”€โ”             โ”‚
โ”‚           โ”‚  C  โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€ WebRTC โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚  D  โ”‚             โ”‚
โ”‚           โ””โ”€โ”€โ”€โ”€โ”€โ”˜         (E2E)             โ””โ”€โ”€โ”€โ”€โ”€โ”˜             โ”‚
โ”‚                                                                 โ”‚
โ”‚              โœ“ Zero infrastructure cost                         โ”‚
โ”‚              โœ“ Infinite horizontal scale                        โ”‚
โ”‚              โœ“ No single point of failure                       โ”‚
โ”‚              โœ“ Censorship resistant                             โ”‚
โ”‚              โœ“ 100+ participant support                         โ”‚
โ”‚                                                                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Specifications:

Attribute Value
Discovery Hyperswarm DHT (Kademlia-based)
Signaling Encrypted P2P via DHT
Media WebRTC DTLS-SRTP
Topology Full mesh (โ‰ค8), Selective forwarding (>8)
Max Participants 100+
Server Dependency None (DHT relay for browser compat only)

Mode 2: WebRTC Classic

Traditional WebRTC with signaling server. Used when:

  • Corporate firewalls block DHT traffic
  • Legacy browser compatibility required
  • Small team deployments (โ‰ค8 participants)

Security Model

Cryptographic Primitives

Layer Algorithm Purpose Key Size
Symmetric Encryption AES-256-GCM Message/file encryption 256-bit
Key Exchange X25519 ECDH key agreement 256-bit
Digital Signatures ED25519 Identity verification 256-bit
Hashing BLAKE3 Integrity verification 256-bit
Channel Security Noise Protocol (XX) Perfect forward secrecy Per-session
Media Encryption DTLS-SRTP WebRTC media streams Per-stream

Threat Model

Mitigated Threats:

Threat Mitigation
Passive surveillance (ISP/State) E2E encryption, no plaintext transit
MITM attacks ED25519 identity verification, certificate pinning
Server compromise Zero-knowledge architecture, no server-side keys
Metadata correlation IP stripping, timing randomization
Replay attacks Timestamps, nonces, sequence numbers
Traffic analysis Padding, constant-rate options

Out of Scope:

Threat Reason
Endpoint compromise Requires device-level security
Participant recording Social/policy problem, not technical

Metadata Protection

// SDP Sanitization
sanitizeSDP(sdp) โ†’ removes:
  โ”œโ”€โ”€ Private IP addresses (RFC 1918)
  โ”œโ”€โ”€ MAC addresses
  โ”œโ”€โ”€ Hardware identifiers
  โ”œโ”€โ”€ Network topology hints
  โ””โ”€โ”€ Browser fingerprinting data

// ICE Candidate Filtering  
sanitizeIceCandidate(candidate) โ†’ removes:
  โ”œโ”€โ”€ Host candidates (local IPs)
  โ”œโ”€โ”€ mDNS candidates
  โ””โ”€โ”€ Relay server identifiers

Technical Specifications

Video Quality Tiers

Voice Activity Detection (VAD) automatically allocates bandwidth:

Role Resolution Codec Bitrate Trigger
Primary Speaker 1080p60 AV1/VP9 8 Mbps Active speech
Recent Speakers 720p30 VP9 2.5 Mbps Speech in last 10s
Gallery View 480p30 VP8 1 Mbps Visible in grid
Thumbnails 240p15 VP8 300 kbps Minimized

Network Requirements

Metric Minimum Recommended
Bandwidth (per stream) 1 Mbps 8 Mbps
Latency <300ms <100ms
Packet Loss <5% <1%
Ports UDP 10000-60000 Same

Project Structure

pigeon/
โ”œโ”€โ”€ app/                          # Backend services
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ server.ts             # Express signaling server
โ”‚   โ”‚   โ”œโ”€โ”€ hypernat/             # DHT relay for browsers
โ”‚   โ”‚   โ”œโ”€โ”€ dataroom/             # Hyperdrive file manager
โ”‚   โ”‚   โ””โ”€โ”€ sfu/                  # Optional SFU for large groups
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ frontend/                     # React SPA
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ protocols/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ WebRTCAdapter.ts         # WebRTC implementation
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ServerlessVideoMesh.ts   # P2P mesh engine
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ HyperswarmSignaling.ts   # DHT signaling
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ sdpUtils.ts              # Privacy utilities
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ProtocolManager.ts           # Protocol abstraction
โ”‚   โ”‚   โ”œโ”€โ”€ context/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ CommunicationContext.tsx     # Global state
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ RoomPage.tsx                 # Video conferencing
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DashboardPage.tsx            # Main dashboard
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ NostrChatPage.tsx            # Decentralized chat
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ DataRoom.tsx                 # Secure file sharing
โ”‚   โ”‚   โ””โ”€โ”€ components/
โ”‚   โ”‚       โ”œโ”€โ”€ video/                       # Video components
โ”‚   โ”‚       โ”œโ”€โ”€ chat/                        # Chat components
โ”‚   โ”‚       โ””โ”€โ”€ whiteboard/                  # Collaboration tools
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ””โ”€โ”€ docs/                         # Documentation

Quick Start

Prerequisites

  • Node.js 18+ (LTS recommended)
  • pnpm 8+

Installation

# Clone repository
git clone https://github.com/ArqonAi/pigeon.git
cd pigeon

# Install dependencies
pnpm install

# Start backend (signaling + DHT relay)
cd app && pnpm dev

# Start frontend (separate terminal)
cd frontend && pnpm dev

# Access application
open http://localhost:5173

Environment Configuration

# frontend/.env
VITE_SIGNALING_URL=http://localhost:3060
VITE_DHT_RELAY_URL=ws://localhost:3051

# app/.env
PORT=3060
DHT_RELAY_PORT=3051

Deployment

Production Build

# Build frontend
cd frontend && pnpm build

# Build backend
cd app && pnpm build

Docker Deployment

docker-compose up -d

Infrastructure Requirements

Component Minimum Recommended
CPU 2 cores 4+ cores
RAM 2 GB 8 GB
Storage 10 GB 100 GB
Network 100 Mbps 1 Gbps

API Reference

Protocol Manager

// Initialize
const protocolManager = new ProtocolManager();
await protocolManager.initialize(configs);

// Join room
const room = await protocolManager.joinRoom(roomId, protocol);

// Media control
await protocolManager.startLocalStream(audioDeviceId, videoDeviceId);
protocolManager.stopLocalStream();

// Messaging
await protocolManager.sendMessage(roomId, content);

// Host controls
protocolManager.muteParticipant(peerId, muted);
protocolManager.kickParticipant(peerId);

Events

protocolManager.on('onPeerConnect', (peer) => { });
protocolManager.on('onPeerDisconnect', (peerId) => { });
protocolManager.on('onMessageReceived', (message) => { });
protocolManager.on('onRemoteStreamAdded', (peerId, stream) => { });

Contributing

We welcome contributions. Please read our Contributing Guide before submitting PRs.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Standards

  • TypeScript strict mode
  • ESLint + Prettier formatting
  • Comprehensive test coverage
  • Documentation for public APIs

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

This means:

  • โœ… You can use, modify, and distribute this software
  • โœ… You can use it for commercial purposes
  • โš ๏ธ If you modify and deploy as a network service, you must release your source code
  • โš ๏ธ Derivative works must use the same license

See LICENSE for the full text.

Why AGPL-3.0?

P2Pigeon is a privacy-focused platform. We chose AGPL-3.0 to ensure:

  1. Transparency โ€” Anyone running a P2Pigeon service must share their modifications
  2. Trust โ€” Users can verify no backdoors exist in their service provider's version
  3. Community โ€” Improvements benefit everyone, not just proprietary forks

Acknowledgments

Built on:


P2Pigeon โ€” Communication without compromise. ๐Ÿ•Š๏ธ

Website ยท Issues

About

Secure P2P communication platform with E2E encrypted video calls, messaging, and file sharing. Built on WebRTC, Hyperswarm DHT and Nostr protocols. No central servers - your data stays on your devices.

Topics

Resources

License

Contributing

Stars

Watchers

Forks