Skip to content

Harshith1702/Open_Chat_Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

102 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Open Chat - Real-Time Room-Based Chat Application πŸš€

A feature-rich, real-time chat application with room-based architecture, built using Node.js, Express, and Socket.IO. Experience seamless communication with public/private rooms, typing indicators, and a stunning dark-themed UI optimized for all devices.


πŸ“‹ Table of Contents


πŸ”Ή Features

Room-Based Chat System

  • Create custom chat rooms with unique names
  • Browse all available rooms before joining
  • Seamless room switching without page reloads
  • Rooms are temporary and exist only while users are active (no database required)
  • Rooms are automatically deleted when the last user leaves or when the room creator exits

Public & Private Rooms

  • Public Rooms: Open for anyone to join
  • Private Rooms: Password-protected for exclusive access
  • Server-side password validation ensures security

Room Management

  • Room creator becomes the owner with special privileges
  • Owner name displayed in room listings
  • Set maximum user limits per room (2-100 users)
  • Visual occupancy indicators (e.g., 3 / 10)
  • System-wide limit of 101 users per room to prevent overload

User Experience

  • Unique usernames required within each room
  • Real-time typing indicators ("User is typing...")
  • Live user count updates
  • Room status indicators (Public/Private)
  • Available slots visualization
  • Instant join/leave notifications

Modern UI/UX

  • Dark theme with glassmorphism effects
  • Fully responsive design (mobile, tablet, desktop)
  • Smooth animations for room transitions and messages
  • Intuitive navigation with clear visual hierarchy

πŸ› οΈ Tech Stack

Layer Technology
Frontend HTML5, CSS3, Vanilla JavaScript
Backend Node.js, Express.js
Real-time Socket.IO (WebSocket)
Deployment Render (Cloud Platform)

πŸ“‚ Project Structure

Open_Chat_Application/
β”‚
β”œβ”€β”€ uiLayer/                   # Frontend files
β”‚   β”œβ”€β”€ homeView.html          # Main chat interface
β”‚   β”œβ”€β”€ design.css             # Styling and animations
β”‚   └── realtime.js            # Client-side Socket.IO logic
β”‚
β”œβ”€β”€ rtrpServer.js              # Express + Socket.IO server
β”œβ”€β”€ package.json               # Dependencies
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ screenshots/               # UI screenshots
β”‚   β”œβ”€β”€ chat-room.png
β”‚   β”œβ”€β”€ create-room.png
β”‚   β”œβ”€β”€ desktop-view.png
β”‚   β”œβ”€β”€ mobile-view.png
β”‚   β”œβ”€β”€ render-deploy.png
β”‚   └── websocket-101.png
β”‚
└── README.md

🧠 System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          HTTP/WebSocket          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Browser   β”‚ ◄──────────────────────────────► β”‚   Node.js   β”‚
β”‚  (Client)   β”‚                                  β”‚    Server   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
      β”‚                                                 β”‚
      β”‚  1. HTTP GET (homeView.html)                    β”‚
      │────────────────────────────────────────────────►│
      β”‚                                                 β”‚
      β”‚  2. Establish WebSocket Connection              β”‚
      β”‚β—„ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ β–Ίβ”‚
      β”‚                                                 β”‚
      β”‚  3. Create/Join Room                            β”‚
      │────────────────────────────────────────────────►│
      β”‚                                                 β”‚
      β”‚  4. Real-time Messages & Updates                β”‚
      │◄────────────────────────────────────────────────│

Key Components:

  • Client: Sends messages, joins rooms, displays UI
  • Server: Manages rooms, broadcasts messages, validates actions
  • Socket.IO: Maintains persistent WebSocket connections
  • Room Manager: Tracks active rooms, users, and metadata

▢️ How to Run Locally

Prerequisites

  • Node.js (v14 or higher)
  • npm (Node Package Manager)

Installation Steps

  1. Clone the repository:
   git clone https://github.com/Harshith1702/Open_Chat_Application.git
  1. Navigate to project directory:
   cd Open_Chat_Application
  1. Install dependencies:
   npm install
  1. Start the server:
   npm start
  1. Open in browser:
   http://localhost:4000

🌐 Live Demo

πŸ”— Try Open Chat Live

Note: Hosted on Render's free tier. Initial load may take 30-60 seconds if the service is idle.


πŸ“Έ Screenshots

πŸ–₯️ Desktop View

Desktop Chat Interface

Spacious layout with room list sidebar and chat area

πŸ“± Mobile View

Optimized for touch interactions and smaller screens

🏠 Create Room Interface

Create Room Modal

Intuitive room creation with all options visible

πŸ’¬ Active Chat Room

Chat Room in Action

Real-time messaging with typing indicators and user list

πŸ”Œ WebSocket Connection

WebSocket 101 Protocol

Browser DevTools showing an active WebSocket (HTTP 101 upgrade) connection via Socket.IO

☁️ Cloud Deployment

Render Deployment Dashboard

Live deployment on Render platform


🎯 Learning Outcomes

This project demonstrates proficiency in:

  • WebSocket Communication - Bidirectional real-time data transfer
  • Event-Driven Architecture - Socket.IO event handling
  • State Management - Client-side and server-side synchronization
  • Responsive Design - Mobile-first CSS approach
  • Room-Based Architecture - Multi-room chat system design
  • Security Fundamentals - Password validation, input sanitization
  • Cloud Deployment - Auto-deployed on Render via GitHub integration
  • Git Workflow - Version control and collaboration

πŸ” Security Considerations

  • Server-side room password validation
  • Basic input validation to prevent malformed data
  • Controlled room limits to avoid server overload
  • No persistent storage (reduces attack surface)

Note: This project focuses on real-time systems learning, not production-grade security.


πŸš€ Future Enhancements

  • Message persistence with MongoDB
  • User authentication (OAuth/JWT)
  • File/image sharing capabilities
  • Message reactions and emojis
  • Private direct messaging
  • Room moderation tools
  • Message edit/delete functionality
  • Push notifications

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“š Academic Note

This project is shared publicly for educational and demonstration purposes.

Academic Integrity Guidelines:

  • Cloning for learning and reference is encouraged
  • Fork and modify for personal projects
  • Direct submission as academic work may violate institutional policies
  • Always cite sources and give proper attribution

πŸ‘€ Author

Padakanti Harshith
B.Tech Computer Science and Engineering
πŸ”— GitHub: @Harshith1702


πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


πŸ™ Acknowledgments

  • Socket.IO documentation and community
  • Render for free hosting services
  • Open-source contributors and testers

πŸ“ž Support

Found a bug? Have suggestions?


Built with πŸ–€ by Harshith

GitHub Stars GitHub Forks

About

A real-time, multi-user room-based chat application built with Node.js, Express, and Socket.IO. Features include public/private rooms with password protection, typing indicators, live user count, temporary rooms (auto-delete when empty), and a responsive dark-themed UI optimized for desktop and mobile devices.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors