Real-Time Astrology Consultation Platform.
A cross-platform consultation platform connecting users and consultants through real-time chat, audio, and high-definition Agora RTC video channels.
1. Project Overview
The platform was designed to facilitate on-demand consultation sessions between users and verified consultants across mobile platforms. Users can discover consultants, check real-time online status, initiate text chat sessions, or place 1-on-1 audio and video calls.
Because live audio and video streaming requires sub-second latency and minimal packet loss, the system uses a hybrid real-time architecture: WebSockets handle instantaneous session signaling, queue status updates, and timer notifications, while Agora RTC manages audio/video media routing.
2. Problem and Requirements
Developing a high-concurrency real-time consultation app poses several strict technical requirements:
Low-Latency Audio/Video
Sub-second delay during video calling, even on fluctuating 3G/4G networks across diverse mobile devices.
State & Token Security
Dynamic token authentication so unauthorized users cannot hijack active RTC room channels.
Call Lifecycle Resilience
Handling incoming call popups, background app wakeups, unexpected network drops, and dynamic reconnection.
Cross-Platform Parity
Ensuring microphone/camera permissions, background audio modes, and UI controls work consistently on iOS and Android.
3. Main Features
- — OTP Authentication & User Profiles: Secure phone-number verification and consultation profile management.
- — 1-on-1 Audio & Video Calling: Dynamic Agora RTC channel join/leave workflows with local and remote stream viewports.
- — Real-Time Messaging & Status: Agora RTM and WebSockets for online presence badges and instant text messaging.
- — In-Call Controls: Mute audio, toggle video, flip camera, speakerphone mode, and live session duration counter.
- — Call Reconnection Logic: Automatic retry mechanisms when network signal drops temporarily during call sessions.
4. Technical Architecture
The client architecture follows BLoC pattern for separating state management from UI layers. Media stream handling and socket connections are encapsulated in dedicated Service singletons.
5. Technology Stack
6. My Contributions
As a key Flutter Developer on this production application, I was responsible for:
- — Implementing the Agora RTC engine wrapper and managing channel joining, leaving, and dynamic video view rendering.
- — Building custom BLoC state handlers for audio mute, camera toggle, and speakerphone switching.
- — Integrating REST API authentication and temporary RTC token fetch calls prior to room entry.
- — Supporting production debugging, resolution of audio routing bugs on iOS, and Play Store releases.
7. Engineering Challenges
Challenge: Handling abrupt network changes (e.g. user switching from Wi-Fi to cellular mid-call) without killing the active consultation room.
Solution: We implemented state listeners on Agora's engine events (`onConnectionStateChanged`). When connection dropped to `Reconnecting`, the UI showed a subtle reconnecting indicator while preserving room token state instead of forcing an immediate call termination.
8. Technical Learnings
Integrating real-time SDKs highlighted the necessity of strict cleanup and resource management. Disposing of RTC engine instances and canceling stream subscriptions properly on page popped events prevents memory leaks and battery drain on mobile devices.