An open-source Flutter SDK for Real-Time Video Calling using WebRTC, Firestore & Firebase Cloud Messaging
RTCEdgeEngine is a cross-platform Flutter SDK that enables seamless real-time video calling experiences — from one-to-one private calls to one-to-many monetized sessions.
It’s built on top of WebRTC, Firebase Firestore, and Firebase Cloud Messaging (FCM) for signaling and call notifications, offering a complete end-to-end communication layer.
📦 The package also includes an example project, TubeCaller, demonstrating anonymous calling, an online users dashboard, and real-time call handling.
- 1-to-1 and 1-to-Many Calls using WebRTC.
- Signaling via Firestore (no custom signaling server required).
- Incoming Call Notifications powered by Firebase Cloud Messaging.
- ️ Works in Foreground, Background, or App Killed States.
- Built with Clean Architecture principles.
- Ready-to-use UI components (call screen, picker, etc.).
- Example app (TubeCaller) for quick integration reference.
┌──────────────────────────────────────────────┐
│ RTCEdgeEngine │
│----------------------------------------------│
│ • WebRTC Core (Media + Peer Connections) │
│ • Firestore Signaling │
│ • FCM Integration │
│ • Call Manager + Interface Handler │
│----------------------------------------------│
│ Built on: Flutter + Firebase + WebRTC │
└──────────────────────────────────────────────┘
│
▼
┌──────────────────────────────┐
│ TubeCaller App │
│ - Anonymous calling │
│ - Online users list │
│ - Dashboard UI │
│ - Call notification handling │
└──────────────────────────────┘
TubeCaller is a fully functional example included with RTCEdgeEngine.
It showcases:
- Anonymous calling using RTCEdgeEngine.
- Live online user list and availability tracking via Firestore.
- Call invitations and signaling management.
- FCM-powered call notifications (even when app is killed).
You can use it as a boilerplate to build your own video calling app.
- Flutter SDK ≥ 3.0.0
- Firebase Project (with Firestore & Cloud Messaging enabled)
- Android Studio / Xcode setup for native builds
git clone https://github.com/yourusername/RTCEdgeEngine.git
cd RTCEdgeEngine-
Create a project in Firebase Console.
-
Enable:
- Firestore Database
- Cloud Messaging (FCM)
-
Download your Firebase configuration files:
google-services.json→ place in/android/app/GoogleService-Info.plist→ place in/ios/Runner/
-
Add Firebase plugins to your
pubspec.yaml:
dependencies:
firebase_core: ^3.0.0
cloud_firestore: ^5.0.0
firebase_messaging: ^15.0.0
flutter_webrtc: ^0.10.0In your main.dart file:
import 'package:firebase_core/firebase_core.dart';
import 'package:rtcedge_engine/rtcedge_engine.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MyApp());
}Here’s how to set up and start a call:
import 'package:rtcedge_engine/rtcedge_engine.dart';
final rtcEngine = RTCEdgeEngine();
Future<void> initRTC() async {
await rtcEngine.initialize(
signalingCollection: "calls",
);
rtcEngine.onIncomingCall = (callerId) {
print("Incoming call from $callerId");
rtcEngine.showCallPicker(context, callerId);
};
}
Future<void> makeCall(String targetUserId) async {
await rtcEngine.startCall(targetUserId: targetUserId);
}Register the FCM listener for background/killed state notifications:
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
final callerId = message.data['callerId'];
rtcEngine.showIncomingCallScreen(callerId);
});RTCEdgeEngine/
├── lib/
│ ├── src/
│ │ ├── signaling/
│ │ ├── call_manager.dart
│ │ ├── rtc_service.dart
│ │ ├── notification_service.dart
│ │ └── ui/
│ └── rtcedge_engine.dart
├── example/
│ └── tube_caller/
└── README.md
Run the example TubeCaller app:
cd example/tube_caller
flutter pub get
flutter runWe welcome contributions! 🎉
- Fork the repository
- Create a new feature branch
- Commit your changes with clear messages
- Submit a Pull Request
Make sure to follow Flutter best practices and keep the code well-documented.
This project is licensed under the MIT License — see the LICENSE file for details.
Below is a simplified overview of how RTCEdgeEngine handles call setup, signaling, and notifications:
sequenceDiagram
participant Caller
participant Firestore
participant FCM
participant Receiver
participant RTCEngine
Caller->>RTCEngine: Start call (createOffer)
RTCEngine->>Firestore: Save offer SDP in "calls" collection
Firestore->>Receiver: Trigger Firestore listener
Receiver->>RTCEngine: Read offer and createAnswer
RTCEngine->>Firestore: Save answer SDP
Firestore->>Caller: Update with answer SDP
Caller->>RTCEngine: Set remote description (answer)
par ICE Exchange
Caller->>Firestore: Push ICE candidates
Receiver->>Firestore: Push ICE candidates
end
Note over Caller,Receiver: WebRTC PeerConnection established 🎥
FCM-->>Receiver: Send incoming call push notification
Receiver->>RTCEngine: Show call picker (app in background/killed)
RTCEdgeEngine empowers Flutter developers to build scalable, Firebase-integrated video calling apps with minimal setup — combining WebRTC, Firestore, and FCM into one clean, modular SDK.
Start with TubeCaller, and you’ll have an end-to-end working demo in minutes.