Original prompt: You have a React/Vite game repo with Firebase config accidentally committed.
Immediate security fix:
Remove firebase.json from Git (git rm --cached firebase.json)
Add to .gitignore: firebase.json .env* node_modules/ .DS_Store
Create .env.local with Firebase config loaded via import.meta.env.VITE_FIREBASE_*
Replace PeerJS with Firebase signaling + pure WebRTC P2P.
firebase.json file in this checkout, so there was nothing to untrack from Git.firebase.json, .env*, node_modules/, and .DS_Store coverage in .gitignore..env.local placeholder entries for the Firebase values so config can stay local.src/network/P2PManager.ts and moving the 10-second receive delay into the network layer.src/signaling/P2PConnection.ts with src/network/P2PManager.ts.npm run typecheck and npm run build pass after the refactor.P2PManager.checking -> disconnected failures.