- Add backend endpoint to fetch ICE server credentials from Cloudflare - Implement dynamic ICE server configuration in frontend - Add fallback to public STUN servers when Cloudflare unavailable - Create comprehensive test suite for WebRTC API endpoint - Update environment configuration with Cloudflare TURN credentials Backend changes: - New route: GET /api/webrtc/ice-servers (authenticated) - Fetches temporary credentials from Cloudflare API with 24h TTL - Returns formatted ICE servers for RTCPeerConnection - Graceful fallback to Google STUN servers on errors Frontend changes: - Remove hardcoded ICE servers from useWebRTC hook - Fetch ICE servers dynamically from backend on mount - Store servers in ref for peer connection initialization - Add webrtcAPI service for backend communication Tests: - 9 comprehensive tests covering all scenarios - 100% coverage for webrtc.js route - Tests authentication, success, and all fallback scenarios
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.