Privacy First. Always Encrypted. Truly Peer-to-Peer.
A production-grade messaging application built with Signal Protocol E2EE, WebRTC calling, and modern Android architecture.
LetsTalk is not just another chat app—it's a secure communication platform that prioritizes your privacy without compromising on features. Built from the ground up with end-to-end encryption using the Signal Protocol, LetsTalk ensures that your conversations remain truly private.
In an era where data privacy is paramount, LetsTalk solves critical problems:
- 🔐 True End-to-End Encryption: Implements the Signal Protocol (X3DH + Double Ratchet) - the same encryption used by WhatsApp and Signal. Your server never sees your messages.
- 📞 Peer-to-Peer Calling: Custom WebRTC implementation with Firebase signaling for crystal-clear voice and video calls without relying on third-party SDKs.
- 💾 Offline-First Architecture: Send messages anytime. They sync automatically when connectivity returns using WorkManager and Room database.
- 🔔 Reliable Push Notifications (FCM): Integrates Firebase Cloud Messaging (FCM) to deliver real-time message and call notifications when the app is in the background or killed.
- ⏰ Message Scheduling & Guaranteed Delivery: Allows users to schedule messages for future delivery.
- 🚀 Modern Android Development: Built with Kotlin, Jetpack Compose, MVVM, Clean Architecture, and Hilt DI.
- 🎨 Premium UI/UX: Designed with Material 3, supporting both light and dark themes for a delightful user experience.
LetsTalk is designed to scale horizontally using Firebase infrastructure:
| Capability | Estimated Handling |
|---|---|
| Concurrent users | 50,000+ (Firestore sharded chats) |
| Messages/day | 1M+ (batch writes & pagination) |
| WebRTC calls | Peer-to-peer (server-free media path) |
| Latency | < 300ms signaling |
| Offline queue | Unlimited (Room DB) |
| Group size | 500+ members |
| Push Notifications | 100K+ devices |
Why scalable?
- Firestore uses distributed collections
- WebRTC media flows P2P (not via server)
- Pagination + lazy loading
- Background sync using WorkManager
- Stateless signaling
- Retry & backoff handled by FCM
A modern real-time chat application with secure messaging, voice/video calling, group chats, and smart features like message scheduling.
![]() |
![]() |
![]() |
![]() |
| Welcome Screen | Home Screen | Detail Chat | Profile Screen |
![]() |
![]() |
![]() |
![]() |
| Welcome | Registration | Email Login | Phone Login |
![]() |
![]() |
![]() |
![]() |
| Home | Chat Overview | User List | Create Group |
![]() |
![]() |
![]() |
![]() |
| Chat Screen | Schedule Message | Scheduled Messages List | Notification Drawer |
![]() |
![]() |
![]() |
![]() |
| Incoming Call | Outgoing Call | Live Video | Live Voice |
![]() |
![]() |
![]() |
| Chat Profile | Profile View | Edit Profile |
LetsTalk follows Clean Architecture principles with a clear separation of concerns across three layers.
graph TB
subgraph Presentation["🎨 Presentation Layer"]
A[Jetpack Compose UI]
B[ViewModels]
C[Navigation]
end
subgraph Domain["💼 Domain Layer"]
D[Use Cases]
E[Repository Interfaces]
F[Domain Models]
end
subgraph Data["💾 Data Layer"]
G[Repository Implementations]
H[Firebase Firestore]
I[Room Database]
J[Signal Protocol]
K[WebRTC Manager]
end
A --> B
B --> D
D --> E
E --> G
G --> H
G --> I
G --> J
G --> K
style Presentation fill:#e1f5ff
style Domain fill:#fff4e1
style Data fill:#e8f5e8
| Category | Technology |
|---|---|
| Language | Kotlin (100%) |
| UI Framework | Jetpack Compose + Material 3 |
| Architecture | MVVM + Clean Architecture (3-layer) |
| Dependency Injection | Hilt (Dagger) |
| Async Programming | Kotlin Coroutines + Flow |
| Category | Technology |
|---|---|
| Cloud Database | Firebase Firestore |
| Authentication | Firebase Auth |
| Realtime Presence | Firebase Realtime Database |
| Local Database | Room (SQLCipher encrypted) |
| Push Notifications | Firebase Cloud Messaging (FCM) |
| Category | Technology |
|---|---|
| End-to-End Encryption | Signal Protocol (libsignal-protocol-android) |
| Voice & Video Calls | WebRTC (Stream WebRTC Android) |
| Media Storage | Cloudinary (Images, Videos, Files) |
| Image Loading | Coil + Glide |
| Category | Technology |
|---|---|
| Scheduled Tasks | WorkManager + AlarmManager |
| System Event Handling | BroadcastReceiver (boot completed, network state changes) |
| Purpose | Library |
|---|---|
| JSON Parsing | Kotlinx Serialization / Gson |
| Networking | Retrofit + OkHttp |
| Logging | Timber |
| Pagination | Paging 3 |
| Animations | Compose Animation APIs |
| Permissions | Accompanist Permissions |
graph TD
Start[App Launch] --> Auth{User Authenticated?}
Auth -->|No| Login[Login/SignUp Screen]
Auth -->|Yes| Home[Home Screen - Chat List]
Login --> FirebaseAuth[Firebase Authentication]
FirebaseAuth --> KeyGen[Generate Signal Keys]
KeyGen --> Home
Home --> ChatSelect{User Action}
ChatSelect -->|Select Chat| ChatScreen[Chat Detail Screen]
ChatSelect -->|New Chat| UserSearch[Search Users]
ChatSelect -->|Video Call| CallInit[Initiate Call]
ChatSelect -->|Schedule| ScheduleMsg[Schedule Message]
ChatScreen --> SendMsg[Send Message]
SendMsg --> Encrypt[Signal Protocol Encryption]
Encrypt --> Firestore[(Firestore)]
Firestore --> Decrypt[Signal Protocol Decryption]
Decrypt --> RenderMsg[Render in Chat]
CallInit --> WebRTC[WebRTC Setup]
WebRTC --> Signaling[Firebase Signaling]
Signaling --> P2P[Peer-to-Peer Connection]
P2P --> ActiveCall[Active Call Screen]
ScheduleMsg --> RoomDB[(Room DB)]
RoomDB --> Worker[WorkManager]
Worker --> AlarmMgr[AlarmManager]
AlarmMgr --> SendMsg
style Start fill:#4CAF50
style Home fill:#2196F3
style Firestore fill:#FF9800
style RoomDB fill:#9C27B0
- One-to-One & Group Chats: Secure messaging with unlimited participants
- Rich Media Support: Images, videos, PDFs, voice notes via Cloudinary
- Message Actions: Copy, delete, edit, forward, reply with context threading
- Read Receipts: Sent ✓, Delivered ✓✓, Seen ✓✓ (blue)
- User Status: Real-time online/offline status, last seen timestamps
- Smart Notifications: FCM push notifications for messages and mentions Key Implementation:
FirestoreService.kt- Message encryption and Firestore operationsChatViewModel.kt- Chat state management
- X3DH Key Agreement: Secure session establishment without prior communication
- Double Ratchet Algorithm: Forward secrecy and self-healing properties
- Multi-Device Support: Separate encryption for each device
- Key Rotation: Automatic pre-key replenishment via WorkManager Security Guarantees:
- ✅ Forward Secrecy: Compromised keys cannot decrypt past messages
- ✅ Future Secrecy: Self-healing from key compromise
- ✅ Deniability: Cryptographic deniability of message authorship Key Implementation:
SignalService.kt- Encryption/decryption operationsSignalKeyManager.kt- Key generation and managementSignalProtocolStoreImpl.kt- Key storage with Room
- Peer-to-Peer Calls: Direct media streaming between devices
- Firebase Signaling: Firestore-based SDP and ICE candidate exchange
- Call Features: Camera toggle, microphone mute, speaker mode
- Network Resilience: Automatic ICE candidate gathering, NAT traversal Call Flow:
- Caller initiates → Creates SDP offer → Uploads to Firestore
- Callee receives notification → Shows incoming call screen
- Callee accepts → Creates SDP answer → P2P connection established
- Media streams directly between devices (audio/video) Key Implementation:
CallWebRTCManager.kt- WebRTC peer connection managementCallSignalingRepositoryImpl.kt- Firebase signaling operationsCallViewModel.kt- Call state management
- Schedule Messages: Send messages at a future date/time
- Reliable Delivery: WorkManager + AlarmManager for precise timing
- History Tracking: View sent and pending scheduled messages
- Boot Persistence: BroadcastReceiver reschedules on device restart Architecture:
- Room DB: Stores scheduled messages locally
- WorkManager: Manages background execution with constraints
- AlarmManager: Triggers exact alarm at scheduled time
- BroadcastReceiver: Handles system events (boot, time changes) Key Implementation:
ScheduleMessageDatabase.kt- Local storageSendMessageWorker.kt- Background message sendingBootReceiver.kt- System event handling
- Material 3 Design: Latest Material Design components
- Light & Dark Themes: Seamless theme switching
- Jetpack Compose: Fully declarative UI with smooth animations
- Responsive Layouts: Optimized for all screen sizes
- Google Fonts: Custom typography for premium feel
| Document | Description |
|---|---|
| Chat Features | Complete guide to chat system, media sharing, message actions, status systems, and notifications |
| Signal Protocol | Deep dive into E2EE implementation, key exchange, and encryption flows |
| WebRTC Calling | Voice/video calling architecture, signaling, and peer connection setup |
| Message Scheduling | Scheduled message implementation with WorkManager and AlarmManager |
| Architecture | Complete architecture breakdown, layer responsibilities, and DI setup |
- Android Studio: Arctic Fox or newer
- Minimum SDK: Android 8.0 (API 26)
- Target SDK: Android 14 (API 34)
- Kotlin: 1.9+
- JDK: Java 11+
git clone https://github.com/Vishal01x/LetsTalk.git
cd LetsTalk- Create a Firebase project at Firebase Console
- Add an Android app to your Firebase project
- Package name:
com.exa.android.letstalk
- Package name:
- Download
google-services.jsonand place it inapp/directory - Enable the following Firebase services:
- Authentication: Email/Password provider
- Firestore Database: Create a database in production mode
- Realtime Database: For presence/online status
- Cloud Messaging: For push notifications
- Storage: For media files (optional, using Cloudinary)
- Create a free account at Cloudinary
- Get your credentials from the Dashboard:
- Cloud Name
- API Key
- API Secret
- Add credentials to
local.properties:
cloudinary.cloud_name=your_cloud_name
cloudinary.api_key=your_api_key
cloudinary.api_secret=your_api_secretNo additional setup required! The app automatically generates Signal Protocol keys on first launch:
- Identity Key Pair (long-term)
- Signed Pre Key (medium-term)
- One-Time Pre Keys (100 keys generated initially) Keys are stored securely using:
- Room Database (encrypted with SQLCipher)
- Android KeyStore for master keys
The app uses public STUN servers by default. For production, configure TURN servers:
In CallWebRTCManager.kt, update:
val iceServers = listOf(
PeerConnection.IceServer.builder("stun:stun.l.google.com:19302").createIceServer(),
// Add your TURN servers
PeerConnection.IceServer.builder("turn:your-turn-server.com:3478")
.setUsername("username")
.setPassword("password")
.createIceServer()
)Recommended TURN Providers: Twilio, Xirsys, or self-hosted CoTURN
- In Firebase Console → Cloud Messaging, note your Server Key
- Update FCM server key in
local.properties(if using server-side notifications):
fcm.server_key=your_fcm_server_key- Ensure FCM is enabled in your Firebase project
# In Android Studio, click Run (Shift+F10)
# Or via command line:
./gradlew installDebugThe app will:
- Generate Signal Protocol keys on first launch
- Prompt for Firebase authentication
- Initialize WebRTC components
- Start listening for incoming messages and calls
- All one-to-one messages are encrypted using Signal Protocol
- Keys are stored in encrypted Room database
- No plaintext messages are stored on the server
- Firebase Authentication with secure token management
- Automatic token refresh and session management
- HTTPS for all network requests
- Certificate pinning (recommended for production)
- STUN/TURN server security for WebRTC
- Messages are end-to-end encrypted
- Server only stores encrypted ciphertext
- Local database encrypted with SQLCipher
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow Kotlin coding conventions
- Write unit tests for new features
- Update documentation for significant changes
- Ensure all tests pass before submitting PR
This project is licensed under the MIT License - see the LICENSE file for details.
- Signal Protocol: For making E2EE accessible to developers
- WebRTC: For enabling peer-to-peer communication
- Firebase: For reliable backend infrastructure
- Jetpack Compose: For modern Android UI development
- GitHub: @Vishal01x
- Repository: LetsTalk Found a bug? Open an issue Have questions? Start a discussion






















