BridgeSwarm Advanced Chat
A feature-rich P2P chat application built on BridgeSwarm with real-time messaging, rooms, file sharing, and more.
Features
Messaging
- Real-time P2P messaging between tabs/browsers
- Rich text formatting (bold, italic, code)
- Emoji support with quick picker
- Message timestamps
- System messages for join/leave events
Rooms
- Multiple chat rooms support
- Create custom rooms with topics
- Room member counts
- Quick room switching
User Management
- Custom nicknames
- Online user list with status indicators
- Unique avatar colors based on nickname
- User presence tracking
File Sharing
- Share files directly in chat
- File name and size display
- Download shared files
Customization
- Toggle notifications
- Sound effects on/off
- Auto-scroll control
- Dark theme UI
P2P Architecture
- No central server required
- Messages flow directly between peers
- Uses Hyperswarm for peer discovery
- Each tab gets unique public key for identity
How to Run
- Load the BridgeSwarm extension and native host.
- From the repo root:
npm run examples - Open http://127.0.0.1:4173/chat-advanced/ in two tabs.
Do not open via file:// — browsers treat each local file as a unique security origin.
Usage
Joining
- Enter a topic/address (or use default)
- Enter your nickname
- Click "Join"
Sending Messages
- Type in the message box
- Press Enter or click Send
- Use bold, italic, and
codeformatting