Skip to content

mahingaRodin/nodejs-realtime-chatapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Certainly! Here's a sample README.md tailored for your Node.js backend and React.js frontend realtime chat application:


Realtime Chat App

A realtime chat application built with Node.js, Express.js, and Socket.io on the backend, and React.js with CSS on the frontend. This app allows multiple users to chat in real time with a responsive and modern user interface.

Table of Contents

Features

  • Real-time Communication: Instant messaging using Socket.io.
  • Multiple Chat Rooms: Users can join different chat rooms.
  • User Notifications: Alerts when users join or leave.
  • Online Users List: Display of active users in a chat room.
  • Responsive Design: Mobile-friendly UI built with React and CSS.
  • Message Timestamps: Each message displays the time it was sent.

Demo

Chat App Screenshot

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Node.js (version 12.x or later)
  • npm (version 6.x or later) or Yarn
  • Git for version control

Installation

1. Clone the Repository

git clone https://github.com/your-username/chat-app.git

2. Navigate to the Project Directory

cd chat-app

3. Install Backend Dependencies

cd server
npm install

4. Install Frontend Dependencies

cd ../client
npm install

Usage

1. Start the Backend Server

From the server directory, run:

npm start

This starts the backend server on http://localhost:5000.

2. Start the Frontend Application

Open a new terminal window, navigate to the client directory, and run:

npm start

This starts the React app on http://localhost:3000.

3. Open the Application in Your Browser

Visit http://localhost:3000 to see the chat app in action.

4. Using the Chat App

  • Join a Chat Room: Enter your name and select a room to join.
  • Send Messages: Type your message and press enter to send.
  • Real-time Updates: Chat with others in the same room instantly.

Project Structure

chat-app/
├── client/            # React frontend
│   ├── public/
│   └── src/
│       ├── components/
│       ├── App.js
│       └── index.js
├── server/            # Node.js backend
│   ├── index.js
│   └── utils/
├── package.json
└── README.md

Technologies Used

Backend

  • Node.js: JavaScript runtime environment
  • Express.js: Web framework for Node.js
  • Socket.io: Enables real-time bidirectional event-based communication

Frontend

  • React.js: JavaScript library for building user interfaces
  • CSS: Styling the frontend components
  • Socket.io Client: Client-side library for Socket.io

Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the Repository

    Click the "Fork" button at the top right of the repository page.

  2. Clone Your Fork

    git clone https://github.com/your-username/chat-app.git
  3. Create a Feature Branch

    git checkout -b feature/YourFeature
  4. Commit Your Changes

    git commit -m "Add Your Feature"
  5. Push to Your Fork

    git push origin feature/YourFeature
  6. Create a Pull Request

    Submit a pull request to the original repository.

License

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

Contact


Feel free to customize this README.md to better fit your project's specifics, such as adding a live demo link, screenshots, or any additional sections you find necessary.

Let me know if you need further assistance!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published