{"id":34935275,"url":"https://github.com/layyser/whisper","last_synced_at":"2026-05-24T19:03:59.470Z","repository":{"id":329007762,"uuid":"1111307647","full_name":"Layyser/Whisper","owner":"Layyser","description":"Whisper - Secure P2P Communication Platform  A lightweight, serverless peer-to-peer communication app built with WebRTC. Connect directly with one other person for private chatting, voice/video calls, screen sharing, and file transfers—no intermediary servers storing your data.","archived":false,"fork":false,"pushed_at":"2025-12-16T18:47:47.000Z","size":4923,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-20T09:50:59.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Layyser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-06T17:20:38.000Z","updated_at":"2025-12-16T17:41:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Layyser/Whisper","commit_stats":null,"previous_names":["layyser/whisper"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Layyser/Whisper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Layyser%2FWhisper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Layyser%2FWhisper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Layyser%2FWhisper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Layyser%2FWhisper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Layyser","download_url":"https://codeload.github.com/Layyser/Whisper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Layyser%2FWhisper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28057671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-26T02:00:06.189Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-26T18:02:23.887Z","updated_at":"2026-05-24T19:03:59.465Z","avatar_url":"https://github.com/Layyser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Whisper 🤫\n\u003e A secure, private, and direct P2P video and chat application.\n\nWhisper is a real-time communication platform designed to demonstrate the power of **WebRTC** and **Peer-to-Peer (P2P)** technologies. It allows users to chat, share files, and make audio/video calls directly between devices without the data passing through a central server (except for signaling).\n\n\n## 🚀 Features\n\n-   **Real-time Chat:** Instant messaging with delivery status.\n-   **P2P Video \u0026 Audio Calls:** High-quality calls connecting directly between users.\n-   **File Sharing:** Send files of any size directly peer-to-peer.\n-   **End-to-End Encryption:** All media and data are encrypted by WebRTC standards.\n-   **Latency Ping:** Verify your direct connection speed with the built-in P2P Ping tool.\n-   **Connection Stats:** Real-time monitoring of connection type (P2P/Relay) and bitrate.\n-   **Mobile Responsive:** Professional UI that adapts to phones, tablets, and desktops.\n-   **Dockerized:** Easy deployment with Docker Compose.\n\n---\n\n## 🛠️ Technology Stack\n\n### Backend (Signaling Server)\n-   **Language:** Go (Golang) 1.23\n-   **Library:** `gorilla/websocket`\n-   **Role:** The server acts **only** as a matchmaker. It helps two peers find each other by exchanging \"Signaling\" data (SDP and ICE candidates). Once connected, the server is not involved in the media or data transfer.\n-   **Security:** Supports TLS/SSL (HTTPS/WSS) for secure signaling.\n\n### Frontend (Client)\n-   **Core:** Vanilla JavaScript (ES6+), HTML5, CSS3.\n-   **Protocol:** **WebRTC** (RTCPeerConnection, RTCDataChannel).\n-   **Styling:** Custom CSS with a mobile-first, responsive design.\n-   **No Frameworks:** Built without React/Vue/Angular to demonstrate the raw power of browser APIs.\n\n### Infrastructure\n-   **Containerization:** Docker \u0026 Docker Compose (Alpine Linux base).\n-   **TLS/HTTPS:** Caddy reverse proxy (HTTPS for WebRTC secure context).\n\n---\n\n## 🔄 How It Works (The Workflow)\n\n### 1. The Handshake (Signaling)\nBefore two devices can talk directly, they need to know how to reach each other. This is done via the **Signaling Server**:\n1.  **User A** joins a room.\n2.  **User B** joins the same room.\n3.  The server notifies User A that User B has joined.\n\n### 2. Establishing the P2P Connection\nWhen User A calls User B:\n1.  **Offer:** User A creates an \"Offer\" (SDP) describing their media capabilities (codecs, encryption) and sends it to the server.\n2.  **Relay:** The server forwards this Offer to User B.\n3.  **Answer:** User B accepts the offer, creates an \"Answer\" (SDP), and sends it back via the server.\n4.  **ICE Candidates:** Both devices discover their network paths (IP addresses, ports) and exchange them as \"ICE Candidates\".\n\n### 3. Direct Communication (P2P)\nOnce the handshake is complete:\n-   **Video/Audio:** Flows directly from Device A \u003c-\u003e Device B via UDP.\n-   **Chat/Files:** Flows through an `RTCDataChannel` (SCTP protocol) directly between peers.\n-   **Privacy:** The server **cannot** see or record the video, audio, or file contents.\n\n---\n\n## ⚡ P2P Verification\nTo prove the connection is truly Peer-to-Peer:\n1.  Start a chat or call.\n2.  Click the **⚡ (Lightning)** button in the chat header.\n3.  This sends a timestamped message through the direct data channel.\n4.  The round-trip time (Latency) will be displayed. In a local network, this is often **\u003c 10ms**, which is impossible if routing through a remote server.\n\n---\n\n## 📦 Installation \u0026 Usage\n\n### Prerequisites\n-   Docker \u0026 Docker Compose (v2)\n-   A modern web browser (Chrome, Firefox, Safari)\n\n### Quick Start\n\n1.  **Clone the repository:**\n    ```bash\n    git clone https://github.com/yourusername/whisper.git\n    cd whisper\n    ```\n\n2.  **Run with Docker Compose:**\n    ```bash\n    docker compose up -d --build\n    ```\n\n3.  **Access the App:**\n    -   Open `https://YOUR_LOCAL_IP:8080` (e.g., `https://192.168.1.50:8080`) on your computer and mobile phone.\n    -   If you use a public domain with Caddy, HTTPS is handled automatically.\n\n### Why HTTPS?\nWebRTC requires a \"Secure Context\" (HTTPS or localhost) to access the microphone and camera. In this project, HTTPS is provided by Caddy (reverse proxy) when deployed.\n\n---\n\n## 📱 Mobile Support\nThe application features a responsive design:\n-   **Desktop:** Sidebar with user list is always visible.\n-   **Mobile:** Sidebar slides away when chatting. Swipe or use the \"Back\" button to return to the user list.\n-   **Controls:** Large, touch-friendly buttons for calls and media.\n\n---\n\n## 📝 License\nMIT License - Feel free to use and modify for educational purposes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayyser%2Fwhisper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flayyser%2Fwhisper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayyser%2Fwhisper/lists"}