Knowledge Hub

Real-Time Chat Application

Delivery case studyBy Naveed Sohail Gung2025-04-10ReactFirebaseCloud FunctionsFCM

Building a scalable messaging platform with Firebase and React The client needed a real-time messaging application supporting 1,000+ concurrent users with features like typing indicators, read receipts, and file sharing. The platform had to work reliably across mobile and desktop browsers with offline support.

Problem context

The client needed a real-time messaging application supporting 1,000+ concurrent users with features like typing indicators, read receipts, and file sharing. The platform had to work reliably across mobile and desktop browsers with offline support.

Implementation approach

I designed a Firestore data model with denormalized chat rooms and message sub-collections for efficient queries. Firestore's onSnapshot listeners provided real-time updates without polling. A Cloud Function handled push notifications via FCM. The UI was built with React and optimized with virtualized message lists (react-window) to handle conversations with 10,000+ messages.

Outcome and delivery impact

The application successfully handles 1,500+ concurrent users with sub-200ms message delivery. Offline support via Firestore persistence lets users compose and queue messages without connectivity. The typing indicator system uses a lightweight heartbeat mechanism that minimizes Firestore reads.

Reported metrics

Technologies involved

  • React
    Open the technology archive to view related project work.
  • Firebase
    Open the technology archive to view related project work.
  • Cloud Functions
    Open the technology archive to view related project work.
  • FCM
    Open the technology archive to view related project work.
  • Tailwind CSS
    Open the technology archive to view related project work.