102 Commits

Author SHA1 Message Date
158e001055 chore: update rondevu-client to v0.12.0 2025-12-07 22:23:13 +01:00
9967e8d762 Refactor demo to use new ServiceHost and ServiceClient API
- Update to @xtr-dev/rondevu-client v0.10.1
- Replace Rondevu class with RondevuService, ServiceHost, ServiceClient
- Simplify demo implementation (removed complex features)
- Use new event-driven API for connections
- Support custom RTC configuration
- Backup old implementation as App-old.jsx

Breaking changes from v1 API:
- RondevuService for username claiming
- ServiceHost for hosting services with offer pool
- ServiceClient for connecting with auto-reconnection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-07 19:46:07 +01:00
8c3f21f262 Update @xtr-dev/rondevu-client to v0.10.0
- ServiceHost: Manages offer pool for hosting services
- ServiceClient: Connects to hosted services with auto-reconnection
- RondevuService: High-level API for username claiming and service publishing

Note: Demo code still uses old Rondevu API and needs refactoring

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-07 19:39:54 +01:00
c511b15fbf Update to rondevu-client v0.9.2 with ICE collection fix
Updated to @xtr-dev/rondevu-client@0.9.2 which fixes critical timing
issue where ICE candidates were generated before handlers were attached.

Now includes detailed logging for service pool ICE candidate generation
with candidate types (host/srflx/relay) for debugging TURN issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-07 11:33:42 +01:00
71454e31d1 Add WebRTC configuration settings UI
Added a settings modal with dropdown to select from preset RTC
configurations or provide custom JSON config:

- IPv4 TURN (Recommended): Uses explicit IPv4 addresses to avoid
  DNS resolution issues and address type mismatches
- Hostname TURNS (TLS): Uses secure TURNS on port 5349 with hostname
- Google STUN Only: Minimal config for testing direct connections
- Force TURN Relay: Testing mode that forces relay usage
- Custom Configuration: Users can paste their own RTCConfiguration JSON

Settings are persisted in localStorage and applied to all new
connections and service exposures.

This allows users to test different configurations without rebuilding
and helps diagnose connection issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-07 11:26:44 +01:00
b2a17ce42b Update to rondevu-client v0.9.1 with ICE logging
Updated to @xtr-dev/rondevu-client@0.9.1 which includes detailed
ICE candidate exchange logging for debugging connection issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-07 11:15:07 +01:00
3a42f74371 Add TURNS (secure) endpoints for upgraded TURN server
Updated ICE configuration to use TURNS (TLS/DTLS) on port 5349
as the preferred relay method, with plain TURN on port 3478 as
fallback. WebRTC will try secure endpoints first for better
security and reliability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 15:58:15 +01:00
2cbd46b27a Fix datachannel name to match service pool
Changed channel name from 'chat' to 'rondevu-service' to match the
channel name created by the service pool. This fixes the connection
failure where the offerer's channel and answerer's channel had
different names and couldn't connect.

The service pool creates a channel named 'rondevu-service', so clients
must use the same name to receive that channel.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 13:59:30 +01:00
b3dde85cd2 Force TURN relay mode to bypass NAT hairpinning
Added iceTransportPolicy: 'relay' to RTC_CONFIG to force TURN relay usage.
This bypasses NAT hairpinning issues when testing on the same network
(e.g., two browser tabs on the same machine).

This setting ensures maximum compatibility and reliability for WebRTC
connections by always using the TURN relay instead of attempting direct
or STUN-based connections.

Note: Should be commented out in production to allow direct connections
when possible for better performance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 13:49:52 +01:00
66dc35c1a7 Remove rondevu-client from dependencies (using npm link)
The demo now uses npm link to use the local client development version
instead of the published package from npm registry.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 13:30:06 +01:00
74bf2757ff feat: v0.9.0 - durable WebRTC connections with automatic reconnection
- Replace low-level APIs with high-level durable connections
- Add automatic reconnection with exponential backoff
- Add message queuing during disconnections
- Add TTL auto-refresh for services
- Add comprehensive TypeScript types
- Update README and create MIGRATION.md guide

