A complete, production-ready WebRTC video calling and real-time chat solution for React Native and NestJS applications. Built with simplicity and extensibility in mind.
- β WebRTC Video Calling - High-quality peer-to-peer video calls
- β Real-time Chat - Instant messaging with typing indicators
- β Room-based Communication - Multiple chat rooms and call sessions
- β Read Receipts - Track message read status
- β Message Management - Delete messages, mark as read
- β Call Overlay - Beautiful incoming call UI
- β TypeScript Support - Full type safety
- β Customizable - Extend with your own business logic
- β Production Ready - Battle-tested architecture
This monorepo contains two main packages that work together:
NestJS server module for video calling and chat functionality.
Installation:
npm install @nightfuryequinn/rtc-made-simple-serverQuick Start:
import { VideoCallModule, ChatModule } from '@nightfuryequinn/rtc-made-simple-server';
@Module({
imports: [
VideoCallModule.forRoot(),
ChatModule.forRoot()
]
})
export class AppModule {}React Native components and hooks for video calling and chat interfaces.
Installation:
npm install @nightfuryequinn/rtc-made-simple-uiPeer Dependencies:
npm install socket.io-client react-native-webrtc react-native-incall-manager zustandQuick Start:
import { useVideoSocket, ChatWindow, CallOverlay } from '@nightfuryequinn/rtc-made-simple-ui';
// Video call
const { initiateCall, acceptCall, declineCall } = useVideoSocket({
currentUser: 'user123',
baseUrl: 'http://your-server.com'
});
// Chat
<ChatWindow
userName="user123"
roomName="general"
baseUrl="http://your-server.com"
/>Check out the complete React Native + NestJS example application in the RTC-Made-Simple-Example directory.
The example includes:
- Backend (NestJS): Video call and chat server setup
- Mobile (React Native + Expo): Complete mobile app with video calling and chat
- Start the Backend:
cd RTC-Made-Simple-Example/example-backend
npm install
npm run dev- Start the Mobile App:
cd RTC-Made-Simple-Example/example-mobile
npm install
npm startβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Applications β
β ββββββββββββββββββββ ββββββββββββββββββββ β
β β Video Call UI β β Chat UI β β
β β - CallOverlay β β - ChatWindow β β
β β - VideoCallScreenβ β - MessageItem β β
β ββββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ β
β β β β
β ββββββββββββ¬βββββββββββββββββββ β
β β β
β @nightfuryequinn/ β
β rtc-made-simple-ui β
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β WebSocket + WebRTC
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β @nightfuryequinn/ β
β rtc-made-simple-server β
β β β
β βββββββββββββββββ΄βββββββββββββββββ β
β β β β
β βββββ΄βββββββββββββ ββββββββββββ΄ββββββ β
β β VideoCall β β Chat β β
β β Gateway β β Gateway β β
β β - /call β β - /chat β β
β β - WebRTC β β - Messages β β
β β - Signaling β β - Typing β β
β ββββββββββββββββββ ββββββββββββββββββ β
β β
β NestJS Server β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- NestJS - Progressive Node.js framework
- Socket.IO - Real-time bidirectional communication
- WebRTC - Peer-to-peer video calling
- TypeScript - Type-safe development
- React Native - Cross-platform mobile development
- Expo - React Native toolchain
- react-native-webrtc - WebRTC for React Native
- Zustand - State management
- TypeScript - Type-safe development
- β iOS
- β Android
- β Web (with modifications)
Server Side:
VideoCallModule.forRoot({
callbacks: {
onCallCreated: async (callerName, receiverName) => {
// Save to database, send push notification
},
onCallEnded: async (callerName, receiverName, status) => {
// Update call history
}
}
})Client Side:
<VideoCallScreen
iceServers={[
{ urls: 'stun:stun.l.google.com:19302' },
{ urls: 'turn:your-turn-server.com:3478', username: 'user', credential: 'pass' }
]}
/>Server Side:
ChatModule.forRoot({
callbacks: {
onMessageSent: async (sender, receiver, message, room, metadata) => {
// Save to database, moderate content
},
onMessageRead: async (messageId, readBy) => {
// Update read receipts
}
}
})- Authentication: Implement proper user authentication before allowing connections
- Rate Limiting: Add rate limiting to prevent spam
- Content Moderation: Implement message filtering for chat
- TURN Servers: Use TURN servers for NAT traversal in production
- SSL/TLS: Always use HTTPS/WSS in production
Ensure your babel.config.js includes proper presets:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
// Add any required plugins
]
};Add required permissions to android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />Add to ios/YourApp/Info.plist:
<key>NSCameraUsageDescription</key>
<string>This app needs access to camera for video calls</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to microphone for video calls</string>Ensure compatible versions:
{
"socket.io-client": "^4.8.1",
"react-native-webrtc": "^124.0.6",
"react-native-incall-manager": "^4.2.1",
"zustand": "^5.0.8"
}If Android devices crash when remote stream is established:
- Check WebRTC permissions
- Ensure proper camera/microphone release
- Update to latest
react-native-webrtcversion - Test on physical devices, not just emulators
Contributions are welcome! Please feel free to submit a Pull Request.
MIT
Built with β€οΈ using:
Made with β€οΈ by NightfuryEquinn