https://github.com/udattam/conversations
A realtime chat application built with Node.js, Express and Socket.io.
https://github.com/udattam/conversations
css express html javascript nodejs socket-io
Last synced: 3 months ago
JSON representation
A realtime chat application built with Node.js, Express and Socket.io.
- Host: GitHub
- URL: https://github.com/udattam/conversations
- Owner: udattam
- Created: 2022-10-07T10:31:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-14T16:53:16.000Z (over 3 years ago)
- Last Synced: 2025-01-15T13:36:36.812Z (over 1 year ago)
- Topics: css, express, html, javascript, nodejs, socket-io
- Language: JavaScript
- Homepage: https://conversations.onrender.com/
- Size: 591 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Conversations
A realtime chat application built with Node.js, Express and Socket.io.
## Table of Contents
- [Overview](#overview)
- [Features](#features)
- [Technologies](#technologies)
- [Setup](#setup)
- [Usage](#usage)
- [Images](#images)
- [Contributing](#contributing)
## Overview
Conversations is a realtime chat application built with Websockets. It is made using Node.js, Express and Socket.io. It allows users to join a chatroom and send messages to other users in the chatroom.
## Features
- Realtime chat
- Typing indicator
- Usernames
- Messages with sender and timestamps information
- Different colors for sender and receiver messages
- Scroll to bottom of chat when new message is sent
## Technologies
- Node.js
- Express
- Socket.io
- HTML
- CSS
- JavaScript
- Google Fonts
## Setup
The structure of the project is as follows:
```
Conversations
├── public
├── app.js
├── package.json
├── package-lock.json
```
First,navigate to the project directory with the following command:
```
cd Conversations
```
To run this project, you will need to have Node.js installed on your computer. You can download it from [here](https://nodejs.org/en/download/). Install the dependencies with the following command:
```
npm install
```
To start the server, run the following command:
```
npm run start
```
If you want to run the server in development mode, run the following command:
```
npm run dev
```
The development mode uses `nodemon` to watch for changes in the code and restart the server automatically.
### Closing Notes
- The entry point of the application is app.js.
- The public folder contains the HTML and CSS files. The package.json file contains the dependencies of the project.
- The app.js file contains the main logic of the application.
- There is a main.js inside the public folder which contains the client side logic of the application.
- With socket.io, we can emit and listen to events. The events are used to send and receive messages. The messages are sent to the server and then broadcasted to all the users in the chatroom.
## Usage
Open multiple tabs in your browser and navigate to `localhost:4000`. Enter your desired username (by default, the username is `anonymous`). Send messages to other users in the chatroom. You can also see the typing indicator when other users are typing. Alternatively, visit [this](https://conversations.onrender.com/) website to try it out!
## Images
**Default Home Page:**

**Typing Indicator:**

**Chatroom:**

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
---
### Link to the project : [Github Repository](https://github.com/udattam/Conversations)