# P2P Chat & File Transfer A secure, serverless peer-to-peer chat application built with Rust and iroh. ## Features - **Decentralized**: No central server; peers connect directly via QUIC and NAT traversal. - **Commands**: - `/connect `: Connect to a peer. - `/nick `: Set your display name. - `/file `: Send a file. - `/accept `: Accept a file transfer. - `/mic`: Select microphone input. - `/speaker`: Select speaker output. - `/bitrate `: Set audio bitrate. - **Cross-Platform**: Works on Linux, Windows, and macOS. - File sharing supported on all platforms. - Voice/Screen share (Linux only for now, requires PipeWire). ## Installation 1. Install Rust: https://rustup.rs/ 2. Clone the repo: ```bash git clone https://github.com/yourusername/p2p-chat.git cd p2p-chat ``` 3. Build & Run: ```bash cargo run --release ``` ## Usage 1. **Start the app**. You will see your **Peer ID** in the top bar. 2. **Share your Peer ID** with a friend. 3. **Connect**: Type `/connect `. 4. **Chat**: Type messages and press Enter. 5. **Send Files**: - Type `/file` to open a file picker. - Or `/file /path/to/file` to send immediately. - The recipient must type `/accept ` (or click accept if TUI supports mouse). ## Configuration Configuration is stored in: - Linux: `~/.config/p2p-chat/config.toml` - Windows: `%APPDATA%\p2p-chat\config.toml` - macOS: `~/Library/Application Support/p2p-chat/config.toml` You can customize colors, default resolution, interface, etc.