Dil ki BaatReal-Time Voice Calling Platform — Full Engineering Case Study
A production-grade real-time voice calling ecosystem built from scratch — including two cross-platform mobile apps, a per-second billing engine, Razorpay wallet integration, push notification calling, KYC workflows, and an admin analytics dashboard. Shipped from concept to live users in 6 weeks.
The Problem
A founder needed a production-ready voice calling platform with real-time billing, wallet systems, push notifications, and mobile deployment — all built from scratch, with no room for unreliable prototypes. The platform needed to handle real money, real calls, and real users from day one.
What Was Shipped
A complete production ecosystem — live voice calling, per-second billing, Razorpay payments, earnings tracking, push notifications, admin controls, KYC verification, and cross-platform mobile apps — in 6 weeks. Zero billing discrepancy. 99.9% uptime. Real users. Real money.
Platform Architecture
Dil ki Baat (Men's App)
- Paid voice calling using Agora SDK
- Real-time wallet deduction (per-second)
- Razorpay top-up integration
- FCM push notification incoming calls
- Capacitor.js Android deployment
Dil se Suno (Women's App)
- Earnings-based call receiving platform
- Per-second earnings credited in real-time
- Instant withdrawal system
- KYC approval workflow
- Live earnings dashboard
Backend & Admin Infrastructure
- Node.js + Express REST API
- PostgreSQL with Supabase
- Real-time WebSocket server
- Razorpay webhook processor
- Firebase FCM notification server
- Admin analytics dashboard
- KYC approval workflow system
- Live configuration management
Core Features
Real-Time Voice Calling
Sub-200ms latency via Agora SDK
Per-Second Billing
Atomic wallet deductions every second
Razorpay Wallet
Top-ups, withdrawals, transaction logs
Push Notification Calls
FCM-triggered incoming calls
Reverse Calling System
Women-initiated call routing
Earnings & Withdrawals
Real-time earning calculations
KYC Approval Workflows
Admin-controlled verification
Admin Analytics
Live dashboard with reporting
Live Config Sync
Real-time platform-wide updates
Capacitor Android
Web-to-native deployment
Engineering Challenges Solved
Real-Time Billing Logic
Voice calls are unpredictable — users drop, networks fail, calls end abruptly. The billing engine needed to charge per-second with zero discrepancy even during failures.
Engineered atomic wallet operations at the database level with PostgreSQL transactions. Each billing cycle runs inside a transaction with automatic rollback on failure, ensuring ₹0.00 discrepancy across all billing events.
Wallet Synchronization
Multiple concurrent sessions (calling, topping up, withdrawing) could create race conditions in wallet balances — leading to negative balances or missed charges.
Built a distributed wallet system with row-level locking, optimistic concurrency control, and real-time balance propagation via WebSocket events to keep all clients in sync.
Push Notification Calling
Android apps in the background have strict limits on running code. A FCM notification needed to trigger a real call UI immediately — not just show a notification badge.
Developed a custom FCM payload structure with high-priority data-only notifications, native Android foreground service integration via Capacitor, and fallback reconnection logic for 99%+ delivery rates.
Live Configuration Propagation
Call rates, feature flags, and platform policies needed to update instantly across all connected clients without requiring an app restart or re-login.
Built a real-time config sync system using WebSocket broadcasts from the Node.js backend — any admin dashboard change propagates to all active app sessions within 200ms.
Atomic Transaction Integrity
Payment flows involved multiple tables (wallets, transactions, earnings, billing logs) — a partial write would corrupt financial state permanently.
Implemented full PostgreSQL transaction wrapping for all financial operations with explicit rollback triggers, plus idempotency keys on Razorpay webhooks to prevent duplicate credit events.
Cross-Platform Mobile Deployment
The platform needed to run as native Android apps with push notifications, native permissions, and Play Store distribution — all from a React web codebase.
Used Capacitor.js to wrap the React frontend as an Android APK, with custom native plugins for call management, FCM integration, and background service handling.
Technology Stack
Need Something Similar Built?
Real-time systems, payment integrations, mobile apps — I've shipped it all to production. Let's build yours.