iChat is a lightweight real-time messaging application built to demonstrate fast, event-driven communication on the web. The project focuses on delivering instant message exchange, live user activity signals, and a clean chat experience using a simple and scalable architecture.
The backend is implemented with Node.js and Express, serving static frontend assets and maintaining real-time socket connections. Socket.IO handles bidirectional communication between connected clients and the server, enabling immediate broadcast of chat updates.
On the frontend, vanilla JavaScript manages socket events, message rendering, typing indicators, and notification behavior. The application keeps the architecture intentionally simple, making it easy to extend with authentication, persistent storage, and room-based messaging.
The server tracks active sockets using an in-memory Set and emits updates on every connect/disconnect action. Messages are currently handled in-memory without database persistence, which keeps performance fast and setup simple for local development and demonstration deployments.
A key challenge was ensuring low-latency communication while maintaining a clean event model. This was solved by separating message and feedback events and using direct broadcast patterns for efficient message delivery.
Another challenge was keeping the application deployment-friendly. The server supports dynamic port binding through environment variables, which allows smooth deployment on platforms such as Render with minimal changes.
The final application provides a stable and responsive chat experience with real-time updates across multiple clients. It is easy to run locally, straightforward to deploy, and serves as a strong foundation for future production-ready chat enhancements.