Buffer is not available in Workers environment. Use atob()
for base64 decoding which works in both Node.js and Workers.
Fixes ReferenceError: Buffer is not defined
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Simplify storage by storing entire RTCIceCandidateInit as JSON
- Remove individual sdp_mid and sdp_m_line_index columns
- More future-proof and maintainable approach
- Recreated ice_candidates table in D1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update IceCandidate interface to include sdpMid and sdpMLineIndex fields
- Update SQLite and D1 storage to store full ICE candidate data
- Update server API to accept and return complete candidate objects
- This fixes the 'Either sdpMid or sdpMLineIndex must be specified' error
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add GET /topics endpoint with pagination and peer counts
- Refactor offers to support multiple topics per offer
- Add stateless authentication with AES-256-GCM
- Add bloom filter support for peer exclusion
- Update database schema for topic-based discovery
- Add comprehensive API documentation to README
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add POST /leave endpoint that deletes offers by code
- Allows either peer to end the session
- Returns success confirmation
This enables proper session cleanup when either peer
wants to explicitly end the connection.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove origin column from offers table
- Remove getOrigin() function and X-Rondevu-Global header support
- Simplify all storage methods to use only offer code
- Add migration 0003_remove_origin.sql
- Update error messages to remove "origin mismatch" wording
This simplifies the system by removing origin-based isolation.
All offers are now identified solely by their unique code/ID.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update API documentation to reflect POST /offer, POST /answer endpoints
- Update environment variables (OFFER_TIMEOUT, VERSION)
- Clarify direct peer-to-peer connections via offer/answer exchange
- Align documentation with WebRTC standard terminology
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove topic-based grouping and discovery
- Rename sessions to offers for clarity
- Simplify to just POST /offer, POST /answer, POST /poll
- Add version to health endpoint
- Update database schema (sessions→offers table)
- Reduce offer timeout to 1 minute
- Server version: 0.0.1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Return 409 Conflict status when user-provided connection ID already exists, instead of generic 500 error.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace direct db access with the public cleanupExpiredSessions() method
- This fixes the TS2341 error about private property access
- Also improves logging to show count of deleted sessions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add version parameter to AppConfig interface
- Pass version from environment config instead of using process.env
- Update worker.ts to pass VERSION environment variable
- Update wrangler.toml with VERSION variable
- Update deploy script to automatically set VERSION to git commit hash
This fixes the 'process is not defined' error in Cloudflare Workers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move GET / to GET /topics for listing topics
- Add new GET / endpoint that returns server version (git commit hash)
- Update build.js to inject git commit hash as RONDEVU_VERSION
- Update API documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove origin option from RondevuClientOptions and RondevuOptions
- Remove ConnectOptions interface with global flag
- Remove all customHeaders logic for origin override
- Update README with consistent Rondevu branding
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add getOrigin() helper function to check for X-Rondevu-Global header
- When X-Rondevu-Global: true, use https://ronde.vu as origin for session isolation
- Update all endpoints to use getOrigin() instead of reading Origin header directly
- Add X-Rondevu-Global to CORS allowed headers
- This enables browser clients to connect to global sessions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed wrangler.toml from .gitignore
- Added wrangler.toml to repo (safe - no secrets)
- Database ID is not sensitive, protected by Cloudflare auth
- Fixes CI/CD deployment failures
- Implements scheduled() function to handle cron triggers
- Cleans up expired sessions every 5 minutes
- Fixes 'Handler does not export a scheduled() function' error
- Deletes sessions where expires_at < current timestamp
Storage changes:
- Remove KV storage adapter
- Add D1 storage adapter for Cloudflare Workers
- Update schema to use peer_id instead of info field
- Add database migrations for D1
Documentation:
- Simplify README to be more concise
- Update deployment instructions for D1
- Add D1_SETUP.md explaining migration from KV
- Update DEPLOYMENT.md with D1 setup steps
API changes:
- Replace info field with peerId in session creation
- Update all storage interfaces and implementations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed CORS issue where 'Access-Control-Allow-Origin' header was missing.
The problem was that using `origin: '*'` with `credentials: true` is not
allowed by browsers. Changed to use a dynamic origin function that returns
the actual requesting origin, which is compatible with credentials mode.
Changes:
- Use dynamic origin function instead of static array
- Return requesting origin for wildcard (*) configuration
- Added 'Origin' to allowHeaders list
- Maintains compatibility with specific origin restrictions
This fixes CORS errors in browser-based clients.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Updated the package name and scope in `package.json`, README, and source files for both server and client. This ensures consistency and aligns with the new namespace.
Open signaling and tracking server for peer discovery in distributed P2P applications.
Features:
- REST API for WebRTC peer discovery and signaling
- Origin-based session isolation
- Multiple storage backends (SQLite, in-memory, Cloudflare KV)
- Docker and Cloudflare Workers deployment support
- Automatic session cleanup and expiration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>