Article section
A Real-Time Emergency Communication Framework Using WebSockets and the MERN Stack
Abstract
When emergencies occur, a speedy and reliable communication system is essential to expedite response efforts and save lives. Traditional alerting systems such as text messaging, panic-button apps, and REST-based platforms suffer from high latency, limited multimedia capabilities, and poor synchronisation in congested networks. This study presents a hybrid real-time emergency communication system that enables users to send instant messages, share live locations, and report by voice within a single chat interface. The system uses a modern web architecture and a persistent WebSocket channel that facilitates bidirectional communication between users and responders. This design reduces response delays and enables more contextual exchanges. The proposed model allows users to communicate through text, location, and audio within one unified session, unlike existing emergency chat solutions that rely on manual switching between typing and pasting. Under simulated conditions, the system achieved a 270 ms latency, audio readiness within 2.7 seconds, and a delivery success rate above 99%. These findings illustrate a scalable and privacy-preserving communication model suitable for real-time safety, healthcare, and disaster-response scenarios.
Keywords:
Emergency Communication MERN Stack Real-Time Framework WebSocket Wireless Latency
Article information
Journal
Journal of Computer, Software, and Program
Volume (Issue)
2(2), (2025)
Pages
34-43
Published
Copyright
Copyright (c) 2025 Nazmus Rakib Ashfi (Author)
Open access

This work is licensed under a Creative Commons Attribution 4.0 International License.
How to Cite
References
Cantelon, M., Harter, M., Holowaychuk, T., & Rajlich, N. (2014). Node.js in Action (2nd ed.). Manning Publications.
Express.js Foundation. (2024). Express.js Documentation (Version 4.19). Retrieved from https://expressjs.com/
Figueroa-Lorenzo, A., Rivero-García, A., García, J., & García-Rodríguez, I. (2020). Real-time event streaming in web applications using Server-Sent Events. Sensors, 20(15), 4121. https://doi.org/10.3390/s20154121
Flanagan, D. (2020). JavaScript: The Definitive Guide (7th ed.). O’Reilly Media.
García, M., Aranda, J., & Pacheco, J. (2021). A WebRTC-based communication platform for emergency management. Applied Sciences, 11(4), 1837. https://doi.org/10.3390/app11041837
Griffith, D. (2021). Learning React: Modern Patterns for Developing React Apps (3rd ed.). O’Reilly Media.
International Telecommunication Union. (2019). ITU-T Recommendation G.114: One-way transmission time. ITU Telecommunication Standardization Sector. https://www.itu.int/rec/T-REC-G.114
Jones, M., Bradley, J., & Sakimura, N. (2015). JSON Web Token (JWT). Internet Engineering Task Force (IETF), RFC 7519. https://doi.org/10.17487/RFC7519
Lubbers, P., & Albers, F. (2015). Pro HTML5 Programming: Powerful APIs for Richer Internet Applications (3rd ed.). Apress. https://doi.org/10.1007/978-1-4842-1233-2
Matrix.org. (2020). Matrix specification documentation. https://spec.matrix.org/latest/
Mohsin, A. S., & Muyeed, M. A. (2024). IoT-based smart emergency response system (SERS) for monitoring vehicle, home and health status. Discover Internet of Things, 4(1), 22. https://doi.org/10.1007/s43926-024-00073-6
MongoDB, Inc. (2024). MongoDB Manual (Version 7.0). Retrieved from https://www.mongodb.com/docs/manual/
Moroney, L. (2017). The Firebase Realtime Database. In The definitive guide to Firebase (pp. 41–72). Apress. https://doi.org/10.1007/978-1-4842-2943-9_3
Pierleoni, P., Concetti, R., Belli, A., Palma, L., Marzorati, S., & Esposito, M. (2023). A Cloud-IoT architecture for latency-aware localization in earthquake early warning. Sensors, 23(20), 8431. https://doi.org/10.3390/s23208431
Rescorla, E. (2018). The Transport Layer Security (TLS) Protocol Version 1.3. Internet Engineering Task Force (IETF), RFC 8446. https://doi.org/10.17487/RFC8446
Saint-Andre, P. (2011). RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core. Internet Engineering Task Force (IETF). https://doi.org/10.17487/RFC6120
Socket.io Documentation. (2024). Real-time bidirectional event-based communication [Online]. Available: https://socket.io
Voigt, P., & Von dem Bussche, A. (2017). The EU General Data Protection Regulation (GDPR): A Practical Guide. Springer. https://doi.org/10.1007/978-3-319-57959-7
Wang, Q. (2023). An overview of emergency communication networks: Technologies, architectures, and challenges. Remote Sensing, 15(6), 1595. https://doi.org/10.3390/rs15061595
Zhang, H., Zhang, R., & Sun, J. (2025). Developing real-time IoT-based public safety alert and emergency response systems. Scientific Reports, 15, 13465. https://doi.org/10.1038/s41598-025-13465-7
Stecab Publishing

Call for Papers
Author's Guidelines
Manuscript Template
References Guideline