Commit Graph

55 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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 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
f9fb74de53 Switch to Google STUN + expressturn.com TURN server 2025-11-14 21:20:31 +01:00
e5e28c8264 Update metered.ca credentials and ICE server configuration 2025-11-14 21:12:30 +01:00
4021a02f6d Add TURN servers back using a.relay.metered.ca endpoint 2025-11-14 21:09:11 +01:00
73f04bc078 Restore Google STUN servers only (metered.ca DNS lookup failing) 2025-11-14 21:07:37 +01:00
257d8f264a Remove Google STUN servers, use only metered.ca ICE servers 2025-11-14 21:01:28 +01:00
83df6aeee3 Add Google STUN servers for reliability
Added Google STUN servers alongside metered.ca for maximum
reliability. Google STUN always works and ensures basic NAT
traversal even if TURN servers fail.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 20:44:06 +01:00
c3045778eb Use metered.ca ICE servers with all transport options
- metered.ca STUN server
- TURN on port 80 (UDP and TCP)
- TURN on port 443 (UDP)
- TURNS on port 443 (TCP/TLS)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 20:37:33 +01:00
dc856b7abf Fix: Restore Google STUN servers
The connection was failing because Google STUN servers were removed.
Restored to the working configuration with Google STUN + metered.ca TURN.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 20:27:40 +01:00
ed8709c6f6 Update ICE servers to metered.ca with full transport options
- Removed Google STUN servers
- Added metered.ca STUN server
- Added TCP transport for TURN servers
- Added TURNS (secure) on port 443

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 20:23:14 +01:00
b27ab02552 Add metered.ca TURN server on port 80
Added additional TURN server endpoint for better connectivity.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 20:11:45 +01:00
2dc4c711e3 Update ICE servers to use metered.ca TURN
Switched to single metered.ca TURN server on port 443.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 20:00:28 +01:00
b8637ed8ad Update ICE servers to use expressturn.com
Switched from metered.ca to expressturn.com TURN server
to avoid 701 host lookup errors.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 19:57:09 +01:00
94b2849971 Fix: Add cleanup on component unmount
- Close all connections when component unmounts
- Prevents polling timers from running after unmount
- Better resource cleanup

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 19:48:23 +01:00
65f4aaffe0 Fix authentication check and credential validation
- Add authentication check before allowing peer discovery
- Validate stored credentials have required fields (peerId, secret)
- Remove invalid/corrupted credentials from localStorage
- Show clear error message when trying to discover without auth

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 19:05:44 +01:00
e1c8c25ea8 Add TURN servers back for restrictive NAT support
- Re-add metered.ca TURN servers on ports 80 and 443
- Keep Google STUN servers for NAT detection
- Enables connections through restrictive firewalls

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 19:01:59 +01:00
600d6308b9 Update API URL to api.ronde.vu and simplify ICE config
- Change API URL from rondevu.xtrdev.workers.dev to api.ronde.vu
- Remove TURN servers, use only Google STUN (eliminate errors)
- Update README with correct API URL

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 18:54:51 +01:00
adc363fed0 Simplify TURN server configuration
- Remove duplicate TURN entries to avoid "5+ servers" warning
- Keep only essential STUN and TURN servers
- Use standard ports (80 and 443)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 18:39:30 +01:00
d677f36eeb Add connection manager, toast notifications, and TURN server
- Replace manual RTCPeerConnection handling with RondevuConnection class
- Add react-hot-toast for better UX (replace browser alerts)
- Add TURN server configuration (relay1.expressturn.com:3480)
- Update README to reflect current demo structure
- Link local client library for latest features

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 18:30:18 +01:00
eaf474a984 Simplify demo: remove topics UI, ID-only connections
- Remove topic selection and peer discovery UI
- Remove MethodSelector and TopicsList components
- Simplify ConnectionForm to just take a connection ID
- Update to use @xtr-dev/rondevu-client@0.3.2
- Demo version: 0.3.2

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 23:18:05 +01:00
1bbce9295d Add topics list with pagination and update to api.ronde.vu
Features:
- Added TopicsList component with pagination support
- Shows active topics with peer counts
- Pagination controls (Previous/Next)
- Refresh button to reload topics
- Modal UI with proper styling
- Floating "View Topics" button on main screens

Changes:
- Updated API URL from rondevu.xtrdev.workers.dev to api.ronde.vu
- Added TopicsList component with pagination UI
- Added modal overlay and styles
- Integrated topics modal into main App

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 22:20:37 +01:00
6538b5a18f Update demo to use integrated RondevuAPI
- Removed separate RondevuClient instantiation
- Updated to use rdv.api for all API calls (getVersion, listTopics, listSessions)
- Updated README example to show integrated API usage

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 21:52:20 +01:00
4f136eb3cb Add version display in footer
- Add version state tracking for demo and server versions
- Create loadVersions() function to fetch server version via API
- Update footer to display both demo version and server version
- Update vite.config.js to inject git commit hash as VITE_VERSION

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 11:35:05 +01:00
b42fc95c61 Change connection ID generation to exclude ambiguous characters
- Replace hex-based generation with a new random alphanumeric system
- Generated IDs exclude visually similar characters (e.g., 'o', '0', 'I', 'l')
2025-11-08 11:09:20 +01:00
85faa4ac90 Change connection ID to 6-digit hex string
Generate random 6-digit hex IDs (e.g., A3F2C1) instead of
timestamp-based IDs (e.g., conn-1762596287521) for cleaner,
more user-friendly connection codes.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 11:05:51 +01:00
1d7123641d Fix create/join buttons not advancing to next step
Added step advancement logic when selecting create/join action
2025-11-07 22:29:04 +01:00