Nice walkthrough, thanks for putting this together. A Next.js + Node.js signaling setup is a great way to learn how WebRTC actually works. A few things that tend to come up once an app like this moves past a demo: peer-to-peer mesh works fine for 2–4 participants, but beyond that you need an SFU because each user’s upload grows with every extra person. Some users will also be behind strict NATs or firewalls, so a TURN server is needed in addition to STUN. And if you ever want to broadcast to a larger audience or record sessions, you’ll need a media server instead of pure P2P. Disclosure: I work at Ant Media. We have a guide covering the four server types in a WebRTC stack (signaling, NAT traversal, media routing, fan-out) and how mesh, MCU and SFU compare, in case it’s useful as a follow-up read: https://antmedia.io/webrtc-servers/
