[01 / EXECUTIVE_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.
[02 / SYSTEM_PROBLEM]
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.
[03 / ARCHITECTED_SOLUTION]
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.
[04 / DESIGN_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.
[05 / DIAGNOSTIC_CHALLENGES]
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.
[06 / KEY_SYSTEM_FEATURES]
- Isolated Riverpod state deck listeners
- Bidirectional WebSocket message streaming client
- Local SQLite chat cache with compound indexing
- Heartbeat connection manager with retry back-off
- Fluid gesture swiping at constant 60 FPS
[07 / MEASURABLE_RESULTS]
Chat delivery latency plummeted from 8s to under 200ms. Swipe interfaces stabilized at 60 FPS, boosting the application rating to 4.8★ and increasing retention by 32%.
[08 / FUTURE_ROADMAP]
- Transition chat caching to a reactive NoSQL store like Isar for faster object queries
- Integrate WebRTC channel layers for high-performance direct voice matchmaking
[09 / SOURCE_CHANNELS]
Developer Credentials: JA Shuvro (legally MD. Jonaed Ali Shuvro) (author & creator)
Programming Language: Dart
Application Category: SocialNetworkingApplication
Keywords: Flutter, Riverpod, WebSockets, SQLite, Firebase, REST API
Modified Date: 2024-06-01T00:00:00Z
Published Date: 2024-03-01T00:00:00Z
Repository: Private Repository (Access available upon request)
Website Url: https://flirtmetrics.com/




