Real-TimeChatApp

Multi-room real-time chat with login and saved history (Node.js, Express)

Real-TimeChatApp

Multi-room real-time chat application with live messaging, user authentication, and persistent chat history.

Tech Stack

Getting Started

Prerequisites

Installation and Execution

  1. Navigate to the application directory:

    cd myapp
  2. Install dependencies:

    npm install
  3. Configure environment variables in config/db.js and config/jwt.js.

  4. Start the application:

    npm start

    Open http://localhost:3000 in your web browser.

Architecture

Architecture Overview

The application adopts the Model-View-Controller pattern built on Node.js and Express. WebSocket connections are managed by a Socket.IO server mounted on top of the native Node HTTP server, routing chat events and broadcast messages across specific rooms. User authentication is verified via JWT tokens in custom middleware, while Mongoose models define message schemas and user credentials in MongoDB.