BREAKING CHANGES:
- Removed: client.services.*, client.discovery.*, client.createPeer()
- Added: client.exposeService(), client.connect(), client.connectByUuid()
- Handler signature changed from (channel, peer, connectionId?) to (channel, connectionId)
- Channels now use .on('message') instead of .onmessage
- Services must call service.start() to begin accepting connections
2025-12-06 12:58:30 +01:00
2550c1ac3f fix: set 5-minute TTL for chat services
Services were expiring after 60 seconds (default offer TTL).
Set TTL to 300000ms (5 minutes) so chat services stay discoverable
while users have the page open.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 19:44:36 +01:00
3d9a1c27bd chore: update to @xtr-dev/rondevu-client@0.8.3
Fix async ed25519 functions (signAsync, getPublicKeyAsync)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 19:20:19 +01:00
e26bdc308d fix: update package-lock.json to use client@0.8.2
Previous lock file had stale version 0.0.4 cached

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 19:13:08 +01:00
6650f51038 fix: improve auto-registration flow and error handling
- Fix setupStep logic to properly handle credential/username combinations
- Add console logs for debugging registration flow
- Move setupStep updates to prevent race conditions
- Always progress to claim step even if registration fails
- Reorganize initialization order

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 19:11:27 +01:00
0a975f4bcf feat: make registration automatic on first visit
- Auto-register on mount if no saved credentials exist
- Remove manual register button
- Show "Registering..." loading state instead
- Automatically progress to username claim step after registration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 19:09:17 +01:00
c889549362 chore: update to @xtr-dev/rondevu-client@0.8.2
Includes SHA-512 hash function initialization for ed25519

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 18:44:49 +01:00
fb9830ea8c chore: update to @xtr-dev/rondevu-client@0.8.1
Includes fix for V2 API exports (usernames, services, discovery)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 18:38:21 +01:00
5714731d71 chore: update package-lock.json for client@0.8.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 18:32:34 +01:00
4ff5da0568 feat: redesign demo as dark-themed P2P chat application
- Completely rewrite App.jsx as focused chat application
- Add contact management with localStorage persistence
- Add online status detection (checks every 10s for chat.rondevu@1.0.0 service)
- Implement pooled chat service (poolSize: 10) for multiple simultaneous connections
- Add real-time P2P messaging with unique connection IDs
- Add message history per contact with auto-scrolling
- Implement identification handshake protocol for connection tracking
- Apply dark theme (#1a1a1a background, #2a2a2a cards, #4a9eff accents)
- Remove all emojis from UI elements
- Update client dependency to ^0.8.0
- Add connection status indicators

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 18:26:48 +01:00
d575022412 Update README to include live API link for rondevu-server 2025-11-17 21:44:13 +01:00
84ceae9a05 Update live demo link in README to use ronde.vu domain 2025-11-17 21:43:09 +01:00
c5f640bc62 Expand README with links to related repositories and NPM packages 2025-11-17 21:41:52 +01:00
9163e5166c Replace preset topics with dynamic topic listing from server
Changed discover page to fetch and display real topics from the API:
- Added fetchTopics() to call client.offers.getTopics()
- Display actual topic names and active peer counts
- Added loading, error, and empty states
- Added refresh button to reload topics
- Improved UX with better error handling

Updated to @xtr-dev/rondevu-client@0.7.4

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 20:17:27 +01:00
7d3b19a2b0 Update README to use client.createPeer() method
- Replaced `new RondevuPeer(client.offers)` with `client.createPeer()`
- Updated import to show Rondevu instead of RondevuPeer

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 18:03:46 +01:00
7d19557966 Update README to reflect current RondevuPeer API
- Replaced all references to removed RondevuConnection class
- Updated to use RondevuPeer with state machine lifecycle
- Documented offerer and answerer state flows
- Added detailed "What Happens Under the Hood" section
- Updated all code examples to use addEventListener
- Added trickle ICE implementation details
- Documented timeout configurations
- Updated technical implementation section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 18:01:20 +01:00
70fd6bd16a Update rondevu-client to v0.7.3
Fixed answerer authorization for ICE candidates:
- Answer is now sent to server BEFORE setLocalDescription
- This ensures answererPeerId is registered before ICE candidates arrive
- Fixes 403 Forbidden errors when answerer sends candidates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 17:52:12 +01:00
6dece31f2d Update rondevu-client to v0.7.2
Critical fix for ICE candidate timing bug:
- ICE handler now set up BEFORE setLocalDescription
- Ensures all ICE candidates are captured and sent to server
- Fixes connection failures where peers received 0 candidates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 17:46:33 +01:00
b741e8f40c Update rondevu-client to v0.7.1
Updated to latest client version with:
- addEventListener/removeEventListener instead of .on* properties
- Extracted duplicate ICE handler code to base PeerState class
- Proper event listener cleanup to prevent memory leaks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 17:37:45 +01:00
2c20af83c9 feat: Update to @xtr-dev/rondevu-client@0.6.0
Includes proper trickle ICE support:
- Offers/answers sent immediately (no waiting for ICE)
- Answering state now takes ~50-200ms instead of 15+ seconds
- ICE candidates trickle in as they're discovered
- Faster connection establishment

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 17:13:18 +01:00
78c16c95f5 fix: Handle data channel onopen event for bidirectional messaging
The offerer creates the data channel immediately, but it's not in the
'open' state until the connection is established. The answerer receives
the channel later when it's typically already open.

Now we:
- Listen for channel.onopen and update the connection state when open
- Check if channel is already open and update immediately if so
- Add logging for channel state changes
- Handle channel errors and close events

This fixes the issue where only the answerer could send messages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 16:53:03 +01:00
953f62ce81 fix: Update to @xtr-dev/rondevu-client@0.5.1
Fixes timeout issue where answerer would fail when ICE gathering
took close to the timeout duration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 16:49:03 +01:00
c46bfb40a9 chore: Update to @xtr-dev/rondevu-client@0.5.0
- Update client dependency to 0.5.0 (state-based peer manager)
- Bump demo version to 0.5.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 16:41:26 +01:00
50eeec5164 refactor: Update demo to use RondevuPeer with state management
- Replace RondevuConnection with RondevuPeer throughout
- Add state event listener for better state tracking
- Add failed event listener with error details
- Configure timeouts for offer/answer operations
- Enhanced ICE debugging with candidate pair tracking
- Add connection failure detection and logging
- Improved error handling and user feedback
- Update version to v0.5.0 (State-Based Peer Manager)
- Update TURN server configuration to ronde.vu
- Add comprehensive logging for troubleshooting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 16:37:28 +01:00
217b84701f Remove STUN server, increase ICE candidate pool webrtc-works 2025-11-15 14:37:30 +01:00
273b6349c6 Force TCP transport for TURN (VPN blocks UDP relay) 2025-11-15 14:31:35 +01:00
37c84b7553 Use Metered TURN service 2025-11-15 14:23:52 +01:00
2d1b2e8ff4 Test with STUN-only (no TURN) to verify ICE candidate fix 2025-11-15 14:18:29 +01:00
c849f6a109 Revert to custom TURN server at 57.129.61.67
Back to using custom STUN/TURN server with IP address to avoid DNS lookup issues. Note: TURN relay still requires firewall port range to be opened.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 13:38:04 +01:00
0348ef5d8e Switch to ExpressTurn TURN server for testing
Using Google STUN servers and ExpressTurn relay server to test with the bug fix.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 13:33:38 +01:00
1ac1121793 Fix ICE candidate handling by using addEventListener
Changed from overwriting onicecandidate handlers (which broke the 'this' context) to using addEventListener. This ensures the connection manager's handlers can properly send ICE candidates without context issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 13:31:21 +01:00
caedff590f Switch to Metered TURN servers for testing
Temporarily using Metered.ca TURN servers to test WebRTC connectivity while diagnosing issues with custom TURN server relay ports.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 13:18:42 +01:00
d922329437 Add API-level ICE candidate exchange logging
Added logging to track when ICE candidates are sent to and received from the signaling server to help diagnose connection exchange issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 12:39:45 +01:00
4c58dee371 Add detailed ICE connection debugging
Added comprehensive logging for ICE gathering state, connection state, and candidate gathering to help diagnose connection issues. Properly chains event handlers to avoid breaking existing connection logic.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 12:34:51 +01:00
e4868c085b Fix DNS lookup errors by using IP address for STUN/TURN servers
Changed from domain names (stun.ronde.vu/turn.ronde.vu) to IP address (57.129.61.67) to resolve browser DNS lookup failures (error 701).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 12:31:07 +01:00
9a424b6015 Add both UDP and TCP transports for TURN server
Updated TURN server configuration to include both UDP and TCP transports for better compatibility and connection reliability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 12:27:11 +01:00
79030adb09 Update TURN server configuration to use UDP transport
Added ?transport=udp parameter to TURN server URL for improved connectivity.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 12:20:06 +01:00
1f1502940b Update TURN server credentials for ronde.vu 2025-11-14 22:37:10 +01:00
348a732178 Switch to custom STUN/TURN servers at ronde.vu 2025-11-14 22:31:15 +01:00
9e761546e7 Fix TURN server URL - add turn: prefix 2025-11-14 21:22:25 +01:00