Giter VIP home page Giter VIP logo

thissayantan / basic-chat-front-end Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6 KB

๐Ÿ–ฅ๏ธ This front-end application is designed to work in conjunction with a backend chat server ๐Ÿ’ป, allowing users to join chat rooms ๐Ÿšช, send ๐Ÿ“ค and receive ๐Ÿ“ฅ messages in real-time โฑ๏ธ, and view active users ๐Ÿ‘€ and rooms ๐Ÿ . It uses Socket.IO ๐ŸŒ for seamless real-time communication ๐Ÿ’ฌ.

Home Page: https://chat-608.pages.dev/

License: MIT License

JavaScript 52.23% HTML 20.34% CSS 27.42%
chat css3 html5 javsscript socket-io typing-indicator real-time-communication chat-room collaboration-tool websocket

basic-chat-front-end's Introduction

Chat App Frontend

This README details the frontend setup for a real-time chat application using HTML, CSS, and JavaScript with Socket.IO.

Overview

This frontend application is designed to work in conjunction with a backend chat server, allowing users to join chat rooms, send and receive messages in real-time, and view active users and rooms. It uses Socket.IO for seamless real-time communication.

Features

  • Real-time messaging.
  • User can join and leave chat rooms.
  • Displays messages dynamically in the chat window.
  • Shows active users in the current room.
  • Lists all active chat rooms.
  • Indicates when a user is typing a message.

Setup

Prerequisites

  • A compatible backend server running Socket.IO.
  • Basic knowledge of HTML, CSS, and JavaScript.

Files Included

  • index.html: The main HTML file.
  • style.css: Styling for the application.
  • app.js: JavaScript file handling the client-side logic.

Usage

  1. Open index.html in a web browser.
  2. Enter a name and a room to join.
  3. Start chatting by typing messages and sending them.
  4. Real-time updates will appear in the chat window.

Key Components

  • Socket.IO Client: Establishes a connection with the backend server.
  • Event Listeners: Handles chat messages, joining rooms, and displaying user and room lists.
  • UI Interactions: Updates the chat display and shows user activities like typing.

Event Handling

  • message: For sending and receiving messages.
  • enterRoom: For a user entering a chat room.
  • activity: To show when a user is typing.
  • userList: To display the list of users in a room.
  • roomList: To display a list of active rooms.

HTML Structure

  • Forms for joining a room and sending messages.
  • A display area for chat messages.
  • Sections to show active users and chat rooms.

CSS

style.css includes basic styles to organize the layout and appearance of the chat application.

JavaScript

app.js contains the logic for connecting to the Socket.IO server, handling events, and updating the UI in response to server messages.

Conclusion

This frontend setup, when connected to a suitable backend, provides a fully functional real-time chat application. It's a great starting point for anyone looking to learn real-time web communication.

basic-chat-front-end's People

Contributors

thissayantan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.