Flirtmetrics — Event-Driven Real-Time Matchmaking & Chat Optimization
CLIENT: Dating Startup | ROLE: Mobile Specialist & Flutter Developer | TIMELINE: 3 Months (2024)
Overview: Optimized a dating app matchmaking page and real-time chat infrastructure. Resolved critical UI thread blockages causing MATCH cards to freeze on swipe, and reduced chat delivery latency from 8 seconds to under 200ms by replacing HTTP short-polling with WebSockets.
The Challenge: Flirtmetrics experienced severe user churn because matchmaking screens froze for up to 1.5 seconds during card swipes (due to synchronous Riverpod state rebuilds of the entire card deck). Additionally, chat delivery suffered from an 8-second delay because the client relied on high-frequency HTTP short-polling, overwhelming network threads and triggering API rate limits.
Solution & Implementation: Designed and deployed a custom WebSocket connection manager in Flutter with heartbeat pinging and auto-reconnect logic. Implemented a local SQLite sync cache, allowing messages to render instantly offline while background threads sync remote state. Rewrote the card swiping widget using isolated state listeners to isolate builds to the swiped card only.
Architecture: Clean architecture implementation using Flutter Presentation layer (Riverpod states), Domain repositories, and Data sources (WebSocket stream client + SQLite offline DB cache). Back-end WebSockets route messages through a lightweight gateway.
Diagnostics: Overcoming CPU thread lockups on low-end mobile devices during card deck recalculations. Bridging dynamic UI transitions with concurrent local SQLite writing and WebSocket message streaming.
Key Metrics: Chat Latency: <200ms (from 8.2s delay) | UI Frame Rate: 60 FPS (stable swiping) | User Retention: +32% (post-release analytics) | App Rating: 4.8★ (iOS & Play Store)
Stack: Flutter, Riverpod, WebSockets, SQLite, Firebase, REST API
Links:[Optimization Report][Play Store][App Store][Website](GitHub: Private Repository (Access available upon request))